From 3f8edaa2d15675238cf0cb69054c7d0b5dc7eb0d Mon Sep 17 00:00:00 2001 From: Chris Maynard Date: Mon, 8 Aug 2011 15:27:59 +0000 Subject: [PATCH] From Jim Young via bug 3196: Add preference for displaying expert infos LEDs. Reference: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3196 svn path=/trunk/; revision=38408 --- doc/wireshark.pod.template | 5 +++++ gtk/prefs_gui.c | 13 +++++++++++++ 2 files changed, 18 insertions(+) diff --git a/doc/wireshark.pod.template b/doc/wireshark.pod.template index 685cfb4b68..e09fa1a7d6 100644 --- a/doc/wireshark.pod.template +++ b/doc/wireshark.pod.template @@ -1938,6 +1938,11 @@ This entry specifies the command line to launch a web browser. It is used to access online content, like the Wiki and user guide. Use '%s' to place the request URL in the command line. +=item Display LEDs in the Expert Infos dialog tab labels + +This item determines if LED-like colored images are displayed in the +Expert Infos dialog tab labels. + =back =item Layout Preferences diff --git a/gtk/prefs_gui.c b/gtk/prefs_gui.c index 4707302566..79de31d085 100644 --- a/gtk/prefs_gui.c +++ b/gtk/prefs_gui.c @@ -77,6 +77,7 @@ static gboolean recent_df_entries_changed_cb(GtkWidget *recent_df_entry _U_, #define GUI_FIND_WRAP_KEY "find_wrap" #define GUI_USE_PREF_SAVE_KEY "use_pref_save" #define GUI_SHOW_VERSION_KEY "show_version" +#define GUI_EXPERT_EYECANDY_KEY "expert_eyecandy" static const enum_val_t scrollbar_placement_vals[] _U_ = { { "FALSE", "Left", FALSE }, @@ -172,6 +173,7 @@ gui_prefs_show(void) #if defined(HAVE_IGE_MAC_INTEGRATION) || defined(HAVE_GTKOSXAPPLICATION) GtkWidget *macosx_style_cb; #endif + GtkWidget *expert_info_eyecandy_cb; int pos = 0; char current_val_str[128]; @@ -334,6 +336,13 @@ gui_prefs_show(void) g_object_set_data(G_OBJECT(main_vb), GUI_WEBBROWSER_KEY, webbrowser_te); } + /* Enable Expert Infos Dialog Tab Label "eye-candy" */ + expert_info_eyecandy_cb = create_preference_check_button(main_tb, pos++, + "Display LEDs in the Expert Infos dialog tab labels:", + "Whether colored LED images should be displayed in the Expert Infos dialog tab labels.", + prefs.gui_expert_composite_eyecandy ); + g_object_set_data(G_OBJECT(main_vb), GUI_EXPERT_EYECANDY_KEY, expert_info_eyecandy_cb); + /* Show 'em what we got */ gtk_widget_show_all(main_vb); @@ -434,6 +443,10 @@ gui_prefs_fetch(GtkWidget *w) prefs.gui_webbrowser = g_strdup(gtk_entry_get_text( GTK_ENTRY(g_object_get_data(G_OBJECT(w), GUI_WEBBROWSER_KEY)))); } + + prefs.gui_expert_composite_eyecandy = + gtk_toggle_button_get_active(g_object_get_data(G_OBJECT(w), GUI_EXPERT_EYECANDY_KEY)); + /* * XXX - we need to have a way to fetch the preferences into * local storage and only set the permanent preferences if there