r21399 - gnucash/branches/2.4 - [r21398] Update Mac customizations for gtk-mac-integration-1.0.0
John Ralls
jralls at code.gnucash.org
Sat Oct 8 15:16:25 EDT 2011
Author: jralls
Date: 2011-10-08 15:16:25 -0400 (Sat, 08 Oct 2011)
New Revision: 21399
Trac: http://svn.gnucash.org/trac/changeset/21399
Modified:
gnucash/branches/2.4/configure.ac
gnucash/branches/2.4/src/bin/Makefile.am
gnucash/branches/2.4/src/core-utils/Makefile.am
gnucash/branches/2.4/src/core-utils/binreloc.c
gnucash/branches/2.4/src/gnome-utils/Makefile.am
gnucash/branches/2.4/src/gnome-utils/gnc-main-window.c
gnucash/branches/2.4/src/gnome/Makefile.am
Log:
[r21398] Update Mac customizations for gtk-mac-integration-1.0.0
Mac integration has had a name and api change from
ige-mac-integration as part of migration from Sourceforge to
Gnome.
Also, gtk_osxapplication_add_app_menu_item() has been replaced
with gtk_osxapplication_insert_menu_item(),
gtk_osxapplication_add_app_menu_group() has been removed (just
insert a separator where you want it), and gtk_osxapplication
path functions had been deprecated in favor of quartz-application
equivalents; those deprecated convenience macros were removed in
1.0.0
Modified: gnucash/branches/2.4/configure.ac
===================================================================
--- gnucash/branches/2.4/configure.ac 2011-10-08 19:14:01 UTC (rev 21398)
+++ gnucash/branches/2.4/configure.ac 2011-10-08 19:16:25 UTC (rev 21399)
@@ -299,15 +299,15 @@
platform=darwin/quartz
AC_MSG_RESULT(yes)
AC_DEFINE(GDK_QUARTZ,,[Using GDK Quartz (not X11)])
- PKG_CHECK_MODULES([IGE_MAC], ige-mac-integration,
- [_ige_mac=yes], [_ige_mac=no])
- if test "x$_ige_mac" = xyes; then
- IGE_MAC_LIBS="${IGE_MAC_LIBS} -lobjc"
- IGE_MAC_CFLAGS="${IGE_MAC_CFLAGS} -xobjective-c"
+ PKG_CHECK_MODULES([GTK_MAC], gtk-mac-integration,
+ [_gtk_mac=yes], [_gtk_mac=no])
+ if test "x$_gtk_mac" = xyes; then
+ GTK_MAC_LIBS="${GTK_MAC_LIBS} -lobjc"
+ GTK_MAC_CFLAGS="${GTK_MAC_CFLAGS} -xobjective-c"
fi
- AC_MSG_RESULT(${_ige_mac})
- AC_SUBST(IGE_MAC_LIBS)
- AC_SUBST(IGE_MAC_CFLAGS)
+ AC_MSG_RESULT(${_gtk_mac})
+ AC_SUBST(GTK_MAC_LIBS)
+ AC_SUBST(GTK_MAC_CFLAGS)
else
AC_MSG_RESULT(no)
fi
Modified: gnucash/branches/2.4/src/bin/Makefile.am
===================================================================
--- gnucash/branches/2.4/src/bin/Makefile.am 2011-10-08 19:14:01 UTC (rev 21398)
+++ gnucash/branches/2.4/src/bin/Makefile.am 2011-10-08 19:16:25 UTC (rev 21399)
@@ -19,7 +19,7 @@
-I${top_srcdir}/src/gnc-module \
-I${top_srcdir}/src/libqof/qof \
${GUILE_INCS} \
- ${IGE_MAC_CFLAGS}
+ ${GTK_MAC_CFLAGS}
SUFFIXES = .rc .res
Modified: gnucash/branches/2.4/src/core-utils/Makefile.am
===================================================================
--- gnucash/branches/2.4/src/core-utils/Makefile.am 2011-10-08 19:14:01 UTC (rev 21398)
+++ gnucash/branches/2.4/src/core-utils/Makefile.am 2011-10-08 19:16:25 UTC (rev 21399)
@@ -20,7 +20,7 @@
${GUILE_LIBS} \
${GLIB_LIBS} \
${BINRELOC_LIBS} \
- ${IGE_MAC_LIBS} \
+ ${GTK_MAC_LIBS} \
${GCONF_LIBS} \
${QOF_LIBS}
@@ -47,7 +47,7 @@
${GUILE_INCS} \
${GLIB_CFLAGS} \
${GCONF_CFLAGS} \
- ${IGE_MAC_CFLAGS} \
+ ${GTK_MAC_CFLAGS} \
${QOF_CFLAGS} \
-I${top_srcdir}/src/libqof/qof \
-I${top_builddir}/src \
Modified: gnucash/branches/2.4/src/core-utils/binreloc.c
===================================================================
--- gnucash/branches/2.4/src/core-utils/binreloc.c 2011-10-08 19:14:01 UTC (rev 21398)
+++ gnucash/branches/2.4/src/core-utils/binreloc.c 2011-10-08 19:16:25 UTC (rev 21399)
@@ -19,7 +19,7 @@
#include <sys/stat.h>
#include <unistd.h>
#ifdef MAC_INTEGRATION
-#include <igemacintegration/gtkosxapplication.h>
+#include <gtkmacintegration/gtkosxapplication.h>
#endif
#endif /* ENABLE_BINRELOC */
#include <stdio.h>
@@ -63,10 +63,9 @@
g_free (prefix);
return result;
#elif defined MAC_INTEGRATION
- GtkOSXApplication *theApp;
- g_type_init();
- theApp = g_object_new (GTK_TYPE_OSX_APPLICATION, NULL);
- return gtk_osxapplication_get_executable_path(theApp);
+ gchar *path = quartz_application_get_executable_path();
+ g_print ("Application Path %s\n", path);
+ return path;
#else
char *path, *path2, *line, *result;
size_t buf_size;
Modified: gnucash/branches/2.4/src/gnome/Makefile.am
===================================================================
--- gnucash/branches/2.4/src/gnome/Makefile.am 2011-10-08 19:14:01 UTC (rev 21398)
+++ gnucash/branches/2.4/src/gnome/Makefile.am 2011-10-08 19:16:25 UTC (rev 21399)
@@ -123,7 +123,7 @@
${GNOME_CFLAGS} \
${GLADE_CFLAGS} \
$(GLIB_CFLAGS) \
- ${IGE_MAC_CFLAGS}
+ ${GTK_MAC_CFLAGS}
# We build this in an earlier directory.
Modified: gnucash/branches/2.4/src/gnome-utils/Makefile.am
===================================================================
--- gnucash/branches/2.4/src/gnome-utils/Makefile.am 2011-10-08 19:14:01 UTC (rev 21398)
+++ gnucash/branches/2.4/src/gnome-utils/Makefile.am 2011-10-08 19:16:25 UTC (rev 21399)
@@ -23,7 +23,7 @@
${QOF_CFLAGS} \
${GOFFICE_CFLAGS} \
${LIBGDA_CFLAGS} \
- ${IGE_MAC_CFLAGS}
+ ${GTK_MAC_CFLAGS}
libgncmod_gnome_utils_la_SOURCES = \
account-quickfill.c \
@@ -198,7 +198,7 @@
${DB_LIBS} \
${REGEX_LIBS} \
${LIBXML2_LIBS} \
- ${IGE_MAC_LIBS}
+ ${GTK_MAC_LIBS}
if HAVE_X11_XLIB_H
libgncmod_gnome_utils_la_LIBADD += -lX11
Modified: gnucash/branches/2.4/src/gnome-utils/gnc-main-window.c
===================================================================
--- gnucash/branches/2.4/src/gnome-utils/gnc-main-window.c 2011-10-08 19:14:01 UTC (rev 21398)
+++ gnucash/branches/2.4/src/gnome-utils/gnc-main-window.c 2011-10-08 19:16:25 UTC (rev 21399)
@@ -69,7 +69,7 @@
#include "gnc-autosave.h"
#include "print-session.h"
#ifdef MAC_INTEGRATION
-#include <igemacintegration/gtkosxapplication.h>
+#include <gtkmacintegration/gtkosxapplication.h>
#endif
/** Names of signals generated by the main window. */
@@ -3435,25 +3435,22 @@
if (GTK_IS_MENU_ITEM (item))
gtk_widget_hide (GTK_WIDGET (item));
- /* the about group */
- group = gtk_osxapplication_add_app_menu_group (theApp);
+ item = gtk_ui_manager_get_widget (window->ui_merge,
+ "/menubar/Edit/EditPreferences");
+ if (GTK_IS_MENU_ITEM (item))
+ gtk_osxapplication_insert_app_menu_item (theApp, GTK_WIDGET (item), 0);
item = gtk_ui_manager_get_widget (window->ui_merge,
"/menubar/Help/HelpAbout");
if (GTK_IS_MENU_ITEM (item))
- gtk_osxapplication_add_app_menu_item (theApp, group,
- GTK_MENU_ITEM (item));
+ {
+ gtk_osxapplication_insert_app_menu_item (theApp,
+ gtk_separator_menu_item_new (),
+ 0);
+ gtk_osxapplication_insert_app_menu_item (theApp, GTK_WIDGET (item), 0);
+ }
- /* the preferences group */
- group = gtk_osxapplication_add_app_menu_group (theApp);
-
item = gtk_ui_manager_get_widget (window->ui_merge,
- "/menubar/Edit/EditPreferences");
- if (GTK_IS_MENU_ITEM (item))
- gtk_osxapplication_add_app_menu_item (theApp, group,
- GTK_MENU_ITEM (item));
-
- item = gtk_ui_manager_get_widget (window->ui_merge,
"/menubar/Help");
gtk_osxapplication_set_help_menu(theApp, GTK_MENU_ITEM(item));
item = gtk_ui_manager_get_widget (window->ui_merge,
More information about the gnucash-changes
mailing list