aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk/capture_if_dlg.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2012-11-22 06:02:49 +0000
committerGuy Harris <guy@alum.mit.edu>2012-11-22 06:02:49 +0000
commitbd976ae6c06b2111bd82df16b77739731dc17402 (patch)
tree406d65d00129abb45868150687f267a139bbf670 /ui/gtk/capture_if_dlg.c
parentb9e8e95ffe9f352cde5847d458081826523cf46f (diff)
On UN*X, if an interface has a description, use it as the "friendly
name". If it doesn't have a description, on OS X, use the System Configuration framework to attempt to get a "friendly name" for interfaces. If a loopback device doesn't have a friendly name, give it "Loopback" as the friendly name. Move the "turn a CFString into a mallocated C string" routine into common code, as it's used in more than one place. svn path=/trunk/; revision=46131
Diffstat (limited to 'ui/gtk/capture_if_dlg.c')
-rw-r--r--ui/gtk/capture_if_dlg.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/gtk/capture_if_dlg.c b/ui/gtk/capture_if_dlg.c
index c8f299f3ed..e22b54ae64 100644
--- a/ui/gtk/capture_if_dlg.c
+++ b/ui/gtk/capture_if_dlg.c
@@ -745,16 +745,16 @@ capture_if_refresh_if_list(void)
data.descr_lb = gtk_label_new(user_descr);
g_free (user_descr);
} else {
- if (device.if_info.description)
- data.descr_lb = gtk_label_new(device.if_info.description);
+ if (device.if_info.vendor_description)
+ data.descr_lb = gtk_label_new(device.if_info.vendor_description);
else
data.descr_lb = gtk_label_new("");
}
gtk_misc_set_alignment(GTK_MISC(data.descr_lb), 0.0f, 0.5f);
gtk_table_attach_defaults(GTK_TABLE(if_tb), data.descr_lb, 4, 5, row, row+1);
- if (device.if_info.description) {
+ if (device.if_info.vendor_description) {
g_string_append(if_tool_str, "Description: ");
- g_string_append(if_tool_str, device.if_info.description);
+ g_string_append(if_tool_str, device.if_info.vendor_description);
g_string_append(if_tool_str, "\n");
}