summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <vantr@TheBully.local>2009-06-11 13:17:34 -0400
committerTristan Van Berkom <vantr@TheBully.local>2009-06-11 13:17:34 -0400
commit1e3d5d6598b38a19461a4060636081b908330f2f (patch)
tree25b1b930e72535534873cb024972a016af6ab919
parent9702a3429b28225eb1aeb980016003eeb8108106 (diff)
downloadglade-1e3d5d6598b38a19461a4060636081b908330f2f.tar.gz
* configure.ac, src/Makefile.am, src/glade-window.c: Use ige-mac-integration
if available for quartz builds (set the menubar as the application menu and correctly handle the quit button).
-rw-r--r--ChangeLog6
-rw-r--r--configure.ac14
-rw-r--r--src/Makefile.am3
-rw-r--r--src/glade-window.c18
4 files changed, 40 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index c4f79c1c..6d3684aa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-06-11 Tristan Van Berkom <tvb@gnome.org>
+
+ * configure.ac, src/Makefile.am, src/glade-window.c: Use ige-mac-integration
+ if available for quartz builds (set the menubar as the application menu and
+ correctly handle the quit button).
+
2009-06-06 Tristan Van Berkom <tvb@gnome.org>
* NEWS: Rolling Glade 3.6.4
diff --git a/configure.ac b/configure.ac
index ed95b875..2d8ad1ad 100644
--- a/configure.ac
+++ b/configure.ac
@@ -145,6 +145,7 @@ fi
AM_CONDITIONAL(BUILD_GNOME, test x"$have_gnome" = "xyes")
+
dnl ================================================================
dnl Python for optional python dev libs
dnl ================================================================
@@ -218,6 +219,17 @@ if test "$native_win32" = "yes"; then
fi
fi
+dnl ================================================================
+dnl Check for GDK Quartz and MacOSX integration package
+dnl ================================================================
+_gdk_tgt=`$PKG_CONFIG --variable=target gdk-2.0`
+AM_CONDITIONAL([GDK_TARGET_QUARTZ], [test x$_gdk_tgt = xquartz])
+if test "x$_gdk_tgt" = xquartz; then
+ PKG_CHECK_MODULES(IGE_MAC, ige-mac-integration)
+ AC_SUBST(IGE_MAC_LIBS)
+ AC_SUBST(IGE_MAC_CFLAGS)
+fi
+
AC_SUBST([AM_CPPFLAGS])
AC_SUBST([AM_CFLAGS])
AC_SUBST([AM_CXXFLAGS])
@@ -273,4 +285,6 @@ Configuration:
GTK+ UNIX Print Widgets: ${have_unix_print}
GNOME UI Widgets: ${have_gnome}
PYTHON Widgets support: ${have_python}
+
+ Build Reference Manual: ${enable_gtk_doc}
"
diff --git a/src/Makefile.am b/src/Makefile.am
index c783532a..4202205f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -10,12 +10,13 @@ glade_3_CPPFLAGS = \
glade_3_CFLAGS = \
$(GTK_CFLAGS) \
+ $(IGE_MAC_CFLAGS) \
$(WARN_CFLAGS) \
$(AM_CFLAGS)
glade_3_LDFLAGS = $(AM_LDFLAGS)
-glade_3_LDADD = $(top_builddir)/gladeui/libgladeui-1.la
+glade_3_LDADD = $(top_builddir)/gladeui/libgladeui-1.la $(IGE_MAC_LIBS)
glade_3_SOURCES = \
glade-window.c \
diff --git a/src/glade-window.c b/src/glade-window.c
index 3b8c2d52..53420d71 100644
--- a/src/glade-window.c
+++ b/src/glade-window.c
@@ -38,6 +38,11 @@
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
+#ifdef MAC_INTEGRATION
+# include <ige-mac-integration.h>
+#endif
+
+
#define ACTION_GROUP_STATIC "GladeStatic"
#define ACTION_GROUP_PROJECT "GladeProject"
#define ACTION_GROUP_PROJECTS_LIST_MENU "GladeProjectsList"
@@ -3172,6 +3177,19 @@ glade_window_init (GladeWindow *window)
/* Load widget state */
glade_window_config_load (window);
+
+#ifdef MAC_INTEGRATION
+ {
+ /* Fix up the menubar for MacOSX Quartz builds */
+ gtk_widget_hide (menubar);
+ ige_mac_menu_set_menu_bar (GTK_MENU_SHELL (menubar));
+
+ widget = gtk_ui_manager_get_widget (window->priv->ui, "/MenuBar/FileMenu/Quit");
+ ige_mac_menu_set_quit_menu_item (GTK_MENU_ITEM (widget));
+ }
+#endif
+
+
}
static void