[libgda] Started using the Ige-mac-integration library
- From: Vivien Malerba <vivien src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] Started using the Ige-mac-integration library
- Date: Sat, 29 May 2010 16:17:06 +0000 (UTC)
commit e41e9b9c560d1393e2124060dad200d8a1eea93b
Author: Vivien Malerba <malerba gnome-db org>
Date: Sat May 29 18:00:04 2010 +0200
Started using the Ige-mac-integration library
to better integrate the GdaBrowser tool in the MacOSX
environment
configure.in | 11 ++++++++++-
tools/browser/Makefile.am | 3 ++-
tools/browser/browser-window.c | 4 ++++
tools/browser/common/Makefile.am | 3 ++-
tools/browser/data-manager/Makefile.am | 3 ++-
tools/browser/dummy-perspective/Makefile.am | 3 ++-
tools/browser/main.c | 6 ++++--
tools/browser/query-exec/Makefile.am | 3 ++-
tools/browser/schema-browser/Makefile.am | 3 ++-
tools/browser/support.c | 5 +++++
tools/browser/support.h | 5 +++++
11 files changed, 40 insertions(+), 9 deletions(-)
---
diff --git a/configure.in b/configure.in
index 93d0592..0e32803 100644
--- a/configure.in
+++ b/configure.in
@@ -284,7 +284,7 @@ else
fi
dnl ******************************
-dnl Check for Win32
+dnl Check for Operating System
dnl ******************************
dnl linklibext is the shared link library extension, which varies by platform
@@ -294,6 +294,7 @@ EXPORT_UI_SYM_REGEX='-export-symbols-regex "^(gdaui_).*"'
AC_MSG_CHECKING([for platform])
platform_win32=no
platform_carbon=no
+have_ige=no
linklibext=".so"
case "$host" in
*-cygwin*)
@@ -331,6 +332,13 @@ case "$host" in
AC_DEFINE(ENABLE_BINRELOC)
br_cv_binreloc=yes
fi
+ PKG_CHECK_MODULES(MAC_INTEGRATION, ige-mac-integration, have_ige=yes, have_ige=no)
+ if test x"$have_ige" = "xyes"
+ then
+ AC_DEFINE(HAVE_MAC_INTEGRATION)
+ AC_SUBST(MAC_INTEGRATION_CFLAGS)
+ AC_SUBST(MAC_INTEGRATION_LIBS)
+ fi
LIBTOOL_EXPORT_OPTIONS=$EXPORT_SYM_REGEX
LIBTOOL_PROV_EXPORT_OPTIONS=$EXPORT_PROV_SYM_REGEX
LIBTOOL_UI_EXPORT_OPTIONS=$EXPORT_UI_SYM_REGEX
@@ -351,6 +359,7 @@ esac
AM_CONDITIONAL(PLATFORM_WIN32, [test $platform_win32 = yes])
AM_CONDITIONAL(PLATFORM_CARBON, [test $platform_carbon = yes])
+AM_CONDITIONAL(HAVE_IGE, [test $have_ige = yes])
AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
AC_SUBST(LIBTOOL_PROV_EXPORT_OPTIONS)
AC_SUBST(LIBTOOL_UI_EXPORT_OPTIONS)
diff --git a/tools/browser/Makefile.am b/tools/browser/Makefile.am
index 3a53c10..d1f2ba0 100644
--- a/tools/browser/Makefile.am
+++ b/tools/browser/Makefile.am
@@ -19,6 +19,7 @@ AM_CPPFLAGS = \
$(LIBGDA_CFLAGS) \
$(GTK_CFLAGS) \
$(GTKSOURCEVIEW_CFLAGS) \
+ $(MAC_INTEGRATION_CFLAGS) \
-DPREFIX=\""$(prefix)"\" \
-DSYSCONFDIR=\""$(sysconfdir)"\" \
-DDATADIR=\""$(datadir)"\" \
@@ -103,7 +104,7 @@ gda_browser_4_0_LDADD=\
common/libcommon.la \
$(top_builddir)/libgda/libgda-4.0.la \
$(top_builddir)/libgda-ui/libgda-ui-4.0.la \
- $(LIBGDA_LIBS) $(GTK_LIBS) $(GTKSOURCEVIEW_LIBS)
+ $(LIBGDA_LIBS) $(GTK_LIBS) $(GTKSOURCEVIEW_LIBS) $(MAC_INTEGRATION_LIBS)
@INTLTOOL_DESKTOP_RULE@
diff --git a/tools/browser/browser-window.c b/tools/browser/browser-window.c
index edf56f2..111b30b 100644
--- a/tools/browser/browser-window.c
+++ b/tools/browser/browser-window.c
@@ -383,8 +383,12 @@ browser_window_new (BrowserConnection *bcnc, BrowserPerspectiveFactory *factory)
gtk_window_add_accel_group (GTK_WINDOW (bwin), accel_group);
menubar = gtk_ui_manager_get_widget (ui, "/MenuBar");
+#ifdef HAVE_MAC_INTEGRATION
+ gtk_osxapplication_set_menu_bar (theApp, GTK_MENU_SHELL (menubar));
+#else
gtk_box_pack_start (GTK_BOX (vbox), menubar, FALSE, FALSE, 0);
gtk_widget_show (menubar);
+#endif
toolbar = gtk_ui_manager_get_widget (ui, "/ToolBar");
gtk_box_pack_start (GTK_BOX (vbox), toolbar, FALSE, TRUE, 0);
diff --git a/tools/browser/common/Makefile.am b/tools/browser/common/Makefile.am
index 6bd5396..d345d7d 100644
--- a/tools/browser/common/Makefile.am
+++ b/tools/browser/common/Makefile.am
@@ -6,7 +6,8 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/libgda \
-DPRIV_OBJ_PREFIX="\"BROWSER\"" \
$(LIBGDA_CFLAGS) \
- $(GTK_CFLAGS)
+ $(GTK_CFLAGS) \
+ $(MAC_INTEGRATION_CFLAGS)
marshal.h: marshal.list $(GLIB_GENMARSHAL)
$(GLIB_GENMARSHAL) $< --header --prefix=_common_marshal > $@
diff --git a/tools/browser/data-manager/Makefile.am b/tools/browser/data-manager/Makefile.am
index 275bf61..054eb53 100644
--- a/tools/browser/data-manager/Makefile.am
+++ b/tools/browser/data-manager/Makefile.am
@@ -7,7 +7,8 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/libgda \
$(LIBGDA_CFLAGS) \
$(GTK_CFLAGS) \
- $(GTKSOURCEVIEW_CFLAGS)
+ $(GTKSOURCEVIEW_CFLAGS) \
+ $(MAC_INTEGRATION_CFLAGS)
marshal.h: marshal.list $(GLIB_GENMARSHAL)
$(GLIB_GENMARSHAL) $< --header --prefix=_dm_marshal > $@
diff --git a/tools/browser/dummy-perspective/Makefile.am b/tools/browser/dummy-perspective/Makefile.am
index 4f01910..179dd1c 100644
--- a/tools/browser/dummy-perspective/Makefile.am
+++ b/tools/browser/dummy-perspective/Makefile.am
@@ -6,7 +6,8 @@ AM_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_srcdir)/libgda \
$(LIBGDA_CFLAGS) \
- $(GTK_CFLAGS)
+ $(GTK_CFLAGS) \
+ $(MAC_INTEGRATION_CFLAGS)
libperspective_la_SOURCES = \
perspective-main.c \
diff --git a/tools/browser/main.c b/tools/browser/main.c
index ef8f74e..88ea6d9 100644
--- a/tools/browser/main.c
+++ b/tools/browser/main.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 The GNOME Foundation.
+ * Copyright (C) 2009 - 2010 The GNOME Foundation.
*
* AUTHORS:
* Vivien Malerba <malerba gnome-db org>
@@ -37,7 +37,6 @@
#include "data-manager/perspective-main.h"
/* #include "dummy-perspective/perspective-main.h" */
-
extern BrowserCoreInitFactories browser_core_init_factories;
GSList *
@@ -81,6 +80,9 @@ main (int argc, char *argv[])
gdaui_init ();
gtk_init (&argc, &argv);
+#ifdef HAVE_MAC_INTEGRATION
+ theApp = g_object_new (GTK_TYPE_OSX_APPLICATION, NULL);
+#endif
browser_stock_icons_init ();
browser_core_set_default_factory (perspective);
diff --git a/tools/browser/query-exec/Makefile.am b/tools/browser/query-exec/Makefile.am
index c13abdf..2204f66 100644
--- a/tools/browser/query-exec/Makefile.am
+++ b/tools/browser/query-exec/Makefile.am
@@ -7,7 +7,8 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/libgda \
$(LIBGDA_CFLAGS) \
$(GTK_CFLAGS) \
- $(GTKSOURCEVIEW_CFLAGS)
+ $(GTKSOURCEVIEW_CFLAGS) \
+ $(MAC_INTEGRATION_CFLAGS)
marshal.h: marshal.list $(GLIB_GENMARSHAL)
$(GLIB_GENMARSHAL) $< --header --prefix=_qe_marshal > $@
diff --git a/tools/browser/schema-browser/Makefile.am b/tools/browser/schema-browser/Makefile.am
index 1553c5f..65115ba 100644
--- a/tools/browser/schema-browser/Makefile.am
+++ b/tools/browser/schema-browser/Makefile.am
@@ -6,7 +6,8 @@ AM_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_srcdir)/libgda \
$(LIBGDA_CFLAGS) \
- $(GTK_CFLAGS)
+ $(GTK_CFLAGS) \
+ $(MAC_INTEGRATION_CFLAGS)
marshal.h: marshal.list $(GLIB_GENMARSHAL)
$(GLIB_GENMARSHAL) $< --header --prefix=_sb_marshal > $@
diff --git a/tools/browser/support.c b/tools/browser/support.c
index 675c706..0fda728 100644
--- a/tools/browser/support.c
+++ b/tools/browser/support.c
@@ -27,6 +27,11 @@
#include "browser-window.h"
#include "login-dialog.h"
+#ifdef HAVE_MAC_INTEGRATION
+#include <gtkosxapplication.h>
+GtkOSXApplication *theApp = NULL;
+#endif
+
/**
* Display a login dialog and, if validated, create a new #BrowserConnection
*
diff --git a/tools/browser/support.h b/tools/browser/support.h
index 3066c4b..4ddcd5f 100644
--- a/tools/browser/support.h
+++ b/tools/browser/support.h
@@ -26,6 +26,11 @@
#include <gtk/gtk.h>
#include "browser-connection.h"
+#ifdef HAVE_MAC_INTEGRATION
+#include <gtkosxapplication.h>
+extern GtkOSXApplication *theApp;
+#endif
+
G_BEGIN_DECLS
BrowserConnection *browser_connection_open (GError **error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]