summaryrefslogtreecommitdiff
path: root/epan/prefs.c
diff options
context:
space:
mode:
authorStephen Fisher <steve@stephen-fisher.com>2008-10-26 23:07:37 +0000
committerStephen Fisher <steve@stephen-fisher.com>2008-10-26 23:07:37 +0000
commit1fa606decfc91329e9a264bb02b955a8b2aae191 (patch)
tree520381822391740b78e5af95beedcc5eabec8d82 /epan/prefs.c
parent3a14d073c0ff54a425ddf22463ff461c7a2087da (diff)
downloadwireshark-1fa606decfc91329e9a264bb02b955a8b2aae191.tar.gz
More updates to the IGE Mac OS X integration feature:
- Adds preference "MacOS X style" to the (G)UI preferences pane - When the preference above is enabled, the menu bar is moved from the Wireshark window to the top of the screen. It is no longer displayed in both places at once. This preference defaults to on. - Calls function to enable shortcut keys for OS X top of screen menus. - NOTE: The IGE Mac Integration functions change the Control key to Command key in the menus. This may or may not be desirable. svn path=/trunk/; revision=26565
Diffstat (limited to 'epan/prefs.c')
-rw-r--r--epan/prefs.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/epan/prefs.c b/epan/prefs.c
index e450ce48ad..195f11c935 100644
--- a/epan/prefs.c
+++ b/epan/prefs.c
@@ -1158,6 +1158,7 @@ init_prefs(void) {
prefs.gui_geometry_save_position = FALSE;
prefs.gui_geometry_save_size = TRUE;
prefs.gui_geometry_save_maximized= TRUE;
+ prefs.gui_macosx_style = TRUE;
prefs.gui_console_open = console_open_never;
prefs.gui_fileopen_style = FO_STYLE_LAST_OPENED;
prefs.gui_recent_df_entries_max = 10;
@@ -1641,6 +1642,7 @@ prefs_is_capture_device_hidden(const char *name)
#define PRS_GUI_GEOMETRY_SAVE_POSITION "gui.geometry.save.position"
#define PRS_GUI_GEOMETRY_SAVE_SIZE "gui.geometry.save.size"
#define PRS_GUI_GEOMETRY_SAVE_MAXIMIZED "gui.geometry.save.maximized"
+#define PRS_GUI_MACOSX_STYLE "gui.macosx_style"
#define PRS_GUI_GEOMETRY_MAIN_X "gui.geometry.main.x"
#define PRS_GUI_GEOMETRY_MAIN_Y "gui.geometry.main.y"
#define PRS_GUI_GEOMETRY_MAIN_WIDTH "gui.geometry.main.width"
@@ -1970,6 +1972,13 @@ set_pref(gchar *pref_name, gchar *value, void *private_data _U_)
else {
prefs.gui_geometry_save_maximized = FALSE;
}
+ } else if (strcmp(pref_name, PRS_GUI_MACOSX_STYLE) == 0) {
+ if (g_ascii_strcasecmp(value, "true") == 0) {
+ prefs.gui_macosx_style = TRUE;
+ }
+ else {
+ prefs.gui_macosx_style = FALSE;
+ }
} else if (strcmp(pref_name, PRS_GUI_GEOMETRY_MAIN_X) == 0) { /* deprecated */
} else if (strcmp(pref_name, PRS_GUI_GEOMETRY_MAIN_Y) == 0) { /* deprecated */
} else if (strcmp(pref_name, PRS_GUI_GEOMETRY_MAIN_WIDTH) == 0) { /* deprecated */
@@ -2714,6 +2723,11 @@ write_prefs(char **pf_path_return)
fprintf(pf, PRS_GUI_GEOMETRY_SAVE_MAXIMIZED ": %s\n",
prefs.gui_geometry_save_maximized == TRUE ? "TRUE" : "FALSE");
+ fprintf(pf, "\n# Use MacOS X style (Mac OS X with native GTK only)?\n");
+ fprintf(pf, "# TRUE or FALSE (case-insensitive).\n");
+ fprintf(pf, PRS_GUI_MACOSX_STYLE ": %s\n",
+ prefs.gui_macosx_style == TRUE ? "TRUE" : "FALSE");
+
fprintf(pf, "\n# Open a console window (WIN32 only)?\n");
fprintf(pf, "# One of: NEVER, AUTOMATIC, ALWAYS\n");
fprintf(pf, PRS_GUI_CONSOLE_OPEN ": %s\n",
@@ -3035,6 +3049,7 @@ copy_prefs(e_prefs *dest, e_prefs *src)
dest->gui_geometry_save_position = src->gui_geometry_save_position;
dest->gui_geometry_save_size = src->gui_geometry_save_size;
dest->gui_geometry_save_maximized = src->gui_geometry_save_maximized;
+ dest->gui_macosx_style = src->gui_macosx_style;
dest->gui_webbrowser = g_strdup(src->gui_webbrowser);
dest->gui_window_title = g_strdup(src->gui_window_title);
dest->gui_start_title = g_strdup(src->gui_start_title);