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
This commit is contained in:
Chris Maynard 2011-08-08 15:27:59 +00:00
parent 56f621ad68
commit 3f8edaa2d1
2 changed files with 18 additions and 0 deletions

View File

@ -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

View File

@ -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