From H.sivank: GtkOSXApplication support.
authorGuy Harris <guy@alum.mit.edu>
Tue, 25 May 2010 00:35:44 +0000 (00:35 -0000)
committerGuy Harris <guy@alum.mit.edu>
Tue, 25 May 2010 00:35:44 +0000 (00:35 -0000)
Call the various flavors of OS X integration just "OS X integration",
not anything with "IGE" in it - it appears that, in some places,
"ige-mac-integration" refers only to the older Carbon-based functions,
although the library still appears to be called -ligemacintegration.

Update the URLs for the information about the OS X integration
libraries.

Clean up help message for --with-pcap-remote.

Clean up white space a bit.

Speaking of white space, it's "Mac OS X", not "MacOS X".

svn path=/trunk/; revision=32941

AUTHORS
acinclude.m4
configure.in
epan/dissectors/packet-nbns.c
epan/prefs.c
gtk/main.c
gtk/menus.c
gtk/prefs_gui.c
version_info.c

diff --git a/AUTHORS b/AUTHORS
index bcc4208a6ac14ccffdadbe32ca7b639d51f170b6..0f779b068849b37f75cdab0826847712f69ae446 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -3062,6 +3062,9 @@ Slava                     <slavak [AT] gmail.com> {
                management datagrams (Infiniband)
 }
 
+H.sivank               <hsivank [AT] gmail.com> {
+       GtkOSXApplication support
+}
 
 and by:
 
index 896564ab12a4179c0b86dd7cd32dca18e987db39..ff46e26c328d4a459224563b0fb814da4a2d4f9e 100644 (file)
@@ -1743,19 +1743,29 @@ fi
 ])
 
 #
-# AC_WIRESHARK_IGE_MAC_INTEGRATION_CHECK
+# AC_WIRESHARK_OSX_INTEGRATION_CHECK
 #
 # Checks for the presence of OS X integration functions in the GTK+ framework
 # or as a separate library.
 #
-# http://developer.imendio.com/projects/gtk-macosx/integration
+# http://sourceforge.net/apps/trac/gtk-osx/wiki/Integrate
 #
