mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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 BP git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21398 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
414c92669e
commit
4c6d5a178c
16
configure.ac
16
configure.ac
@ -276,15 +276,15 @@ update to latest darwin])
|
||||
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
|
||||
|
@ -19,7 +19,7 @@ AM_CPPFLAGS = -I${top_builddir} ${GLIB_CFLAGS} ${GNOME_CFLAGS} ${GTK_CFLAGS} \
|
||||
-I${top_srcdir}/src/gnc-module \
|
||||
-I${top_srcdir}/src/libqof/qof \
|
||||
${GUILE_INCS} \
|
||||
${IGE_MAC_CFLAGS}
|
||||
${GTK_MAC_CFLAGS}
|
||||
|
||||
SUFFIXES = .rc .res
|
||||
|
||||
|
@ -20,7 +20,7 @@ libgnc_core_utils_la_LIBADD = \
|
||||
${GUILE_LIBS} \
|
||||
${GLIB_LIBS} \
|
||||
${BINRELOC_LIBS} \
|
||||
${IGE_MAC_LIBS} \
|
||||
${GTK_MAC_LIBS} \
|
||||
${GCONF_LIBS} \
|
||||
${QOF_LIBS}
|
||||
|
||||
@ -47,7 +47,7 @@ AM_CPPFLAGS = \
|
||||
${GUILE_INCS} \
|
||||
${GLIB_CFLAGS} \
|
||||
${GCONF_CFLAGS} \
|
||||
${IGE_MAC_CFLAGS} \
|
||||
${GTK_MAC_CFLAGS} \
|
||||
${QOF_CFLAGS} \
|
||||
-I${top_srcdir}/src/libqof/qof \
|
||||
-I${top_builddir}/src \
|
||||
|
@ -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 @@ _br_find_exe (Gnc_GbrInitError *error)
|
||||
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;
|
||||
|
@ -23,7 +23,7 @@ AM_CPPFLAGS = \
|
||||
${QOF_CFLAGS} \
|
||||
${GOFFICE_CFLAGS} \
|
||||
${LIBGDA_CFLAGS} \
|
||||
${IGE_MAC_CFLAGS}
|
||||
${GTK_MAC_CFLAGS}
|
||||
|
||||
libgncmod_gnome_utils_la_SOURCES = \
|
||||
account-quickfill.c \
|
||||
@ -204,7 +204,7 @@ libgncmod_gnome_utils_la_LIBADD = \
|
||||
${DB_LIBS} \
|
||||
${REGEX_LIBS} \
|
||||
${LIBXML2_LIBS} \
|
||||
${IGE_MAC_LIBS}
|
||||
${GTK_MAC_LIBS}
|
||||
|
||||
if HAVE_X11_XLIB_H
|
||||
libgncmod_gnome_utils_la_LIBADD += -lX11
|
||||
|
@ -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. */
|
||||
@ -3456,23 +3456,20 @@ gnc_quartz_set_menu(GncMainWindow* window)
|
||||
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));
|
||||
|
||||
/* 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));
|
||||
{
|
||||
gtk_osxapplication_insert_app_menu_item (theApp,
|
||||
gtk_separator_menu_item_new (),
|
||||
0);
|
||||
gtk_osxapplication_insert_app_menu_item (theApp, GTK_WIDGET (item), 0);
|
||||
}
|
||||
|
||||
item = gtk_ui_manager_get_widget (window->ui_merge,
|
||||
"/menubar/Help");
|
||||
|
@ -123,7 +123,7 @@ AM_CPPFLAGS = \
|
||||
${GNOME_CFLAGS} \
|
||||
${GLADE_CFLAGS} \
|
||||
$(GLIB_CFLAGS) \
|
||||
${IGE_MAC_CFLAGS}
|
||||
${GTK_MAC_CFLAGS}
|
||||
|
||||
# We build this in an earlier directory.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user