aboutsummaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2008-04-18 14:29:54 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2008-04-18 14:29:54 +0000
commitb205017b3ee5e1fe839ce85a186bcbd956ebc56a (patch)
treee16f1e0b00856764c0674e6daf10af289202aac8 /gtk
parent2f78f0145d2a4c0436d1f2cb2b221c5699acd1d7 (diff)
Display the interface comment if defined.
On non-win32 also display the interface name. svn path=/trunk/; revision=25114
Diffstat (limited to 'gtk')
-rw-r--r--gtk/main_welcome.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/gtk/main_welcome.c b/gtk/main_welcome.c
index a416f4a9e2..6a116b19d9 100644
--- a/gtk/main_welcome.c
+++ b/gtk/main_welcome.c
@@ -38,6 +38,7 @@
#include "capture.h"
#include "capture-pcap-util.h"
#include "capture_opts.h"
+#include "capture_ui_utils.h"
#include "simple_dialog.h"
#include "wiretap/file_util.h"
@@ -435,7 +436,7 @@ welcome_if_panel_new(void)
gchar *err_str;
int ifs;
GList *curr;
-
+ gchar *descr;
panel_vb = gtk_vbox_new(FALSE, 0);
@@ -458,11 +459,22 @@ welcome_if_panel_new(void)
continue;
}
- if (if_info->description != NULL)
- interface_hb = welcome_if_new(if_info->description, &topic_content_bg, g_strdup(if_info->name));
- else
+ descr = capture_dev_user_descr_find(if_info->name);
+ if (descr) {
+#ifndef _WIN32
+ gchar *comment = descr;
+ descr = g_strdup_printf("%s (%s)", comment, if_info->name);
+ g_free (comment);
+#endif
+ interface_hb = welcome_if_new(descr, &topic_content_bg, g_strdup(if_info->name));
+ g_free (descr);
+ } else if (if_info->description != NULL) {
+ interface_hb = welcome_if_new(if_info->description, &topic_content_bg, g_strdup(if_info->name));
+ } else {
interface_hb = welcome_if_new(if_info->name, &topic_content_bg, g_strdup(if_info->name));
- gtk_box_pack_start(GTK_BOX(panel_vb), interface_hb, FALSE, FALSE, 2);
+ }
+
+ gtk_box_pack_start(GTK_BOX(panel_vb), interface_hb, FALSE, FALSE, 2);
}
free_interface_list(if_list);