aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/prefs.c15
-rw-r--r--epan/prefs.h1
-rw-r--r--gtk/expert_comp_dlg.c26
3 files changed, 39 insertions, 3 deletions
diff --git a/epan/prefs.c b/epan/prefs.c
index b8700576ae..9ccf49c7c2 100644
--- a/epan/prefs.c
+++ b/epan/prefs.c
@@ -1187,6 +1187,7 @@ init_prefs(void) {
prefs.gui_plist_sel_browse = FALSE;
prefs.gui_ptree_sel_browse = FALSE;
prefs.gui_altern_colors = FALSE;
+ prefs.gui_expert_composite_eyecandy = FALSE;
prefs.gui_ptree_line_style = 0;
prefs.gui_ptree_expander_style = 1;
prefs.gui_hex_dump_highlight_style = 1;
@@ -1795,6 +1796,7 @@ prefs_capture_device_monitor_mode(const char *name)
#define PRS_GUI_PLIST_SEL_BROWSE "gui.packet_list_sel_browse"
#define PRS_GUI_PTREE_SEL_BROWSE "gui.protocol_tree_sel_browse"
#define PRS_GUI_ALTERN_COLORS "gui.tree_view_altern_colors"
+#define PRS_GUI_EXPERT_COMPOSITE_EYECANDY "gui.expert_composite_eyecandy"
#define PRS_GUI_FILTER_TOOLBAR_IN_STATUSBAR "gui.filter_toolbar_show_in_statusbar"
#define PRS_GUI_PTREE_LINE_STYLE "gui.protocol_tree_line_style"
#define PRS_GUI_PTREE_EXPANDER_STYLE "gui.protocol_tree_expander_style"
@@ -2155,6 +2157,13 @@ set_pref(gchar *pref_name, gchar *value, void *private_data _U_,
else {
prefs.gui_altern_colors = FALSE;
}
+ } else if (strcmp(pref_name, PRS_GUI_EXPERT_COMPOSITE_EYECANDY) == 0) {
+ if (g_ascii_strcasecmp(value, "true") == 0) {
+ prefs.gui_expert_composite_eyecandy = TRUE;
+ }
+ else {
+ prefs.gui_expert_composite_eyecandy = FALSE;
+ }
} else if (strcmp(pref_name, PRS_GUI_PTREE_LINE_STYLE) == 0) {
prefs.gui_ptree_line_style =
find_index_from_string_array(value, gui_ptree_line_style_text, 0);
@@ -2991,6 +3000,11 @@ write_prefs(char **pf_path_return)
fprintf(pf, PRS_GUI_ALTERN_COLORS ": %s\n",
prefs.gui_altern_colors == TRUE ? "TRUE" : "FALSE");
+ fprintf(pf, "\n# Display LEDs on Expert Composite Dialog Tabs?\n");
+ fprintf(pf, "# TRUE or FALSE (case-insensitive).\n");
+ fprintf(pf, PRS_GUI_EXPERT_COMPOSITE_EYECANDY ": %s\n",
+ prefs.gui_expert_composite_eyecandy == TRUE ? "TRUE" : "FALSE");
+
fprintf(pf, "\n# Place filter toolbar inside the statusbar?\n");
fprintf(pf, "# TRUE or FALSE (case-insensitive).\n");
fprintf(pf, PRS_GUI_FILTER_TOOLBAR_IN_STATUSBAR ": %s\n",
@@ -3396,6 +3410,7 @@ copy_prefs(e_prefs *dest, e_prefs *src)
dest->gui_plist_sel_browse = src->gui_plist_sel_browse;
dest->gui_ptree_sel_browse = src->gui_ptree_sel_browse;
dest->gui_altern_colors = src->gui_altern_colors;
+ dest->gui_expert_composite_eyecandy = src->gui_expert_composite_eyecandy;
dest->filter_toolbar_show_in_statusbar = src->filter_toolbar_show_in_statusbar;
dest->gui_ptree_line_style = src->gui_ptree_line_style;
dest->gui_ptree_expander_style = src->gui_ptree_expander_style;
diff --git a/epan/prefs.h b/epan/prefs.h
index ae5639c373..f479d1ea74 100644
--- a/epan/prefs.h
+++ b/epan/prefs.h
@@ -111,6 +111,7 @@ typedef struct _e_prefs {
gboolean gui_plist_sel_browse;
gboolean gui_ptree_sel_browse;
gboolean gui_altern_colors;
+ gboolean gui_expert_composite_eyecandy;
gboolean filter_toolbar_show_in_statusbar;
gint gui_ptree_line_style;
gint gui_ptree_expander_style;
diff --git a/gtk/expert_comp_dlg.c b/gtk/expert_comp_dlg.c
index 2b4441479d..ee28d90404 100644
--- a/gtk/expert_comp_dlg.c
+++ b/gtk/expert_comp_dlg.c
@@ -34,6 +34,7 @@
#include <gtk/gtk.h>
#include <epan/packet_info.h>
+#include <epan/prefs.h>
#include <epan/tap.h>
#include <epan/stat_cmd_args.h>
#include <epan/prefs.h>
@@ -49,9 +50,8 @@
#include "gtk/expert_comp_dlg.h"
#include "gtk/stock_icons.h"
#include "gtk/main.h"
-
+#include "gtk/expert_indicators.h"
#include "gtk/main_proto_draw.h"
-
#include "gtk/old-gtk-compat.h"
enum
@@ -493,7 +493,6 @@ expert_dlg_init_table(expert_tapdata_t * etd, GtkWidget *vbox)
gtk_tree_view_column_set_resizable(column, TRUE);
gtk_tree_view_append_column (etd->tree_view, column);
-
gtk_tree_view_set_search_column (etd->tree_view, SUMMARY_COLUMN); /* Allow searching the summary */
gtk_tree_view_set_reorderable (etd->tree_view, TRUE); /* Allow user to reorder data with drag n drop */
@@ -631,6 +630,7 @@ expert_comp_init(const char *optarg _U_, void* userdata _U_)
GtkWidget *main_nb;
GtkWidget *vbox;
GtkWidget *hbox;
+ GtkWidget *image;
GtkWidget *bbox;
GtkWidget *close_bt;
GtkWidget *help_bt;
@@ -665,6 +665,11 @@ expert_comp_init(const char *optarg _U_, void* userdata _U_)
ss->error_label = gtk_label_new("Errors: 0/y");
gtk_widget_show(ss->error_label);
hbox = gtk_hbox_new(FALSE, 3);
+ if ( prefs.gui_expert_composite_eyecandy ) {
+ image = pixbuf_to_widget(expert_error_pb_data);
+ gtk_widget_show(image);
+ gtk_container_add(GTK_CONTAINER(hbox), image);
+ }
gtk_container_add(GTK_CONTAINER(hbox), ss->error_label);
gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), temp_page, hbox);
init_error_table(&ss->error_table, 0, temp_page);
@@ -674,6 +679,11 @@ expert_comp_init(const char *optarg _U_, void* userdata _U_)
ss->warn_label = gtk_label_new("Warnings: 0/y");
gtk_widget_show(ss->warn_label);
hbox = gtk_hbox_new(FALSE, 3);
+ if ( prefs.gui_expert_composite_eyecandy ) {
+ image = pixbuf_to_widget(expert_warn_pb_data);
+ gtk_widget_show(image);
+ gtk_container_add(GTK_CONTAINER(hbox), image);
+ }
gtk_container_add(GTK_CONTAINER(hbox), ss->warn_label);
gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), temp_page, hbox);
init_error_table(&ss->warn_table, 0, temp_page);
@@ -683,6 +693,11 @@ expert_comp_init(const char *optarg _U_, void* userdata _U_)
ss->note_label = gtk_label_new("Notes: 0/y");
gtk_widget_show(ss->note_label);
hbox = gtk_hbox_new(FALSE, 3);
+ if ( prefs.gui_expert_composite_eyecandy ) {
+ image = pixbuf_to_widget(expert_note_pb_data);
+ gtk_widget_show(image);
+ gtk_container_add(GTK_CONTAINER(hbox), image);
+ }
gtk_container_add(GTK_CONTAINER(hbox), ss->note_label);
gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), temp_page, hbox);
init_error_table(&ss->note_table, 0, temp_page);
@@ -692,6 +707,11 @@ expert_comp_init(const char *optarg _U_, void* userdata _U_)
ss->chat_label = gtk_label_new("Chats: 0/y");
gtk_widget_show(ss->chat_label);
hbox = gtk_hbox_new(FALSE, 3);
+ if ( prefs.gui_expert_composite_eyecandy ) {
+ image = pixbuf_to_widget(expert_chat_pb_data);
+ gtk_widget_show(image);
+ gtk_container_add(GTK_CONTAINER(hbox), image);
+ }
gtk_container_add(GTK_CONTAINER(hbox), ss->chat_label);
gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), temp_page, hbox);
init_error_table(&ss->chat_table, 0, temp_page);