-AC_DEFUN([AC_WIRESHARK_IGE_MAC_INTEGRATION_CHECK],
+# http://live.gnome.org/GTK%2B/OSX/Integration
+#    for the old Carbon-based integration functions
+#
+# http://gtk-osx.sourceforge.net/ige-mac-integration/
+#    for the new Cocoa-based integration functions
+#
+AC_DEFUN([AC_WIRESHARK_OSX_INTEGRATION_CHECK],
 [
        ac_save_CFLAGS="$CFLAGS"
        ac_save_LIBS="$LIBS"
        CFLAGS="$CFLAGS $GTK_CFLAGS"
        LIBS="$GTK_LIBS $LIBS"
+
+       #
+       # Check for the old integration functions in the Gtk framework.
+       #
        AC_CHECK_LIB(Gtk, ige_mac_menu_set_menu_bar,
        [
                AC_DEFINE(HAVE_IGE_MAC_INTEGRATION, 1,
@@ -1768,6 +1778,10 @@ AC_DEFUN([AC_WIRESHARK_IGE_MAC_INTEGRATION_CHECK],
 
        if test x$have_ige_mac == x
        then
+               #
+               # Not found - check for the old integration functions in
+               # a -ligemacintegration library.
+               #
                AC_CHECK_LIB(igemacintegration, ige_mac_menu_set_menu_bar,
                [
                        AC_DEFINE(HAVE_IGE_MAC_INTEGRATION, 1,
@@ -1777,6 +1791,23 @@ AC_DEFUN([AC_WIRESHARK_IGE_MAC_INTEGRATION_CHECK],
                        GTK_LIBS="$GTK_LIBS -ligemacintegration"
                ])
        fi
+       
+       if test x$have_ige_mac == x
+       then
+               #
+               # Not found - check for the new integration functions in
+               # a -ligemacintegration library.
+               #
+               AC_CHECK_LIB(igemacintegration, gtk_osxapplication_set_menu_bar,
+               [
+                       AC_DEFINE(HAVE_GTKOSXAPPLICATION, 1,
+                               [Define to 1 if the the Gtk+ framework or a separate library inclues the GtkOSXApplication Integration functions.])
+                       have_ige_mac=yes
+                       # We don't want gtk stuff in LIBS (which is reset below) so
+                       # manually set GTK_LIBS (which is more appropriate)
+                       GTK_LIBS="$GTK_LIBS -ligemacintegration"
+               ])
+       fi
        CFLAGS="$ac_save_CFLAGS"
        LIBS="$ac_save_LIBS"
 ])
index 109965f99f0debcab86b460ca10f2067ba21befd..e81ffa3cef6f71e6602fd5addfa121ca671fcc23 100644 (file)
@@ -800,30 +800,36 @@ main(void)
        AC_MSG_RESULT($ac_cv_dladdr_finds_executable_path)
 fi
 
-dnl IGE Mac integration check
-AC_MSG_CHECKING(whether to use IGE Mac integration functions)
-
-AC_ARG_WITH(ige-mac-integration,
-  AC_HELP_STRING( [--with-ige-mac-integration],
-                  [use IGE Mac integration. (@<:@default=yes, if available@:>@]),
-[
-    if test $withval = no
-    then
-        want_ige_mac_integration=no
+if test "x$no_gtk" != "xyes"
+then
+    #
+    # We have GTK+; do we want the OS X integration functions and,
+    # if so, do we have them and, if so, which versions do we have,
+    # the old Carbon-based ones or the new Cocoa-based ones?
+    #
+    AC_MSG_CHECKING(whether to use OS X integration functions)
+
+    AC_ARG_WITH(osx-integration,
+      AC_HELP_STRING( [--with-osx-integration],
+                      [use OS X integration functions (@<:@default=yes, if available@:>@]),
+    [
+        if test $withval = no
+        then
+            want_osx_integration=no
+        else
+            want_osx_integration=yes
+        fi
+    ],[
+        want_osx_integration=yes
+    ])
+    if test "x$want_osx_integration" = "xno"; then
+        AC_MSG_RESULT(no)
     else
-        want_ige_mac_integration=yes
+        AC_MSG_RESULT(yes)
+        AC_WIRESHARK_OSX_INTEGRATION_CHECK
     fi
-],[
-    want_ige_mac_integration=yes
-])
-if test "x$want_ige_mac_integration" = "xno" -o "x$no_gtk" = "xyes" ; then
-    AC_MSG_RESULT(no)
-else
-    AC_MSG_RESULT(yes)
-    AC_WIRESHARK_IGE_MAC_INTEGRATION_CHECK
 fi
 
-
 AC_SUBST(wireshark_bin)
 AC_SUBST(wireshark_man)
 
@@ -1074,7 +1080,8 @@ dnl pcap remote check
 AC_MSG_CHECKING(whether to use libpcap remote capturing feature)
 
 AC_ARG_WITH(pcap-remote,
-[  --with-pcap-remote        use libpcap remote capturing (requires libpcap)],
+    AC_HELP_STRING([--with-pcap-remote],
+                   [use libpcap remote capturing (requires libpcap)]),
 [
     if test $withval = no
     then
@@ -1096,8 +1103,8 @@ dnl zlib check
 AC_MSG_CHECKING(whether to use zlib for reading compressed capture files)
 
 AC_ARG_WITH(zlib,
-  AC_HELP_STRING( [--with-zlib@<:@=DIR@:>@],
-                  [use zlib (located in directory DIR, if supplied) to read compressed data.  @<:@default=yes, if available@:>@]),
+  AC_HELP_STRING([--with-zlib@<:@=DIR@:>@],
+                 [use zlib (located in directory DIR, if supplied) to read compressed data.  @<:@default=yes, if available@:>@]),
 [
        if test $withval = no
        then
index fc7d54dfb05d49ed29650d863ad9996b80a29b87..aefbd821a7675611d90df8b38ff59d2f4356ba7b 100644 (file)
@@ -1728,9 +1728,9 @@ dissect_nbss(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                         * shouldn't have more than 128 bytes (actually,
                         * we shouldn't have that many).
                         *
-                        * XXX - actually, MacOS X 10.1 (yes, that's
+                        * XXX - actually, Mac OS X 10.1 (yes, that's
                         * redundant, but that's what Apple calls it,
-                        * not MacOS X.1) puts names longer than 16
+                        * not Mac OS X.1) puts names longer than 16
                         * characters into session request messages,
                         * so we can have more than 32 bytes of
                         * name value, so we can have more than 128
index 1465bb99767194c049ec4fdc87713e03ec2a0898..7d81946ff62d05415e7fdba85bf7396a147abb58 100644 (file)
@@ -2849,7 +2849,7 @@ 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, "\n# Use Mac OS 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");
index c496e250ceefb8548a22e5a5a92d7b01d959cee3..8cab7ee2777c0bac9819695fb2d068c76f5afaea 100644 (file)
 #include "gtk/new_packet_list.h"
 #endif
 
+#ifdef HAVE_GTKOSXAPPLICATION
+#include <igemacintegration/gtkosxapplication.h>
+#endif
+
 /*
  * Files under personal and global preferences directories in which
  * GTK settings for Wireshark are stored.
@@ -1767,6 +1771,9 @@ main_cf_callback(gint event, gpointer data, gpointer user_data _U_)
 static void
 main_capture_callback(gint event, capture_options *capture_opts, gpointer user_data _U_)
 {
+#ifdef HAVE_GTKOSXAPPLICATION
+    GtkOSXApplication *theApp;
+#endif 
     switch(event) {
     case(capture_cb_capture_prepared):
         g_log(LOG_DOMAIN_MAIN, G_LOG_LEVEL_DEBUG, "Callback: capture prepared");
@@ -1775,6 +1782,10 @@ main_capture_callback(gint event, capture_options *capture_opts, gpointer user_d
     case(capture_cb_capture_update_started):
         g_log(LOG_DOMAIN_MAIN, G_LOG_LEVEL_DEBUG, "Callback: capture update started");
         main_capture_cb_capture_update_started(capture_opts);
+#ifdef HAVE_GTKOSXAPPLICATION
+        theApp = g_object_new(GTK_TYPE_OSX_APPLICATION, NULL);
+        gtk_osxapplication_set_dock_icon_pixbuf(theApp,gdk_pixbuf_new_from_xpm_data(wsiconcap48_xpm));
+#endif
         break;
     case(capture_cb_capture_update_continue):
         /*g_log(LOG_DOMAIN_MAIN, G_LOG_LEVEL_DEBUG, "Callback: capture update continue");*/
@@ -1798,6 +1809,10 @@ main_capture_callback(gint event, capture_options *capture_opts, gpointer user_d
         g_log(LOG_DOMAIN_MAIN, G_LOG_LEVEL_DEBUG, "Callback: capture stopping");
         /* Beware: this state won't be called, if the capture child
          * closes the capturing on it's own! */
+#ifdef HAVE_GTKOSXAPPLICATION
+        theApp = g_object_new(GTK_TYPE_OSX_APPLICATION, NULL);
+        gtk_osxapplication_set_dock_icon_pixbuf(theApp,gdk_pixbuf_new_from_xpm_data(wsicon64_xpm));
+#endif
         break;
     default:
         g_warning("main_capture_callback: event %u unknown", event);
@@ -2039,7 +2054,10 @@ main(int argc, char *argv[])
   dfilter_t           *jump_to_filter = NULL;
   int                  optind_initial;
   int                  status;
-
+#ifdef HAVE_GTKOSXAPPLICATION
+  GtkOSXApplication   *theApp;
+#endif
+       
 #ifdef HAVE_LIBPCAP
 #if defined(_WIN32) || defined(HAVE_PCAP_CREATE)
 #define OPTSTRING_B "B:"
@@ -2984,6 +3002,12 @@ main(int argc, char *argv[])
 
   profile_store_persconffiles (FALSE);
 
+#ifdef HAVE_GTKOSXAPPLICATION
+  theApp = g_object_new(GTK_TYPE_OSX_APPLICATION, NULL);
+  gtk_osxapplication_set_dock_icon_pixbuf(theApp,gdk_pixbuf_new_from_xpm_data(wsicon64_xpm));
+  gtk_osxapplication_ready(theApp);
+#endif
+       
   g_log(LOG_DOMAIN_MAIN, G_LOG_LEVEL_INFO, "Wireshark is up and ready to go");
 
   /* we'll enter the GTK loop now and hand the control over to GTK ... */
@@ -3003,6 +3027,10 @@ main(int argc, char *argv[])
   /* hide the (unresponsive) main window, while asking the user to close the console window */
   gtk_widget_hide(top_level);
 
+#ifdef HAVE_GTKOSXAPPLICATION
+  g_object_unref(theApp);
+#endif
+       
   /* Shutdown windows sockets */
   WSACleanup();
 
@@ -3541,13 +3569,13 @@ create_main_window (gint pl_size, gint tv_size, gint bv_size, e_prefs *prefs_p)
     /* Menu bar */
     menubar = main_menu_new(&accel);
 
-#ifdef HAVE_IGE_MAC_INTEGRATION
-    /* MacOS X native menus are created and displayed by main_menu_new() */
+#if defined(HAVE_IGE_MAC_INTEGRATION) || defined (HAVE_GTKOSXAPPLICATION)
+    /* Mac OS X native menus are created and displayed by main_menu_new() */
     if(!prefs_p->gui_macosx_style) {
 #endif
     gtk_window_add_accel_group(GTK_WINDOW(top_level), accel);
     gtk_widget_show(menubar);
-#ifdef HAVE_IGE_MAC_INTEGRATION
+#if defined(HAVE_IGE_MAC_INTEGRATION) || defined(HAVE_GTKOSXAPPLICATION)
     }
 #endif
 
index 911f95d5dcf49b97b96f5a7db7dfc3d28c24a47f..c0b5b722c25584f4b370ad30d35893eb686b0d1c 100644 (file)
 #include <ige-mac-menu.h>
 #endif
 
+#ifdef HAVE_GTKOSXAPPLICATION
+#include <igemacintegration/gtkosxapplication.h>
+#endif
+
 typedef struct _menu_item {
     char    *name;
     gint    group;
@@ -566,7 +570,7 @@ static GtkItemFactoryEntry menu_items[] =
     {"/View/_Time Display Format", NULL, NULL, 0, "<Branch>", NULL,},
     {"/View/Time Display Format/Date and Time of Day:   1970-01-01 01:02:03.123456", "<alt><control>1", GTK_MENU_FUNC(timestamp_format_cb),
                         TS_ABSOLUTE_WITH_DATE, "<RadioItem>", NULL,},
-    {"/View/Time Display Format/Time of Day:   01:02:03.123456", "<alt><control>2", GTK_MENU_FUNC(timestamp_format_cb), 
+    {"/View/Time Display Format/Time of Day:   01:02:03.123456", "<alt><control>2", GTK_MENU_FUNC(timestamp_format_cb),
                         TS_ABSOLUTE, "/View/Time Display Format/Date and Time of Day:   1970-01-01 01:02:03.123456", NULL,},
     {"/View/Time Display Format/Seconds Since Epoch (1970-01-01):   1234567890.123456", "<alt><control>3", GTK_MENU_FUNC(timestamp_format_cb),
                         TS_EPOCH, "/View/Time Display Format/Date and Time of Day:   1970-01-01 01:02:03.123456", NULL,},
@@ -726,7 +730,7 @@ static GtkItemFactoryEntry menu_items[] =
     {"/Analyze/Prepare a Filter/... o_r not Selected", NULL, GTK_MENU_FUNC(match_selected_ptree_cb),
                        MATCH_SELECTED_OR_NOT, NULL, NULL,},
     {"/Analyze/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
-    {"/Analyze/_Enabled Protocols...", "<shift><control>E", GTK_MENU_FUNC(proto_cb), 
+    {"/Analyze/_Enabled Protocols...", "<shift><control>E", GTK_MENU_FUNC(proto_cb),
                        0, "<StockItem>", WIRESHARK_STOCK_CHECKBOX,},
     {"/Analyze/Decode _As...", NULL, GTK_MENU_FUNC(decode_as_cb),
                        0, "<StockItem>", WIRESHARK_STOCK_DECODE_AS,},
@@ -1169,7 +1173,13 @@ main_menu_new(GtkAccelGroup ** table) {
     GtkWidget *quit_item, *about_item, *preferences_item;
     IgeMacMenuGroup *group;
 #endif
-
+#ifdef HAVE_GTKOSXAPPLICATION
+    GtkOSXApplication *theApp;
+    GtkWidget * item;
+    GtkOSXApplicationMenuGroup *group;
+    GtkWidget * dock_menu;
+#endif
+       
     grp = gtk_accel_group_new();
 
     if (initialize)
@@ -1206,6 +1216,47 @@ main_menu_new(GtkAccelGroup ** table) {
     g_signal_connect(quit_item, "activate", G_CALLBACK(file_quit_cmd_cb), NULL);
     ige_mac_menu_set_quit_menu_item(GTK_MENU_ITEM(quit_item));
 #endif
+       
+#ifdef HAVE_GTKOSXAPPLICATION
+    theApp = g_object_new(GTK_TYPE_OSX_APPLICATION, NULL);
+       
+    if(prefs.gui_macosx_style) {
+        gtk_osxapplication_set_menu_bar(theApp, GTK_MENU_SHELL(menubar));
+        gtk_osxapplication_set_use_quartz_accelerators(theApp, TRUE);
+
+        group = gtk_osxapplication_add_app_menu_group (theApp);
+        item = gtk_item_factory_get_item(main_menu_factory,"/Help/About Wireshark");
+        gtk_osxapplication_add_app_menu_item(theApp, group,GTK_MENU_ITEM (item));
+
+        group = gtk_osxapplication_add_app_menu_group (theApp);
+        item = gtk_item_factory_get_item(main_menu_factory,"/Edit/Preferences...");
+        gtk_osxapplication_add_app_menu_item(theApp, group,GTK_MENU_ITEM (item));
+
+        group = gtk_osxapplication_add_app_menu_group (theApp);
+        item = gtk_item_factory_get_item(main_menu_factory,"/Help");
+        gtk_osxapplication_set_help_menu(theApp,GTK_MENU_ITEM(item));
+
+        /* Quit item is not needed */
+        gtk_item_factory_delete_item(main_menu_factory,"/File/Quit");
+    }
+
+    /* generate dock menu */
+    dock_menu = gtk_menu_new();
+
+    item = gtk_menu_item_new_with_label("Start");
+    g_signal_connect_data (item, "activate", G_CALLBACK (capture_start_cb),0,0, 0);
+    gtk_menu_append(dock_menu, item);
+
+    item = gtk_menu_item_new_with_label("Stop");
+    g_signal_connect_data (item, "activate", G_CALLBACK (capture_stop_cb),0,0, 0);
+    gtk_menu_append(dock_menu, item);
+
+    item = gtk_menu_item_new_with_label("Restart");
+    g_signal_connect_data (item, "activate", G_CALLBACK (capture_restart_cb),0,0, 0);
+    gtk_menu_append(dock_menu, item);
+
+    gtk_osxapplication_set_dock_menu(theApp, GTK_MENU_SHELL(dock_menu));
+#endif
 
     if (table)
         *table = grp;
@@ -1220,8 +1271,7 @@ void menu_dissector_filter_cb(  GtkWidget *widget _U_,
 {
     dissector_filter_t      *filter_entry = callback_data;
     GtkWidget               *filter_te;
-    const char              *buf;    
-
+    const char              *buf;
 
     filter_te = g_object_get_data(G_OBJECT(popup_menu_object), E_DFILTER_TE_KEY);
 
@@ -1803,7 +1853,6 @@ remove_menu_recent_capture_filename(gchar *cf_name) {
     GList* child_list_item;
     GtkWidget    *menu_item_child;
     const gchar *menu_item_cf_name;
-    
 
     /* get the submenu container item */
     submenu_recent_files = gtk_item_factory_get_widget(main_menu_factory, MENU_RECENT_FILES_PATH);
@@ -2136,9 +2185,9 @@ timestamp_format_cb(GtkWidget *w _U_, gpointer d _U_, gint action)
         timestamp_set_type(action);
         recent.gui_time_format = action;
 #ifdef NEW_PACKET_LIST
-               /* This call adjusts column width */
-               cf_timestamp_auto_precision(&cfile);            
-               new_packet_list_queue_draw();
+        /* This call adjusts column width */
+        cf_timestamp_auto_precision(&cfile);
+        new_packet_list_queue_draw();
 #else
         cf_change_time_formats(&cfile);
 #endif
@@ -2158,9 +2207,9 @@ timestamp_precision_cb(GtkWidget *w _U_, gpointer d _U_, gint action)
         }
         recent.gui_time_precision  = action;
 #ifdef NEW_PACKET_LIST
-               /* This call adjusts column width */
-               cf_timestamp_auto_precision(&cfile);
-               new_packet_list_queue_draw();
+        /* This call adjusts column width */
+        cf_timestamp_auto_precision(&cfile);
+        new_packet_list_queue_draw();
 #else
         cf_change_time_formats(&cfile);
 #endif
@@ -2259,7 +2308,7 @@ menu_colorize_changed(gboolean packet_list_colorize) {
         recent.packet_list_colorize = packet_list_colorize;
         color_filters_enable(packet_list_colorize);
 #ifdef NEW_PACKET_LIST
-               new_packet_list_colorize_packets();
+        new_packet_list_colorize_packets();
 #else
         cf_colorize_packets(&cfile);
 #endif
@@ -3059,7 +3108,7 @@ menu_prefs_change_cancel (GtkWidget *w _U_, gpointer parent_w)
     window_destroy(GTK_WIDGET(parent_w));
 }
 
-static void 
+static void
 menu_prefs_edit_dlg (GtkWidget *w, gpointer data)
 {
     pref_t *pref = data;
@@ -3251,7 +3300,7 @@ rebuild_protocol_prefs_menu (module_t *prefs_module_p, gboolean preferences)
 
         label = g_strdup_printf ("%s Preferences...", prefs_module_p->description);
         menu_item = gtk_image_menu_item_new_with_label (label);
-        gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM(menu_item), 
+        gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM(menu_item),
                                        gtk_image_new_from_stock(GTK_STOCK_PREFERENCES, GTK_ICON_SIZE_MENU));
         gtk_menu_shell_append (GTK_MENU_SHELL(sub_menu), menu_item);
         g_signal_connect_swapped(GTK_OBJECT(menu_item), "activate",
@@ -3278,7 +3327,7 @@ menus_set_column_align_default (gboolean right_justify)
     GList       *child_list, *child_list_item;
     const gchar *menu_item_name;
     size_t       menu_item_len;
-    
+
     /* get the submenu container item */
     submenu = packet_list_heading_factory->widget;
 
@@ -3371,7 +3420,7 @@ set_menus_for_selected_tree_row(capture_file *cf)
                              (id == -1) ? FALSE : TRUE);
         set_menu_sensitivity(tree_view_menu_factory, "/Filter Field Reference",
                              (id == -1) ? FALSE : TRUE);
-        
+
         prev_abbrev = g_object_get_data(G_OBJECT(tree_view_menu_factory), "menu_abbrev");
         if (!prev_abbrev || (strcmp (prev_abbrev, abbrev) != 0)) {
             /* No previous protocol or protocol changed - update Protocol Preferences menu */
index 21363284141ce1018ca6264809cd542db65747fb..17d16357ee4c3381fbba1546bb2bdf9752e65be9 100644 (file)
@@ -173,7 +173,7 @@ gui_prefs_show(void)
        GtkWidget *show_version_cb;
        GtkWidget *webbrowser_te;
        GtkWidget *save_position_cb, *save_size_cb, *save_maximized_cb;
-#ifdef HAVE_IGE_MAC_INTEGRATION
+#if defined(HAVE_IGE_MAC_INTEGRATION) || defined(HAVE_GTKOSXAPPLICATION)
        GtkWidget *macosx_style_cb;
 #endif
 
@@ -232,10 +232,10 @@ gui_prefs_show(void)
            prefs.gui_geometry_save_maximized);
        g_object_set_data(G_OBJECT(main_vb), GEOMETRY_MAXIMIZED_KEY, save_maximized_cb);
 
-#ifdef HAVE_IGE_MAC_INTEGRATION
+#if defined(HAVE_IGE_MAC_INTEGRATION) || defined(HAVE_GTKOSXAPPLICATION)
        macosx_style_cb = create_preference_check_button(main_tb, pos++,
-           "MacOS X style", 
-           "Whether to create a MacOS X look and feel. Checking this box will move the "
+           "Mac OS X style", 
+           "Whether to create a Mac OS X look and feel. Checking this box will move the "
            "menu bar to the top of the screen instead of the top of the Wireshark window. "
            "Requires a restart of Wireshark to take effect.",
            prefs.gui_macosx_style);
@@ -408,7 +408,7 @@ gui_prefs_fetch(GtkWidget *w)
        prefs.gui_geometry_save_maximized =
            gtk_toggle_button_get_active(g_object_get_data(G_OBJECT(w), GEOMETRY_MAXIMIZED_KEY));
 
-#ifdef HAVE_IGE_MAC_INTEGRATION
+#if defined(HAVE_IGE_MAC_INTEGRATION) || defined(HAVE_GTKOSXAPPLICATION)
        prefs.gui_macosx_style =
            gtk_toggle_button_get_active(g_object_get_data(G_OBJECT(w), MACOSX_STYLE_KEY));
 #endif
index ab484cb88cc9dd0c4dc3cca173bc5d8c759fad6d..2fb40d0ac04b8d7cfb41245ee996cd97217db18a 100644 (file)
@@ -510,18 +510,18 @@ get_runtime_version_info(GString *str, void (*additional_info)(GString *))
 #ifdef HAVE_OS_X_FRAMEWORKS
                Gestalt(gestaltSystemVersion, &macosx_ver);
 
-               /* The following functions are only available in MacOS 10.4+ */
+               /* The following functions are only available in Mac OS 10.4+ */
                if(macosx_ver >= 0x1040) {
                        Gestalt(gestaltSystemVersionMajor, &macosx_major_ver);
                        Gestalt(gestaltSystemVersionMinor, &macosx_minor_ver);
                        Gestalt(gestaltSystemVersionBugFix, &macosx_bugfix_ver);
 
-                       g_string_append_printf(str, " (MacOS %ld.%ld.%ld)",
+                       g_string_append_printf(str, " (Mac OS %ld.%ld.%ld)",
                                          (long)macosx_major_ver,
                                          (long)macosx_minor_ver,
                                          (long)macosx_bugfix_ver);
                } else {
-                       g_string_append_printf(str, " (MacOS X < 10.4 [%lx])",
+                       g_string_append_printf(str, " (Mac OS X < 10.4 [%lx])",
                                          (long)macosx_ver);
                        /* See Apple's Gestalt Manager Reference for meanings
                         * of the macosx_ver values. */