Back out part of revision 23395 - leave the toolbar arrow, but remove the
authorsfisher <sfisher@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 9 Nov 2007 02:08:00 +0000 (02:08 +0000)
committersfisher <sfisher@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 9 Nov 2007 02:08:00 +0000 (02:08 +0000)
preference to turn it on / off per discussion on -dev list.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@23407 f5534014-38df-0310-8fa8-9805f1628bb7

epan/prefs.c
epan/prefs.h
gtk/layout_prefs.c
gtk/toolbar.c

index 3350b83462a27a91eb1b43e05c04592e5b9a482f..00a499664be834d6464721e8c9c3904620f4e4ef 100644 (file)
@@ -1118,7 +1118,6 @@ init_prefs(void) {
   prefs.gui_hex_dump_highlight_style = 1;
   prefs.filter_toolbar_show_in_statusbar = FALSE;
   prefs.gui_toolbar_main_style = TB_STYLE_ICONS;
-  prefs.gui_toolbar_arrow = TRUE;
 #ifdef _WIN32
   /* XXX - not sure, if it must be "Lucida Console" or "lucida console"
    * for gui_font_name1. Maybe it's dependant on the windows version running?!
@@ -1556,7 +1555,6 @@ prefs_set_pref(char *prefarg)
 #define PRS_GUI_GEOMETRY_MAIN_HEIGHT     "gui.geometry.main.height"
 #define PRS_GUI_TOOLBAR_MAIN_SHOW        "gui.toolbar_main_show"
 #define PRS_GUI_TOOLBAR_MAIN_STYLE       "gui.toolbar_main_style"
-#define PRS_GUI_TOOLBAR_ARROW            "gui.toolbar_arrow"
 #define PRS_GUI_WEBBROWSER               "gui.webbrowser"
 #define PRS_GUI_WINDOW_TITLE             "gui.window_title"
 #define PRS_GUI_LAYOUT_TYPE              "gui.layout_type"
@@ -1812,13 +1810,6 @@ set_pref(gchar *pref_name, gchar *value, void *private_data _U_)
        prefs.gui_toolbar_main_style =
            find_index_from_string_array(value, gui_toolbar_style_text,
                                     TB_STYLE_ICONS);
-  } else if (strcmp(pref_name, PRS_GUI_TOOLBAR_ARROW) == 0) {
-    if (strcasecmp(value, "true") == 0) {
-           prefs.gui_toolbar_arrow = TRUE;
-    }
-    else {
-           prefs.gui_toolbar_arrow = FALSE;
-    }
   } else if (strcmp(pref_name, PRS_GUI_FONT_NAME_1) == 0) {
     if (prefs.gui_font_name1 != NULL)
       g_free(prefs.gui_font_name1);
@@ -2499,11 +2490,6 @@ write_prefs(char **pf_path_return)
   fprintf(pf, PRS_GUI_TOOLBAR_MAIN_STYLE ": %s\n",
                  gui_toolbar_style_text[prefs.gui_toolbar_main_style]);
 
-  fprintf(pf, "\n# Show toolbar arrow (GTK2.4+ only)?\n");
-  fprintf(pf, "# TRUE or FALSE (case-insensitive).\n");
-  fprintf(pf, PRS_GUI_TOOLBAR_ARROW ": %s\n",
-                 prefs.gui_toolbar_arrow == TRUE ? "TRUE" : "FALSE");
-
   fprintf(pf, "\n# Save window position at exit?\n");
   fprintf(pf, "# TRUE or FALSE (case-insensitive).\n");
   fprintf(pf, PRS_GUI_GEOMETRY_SAVE_POSITION ": %s\n",
index 0c3bfc04df65fd6d13447d1d4a475446047f0581..230361eea1d87a76739d779effe39e486cb287da 100644 (file)
@@ -120,7 +120,6 @@ typedef struct _e_prefs {
   gint     gui_ptree_expander_style;
   gboolean gui_hex_dump_highlight_style;
   gint     gui_toolbar_main_style;
-  gboolean gui_toolbar_arrow;
   gchar   *gui_font_name1;
   gchar   *gui_font_name2;
   color_t  gui_marked_fg;
index baefcdb7134cdd30b16afe1b96b5f06fe6c55021..e9f5141344d489144c3c29434ed0592e8eadc7ae 100644 (file)
@@ -255,9 +255,6 @@ layout_defaults_cb (GtkWidget * w _U_, gpointer data _U_)
 #define HEX_DUMP_HIGHLIGHT_STYLE_KEY   "hex_dump_highlight_style"
 #define FILTER_TOOLBAR_PLACEMENT_KEY    "filter_toolbar_show_in_statusbar"
 #define GUI_TOOLBAR_STYLE_KEY           "toolbar_style"
-#if GTK_CHECK_VERSION(2,4,0)
-#define GUI_TOOLBAR_ARROW_KEY           "toolbar_arrow"
-#endif
 #define GUI_WINDOW_TITLE_KEY            "window_title"
 
 
@@ -311,13 +308,6 @@ static const enum_val_t toolbar_style_vals[] = {
     { "BOTH",  "Icons & Text",   TB_STYLE_BOTH },
     { NULL,    NULL,             0 }
 };
-#if GTK_CHECK_VERSION(2,4,0)
-static const enum_val_t toolbar_arrow_vals[] = {
-    { "TRUE",  "Show",         TRUE },
-    { "FALSE", "Do not show", FALSE },
-    { NULL,    NULL,              0 }
-};
-#endif
 
 GtkWidget*
 layout_prefs_show(void)
@@ -339,9 +329,6 @@ layout_prefs_show(void)
 #endif
     GtkWidget *highlight_style_om;
     GtkWidget *toolbar_style_om;
-#if GTK_CHECK_VERSION(2,4,0)
-    GtkWidget *toolbar_arrow_om;
-#endif
     GtkWidget *filter_toolbar_placement_om;
     GtkWidget *window_title_te;
 
@@ -497,16 +484,6 @@ layout_prefs_show(void)
         "toolbar will be displayed.", NULL);
     OBJECT_SET_DATA(main_vb, GUI_TOOLBAR_STYLE_KEY, toolbar_style_om);
 
-#if GTK_CHECK_VERSION(2,4,0)
-    toolbar_arrow_om = create_preference_option_menu(main_tb, pos++,
-        "Toolbar arrow:", NULL, toolbar_arrow_vals,
-        prefs.gui_toolbar_arrow);
-    gtk_tooltips_set_tip(tooltips, toolbar_arrow_om, 
-        "Select whether or not to show an arrow at the end of the toolbar "
-        "that allows access to buttons that do not fit on the screen.", NULL);
-    OBJECT_SET_DATA(main_vb, GUI_TOOLBAR_ARROW_KEY, toolbar_arrow_om);
-#endif
-
     /* Placement of Filter toolbar */
     filter_toolbar_placement_om = create_preference_option_menu(main_tb, pos++,
         "Filter toolbar placement:", NULL,
@@ -569,10 +546,6 @@ layout_prefs_fetch(GtkWidget *w)
         OBJECT_GET_DATA(w, HEX_DUMP_HIGHLIGHT_STYLE_KEY),  highlight_style_vals);
     prefs.gui_toolbar_main_style = fetch_enum_value(
         OBJECT_GET_DATA(w, GUI_TOOLBAR_STYLE_KEY), toolbar_style_vals);
-#if GTK_CHECK_VERSION(2,4,0)
-    prefs.gui_toolbar_arrow = fetch_enum_value(
-        OBJECT_GET_DATA(w, GUI_TOOLBAR_ARROW_KEY), toolbar_arrow_vals);
-#endif
 
     if (prefs.gui_window_title != NULL)
         g_free(prefs.gui_window_title);
index 334472ec8ebdafc6003a271d47a0ae5bdfceca28..7d18e94478bf51906d7bbf0084cf784d974ca97a 100644 (file)
@@ -302,11 +302,6 @@ toolbar_redraw_all(void)
     gtk_toolbar_set_style(GTK_TOOLBAR(main_tb),
                           prefs.gui_toolbar_main_style);
 
-#if GTK_CHECK_VERSION(2,4,0)
-    gtk_toolbar_set_show_arrow(GTK_TOOLBAR(main_tb),
-                              prefs.gui_toolbar_arrow);
-#endif
-
 #if GTK_MAJOR_VERSION < 2
     /* In GTK+ 1.2[.x], the toolbar takes the maximum vertical size it ever
      * had, even if you change the style in such a way as to reduce its