Fix Windows builds that cannot find gtk/gtk.h from epan/prefs.c. Write out

toolbar arrow preference even in GTK < 2.4 and just don't use it unless
running GTK 2.4+.


svn path=/trunk/; revision=23397
This commit is contained in:
Stephen Fisher 2007-11-08 02:29:18 +00:00
parent 544ca516b5
commit ee3d03b7ae
1 changed files with 1 additions and 9 deletions

View File

@ -51,8 +51,6 @@
#include <epan/prefs-int.h>
#include <epan/uat-int.h>
#include <gtk/gtk.h>
/* Internal functions */
static module_t *find_subtree(module_t *parent, const char *name);
static module_t *prefs_register_module_or_subtree(module_t *parent,
@ -1558,9 +1556,7 @@ 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"
#if GTK_CHECK_VERSION(2,4,0)
#define PRS_GUI_TOOLBAR_ARROW "gui.toolbar_arrow"
#endif
#define PRS_GUI_WEBBROWSER "gui.webbrowser"
#define PRS_GUI_WINDOW_TITLE "gui.window_title"
#define PRS_GUI_LAYOUT_TYPE "gui.layout_type"
@ -1816,7 +1812,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);
#if GTK_CHECK_VERSION(2,4,0)
} else if (strcmp(pref_name, PRS_GUI_TOOLBAR_ARROW) == 0) {
if (strcasecmp(value, "true") == 0) {
prefs.gui_toolbar_arrow = TRUE;
@ -1824,7 +1819,6 @@ set_pref(gchar *pref_name, gchar *value, void *private_data _U_)
else {
prefs.gui_toolbar_arrow = FALSE;
}
#endif
} else if (strcmp(pref_name, PRS_GUI_FONT_NAME_1) == 0) {
if (prefs.gui_font_name1 != NULL)
g_free(prefs.gui_font_name1);
@ -2505,12 +2499,10 @@ write_prefs(char **pf_path_return)
fprintf(pf, PRS_GUI_TOOLBAR_MAIN_STYLE ": %s\n",
gui_toolbar_style_text[prefs.gui_toolbar_main_style]);
#if GTK_CHECK_VERSION(2,4,0)
fprintf(pf, "\n# Show toolbar arrow? \n");
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");
#endif
fprintf(pf, "\n# Save window position at exit?\n");
fprintf(pf, "# TRUE or FALSE (case-insensitive).\n");