Tweak Mac IGE integration detection so that it can find the functions not
authorStephen Fisher <steve@stephen-fisher.com>
Sun, 26 Oct 2008 20:09:54 +0000 (20:09 -0000)
committerStephen Fisher <steve@stephen-fisher.com>
Sun, 26 Oct 2008 20:09:54 +0000 (20:09 -0000)
only in the Gtk+ OS X framework, but also in the separate igemacintegration
library.  Also add call to ite_mac_menu_set_menu_bar() to synchronize the
OS X menu bar with the Gtk menu bar in Wireshark.  The Gtk menu bar in
Wireshark will remain there.

svn path=/trunk/; revision=26560

acinclude.m4
configure.in
gtk/main_menu.c

index a38d0d97dcb1ddea1f5700d598199b5f82e10f25..d2ef5a59e593a859a9685461cb6d182cdb7fc834 100644 (file)
@@ -1575,7 +1575,9 @@ fi
 #
 # AC_WIRESHARK_IGE_MAC_INTEGRATION_CHECK
 #
-# Checks for the presence of OS X integration functions in GTK+
+# 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
 #
 AC_DEFUN([AC_WIRESHARK_IGE_MAC_INTEGRATION_CHECK],
@@ -1584,11 +1586,10 @@ AC_DEFUN([AC_WIRESHARK_IGE_MAC_INTEGRATION_CHECK],
        ac_save_LIBS="$LIBS"
        CFLAGS="$CFLAGS $GTK_CFLAGS"
        LIBS="$GTK_LIBS $LIBS"
-       AC_CHECK_LIB(Gtk, ige_mac_menu_set_menu_bar,
+       AC_SEARCH_LIBS(ige_mac_menu_set_menu_bar, Gtk igemacintegration,
        [
                AC_DEFINE(HAVE_IGE_MAC_INTEGRATION, 1,
-                       [Define to 1 if the GTK+ library inclues the Imendio IGE Mac OS X Integration library.])
-               AC_CHECK_FUNCS(ige_mac_menu_install_key_handler)
+                       [Define to 1 if the the Gtk+ framework or a separate library inclues the Imendio IGE Mac OS X Integration functions.])
        ])
 ])
 
index 33f77298e228b9776395e37476453814f519cdcb..9a432a6b0317154ba138fd8b8f60eae00b8a3ff0 100644 (file)
@@ -680,7 +680,7 @@ 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 supported in GTK+@:>@]),
+                  [use IGE Mac integration. (@<:@default=yes, if available@:>@]),
 [
     if test $withval = no
     then
index bc627549779d1b434333f3b97b3b017ea58e7cea..cde567d31b41822b090085097e2ebc7cf59e4afc 100644 (file)
@@ -90,6 +90,9 @@
 #include "gtk/main_toolbar.h"
 #include "gtk/main_welcome.h"
 
+#ifdef HAVE_IGE_MAC_INTEGRATION
+#include <igemacintegration/ige-mac-menu.h>
+#endif
 
 typedef struct _menu_item {
     char    *name;
@@ -1047,6 +1050,10 @@ main_menu_new(GtkAccelGroup ** table) {
     if (table)
         *table = grp;
 
+#ifdef HAVE_IGE_MAC_INTEGRATION
+    ige_mac_menu_set_menu_bar(GTK_MENU_SHELL(menubar));
+#endif
+
     return menubar;
 }