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
|
platform=darwin/quartz
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(GDK_QUARTZ,,[Using GDK Quartz (not X11)])
|
AC_DEFINE(GDK_QUARTZ,,[Using GDK Quartz (not X11)])
|
||||||
PKG_CHECK_MODULES([IGE_MAC], ige-mac-integration,
|
PKG_CHECK_MODULES([GTK_MAC], gtk-mac-integration,
|
||||||
[_ige_mac=yes], [_ige_mac=no])
|
[_gtk_mac=yes], [_gtk_mac=no])
|
||||||
if test "x$_ige_mac" = xyes; then
|
if test "x$_gtk_mac" = xyes; then
|
||||||
IGE_MAC_LIBS="${IGE_MAC_LIBS} -lobjc"
|
GTK_MAC_LIBS="${GTK_MAC_LIBS} -lobjc"
|
||||||
IGE_MAC_CFLAGS="${IGE_MAC_CFLAGS} -xobjective-c"
|
GTK_MAC_CFLAGS="${GTK_MAC_CFLAGS} -xobjective-c"
|
||||||
fi
|
fi
|
||||||
AC_MSG_RESULT(${_ige_mac})
|
AC_MSG_RESULT(${_gtk_mac})
|
||||||
AC_SUBST(IGE_MAC_LIBS)
|
AC_SUBST(GTK_MAC_LIBS)
|
||||||
AC_SUBST(IGE_MAC_CFLAGS)
|
AC_SUBST(GTK_MAC_CFLAGS)
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
fi
|
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/gnc-module \
|
||||||
-I${top_srcdir}/src/libqof/qof \
|
-I${top_srcdir}/src/libqof/qof \
|
||||||
${GUILE_INCS} \
|
${GUILE_INCS} \
|
||||||
${IGE_MAC_CFLAGS}
|
${GTK_MAC_CFLAGS}
|
||||||
|
|
||||||
SUFFIXES = .rc .res
|
SUFFIXES = .rc .res
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ libgnc_core_utils_la_LIBADD = \
|
|||||||
${GUILE_LIBS} \
|
${GUILE_LIBS} \
|
||||||
${GLIB_LIBS} \
|
${GLIB_LIBS} \
|
||||||
${BINRELOC_LIBS} \
|
${BINRELOC_LIBS} \
|
||||||
${IGE_MAC_LIBS} \
|
${GTK_MAC_LIBS} \
|
||||||
${GCONF_LIBS} \
|
${GCONF_LIBS} \
|
||||||
${QOF_LIBS}
|
${QOF_LIBS}
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ AM_CPPFLAGS = \
|
|||||||
${GUILE_INCS} \
|
${GUILE_INCS} \
|
||||||
${GLIB_CFLAGS} \
|
${GLIB_CFLAGS} \
|
||||||
${GCONF_CFLAGS} \
|
${GCONF_CFLAGS} \
|
||||||
${IGE_MAC_CFLAGS} \
|
${GTK_MAC_CFLAGS} \
|
||||||
${QOF_CFLAGS} \
|
${QOF_CFLAGS} \
|
||||||
-I${top_srcdir}/src/libqof/qof \
|
-I${top_srcdir}/src/libqof/qof \
|
||||||
-I${top_builddir}/src \
|
-I${top_builddir}/src \
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#ifdef MAC_INTEGRATION
|
#ifdef MAC_INTEGRATION
|
||||||
#include <igemacintegration/gtkosxapplication.h>
|
#include <gtkmacintegration/gtkosxapplication.h>
|
||||||
#endif
|
#endif
|
||||||
#endif /* ENABLE_BINRELOC */
|
#endif /* ENABLE_BINRELOC */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -63,10 +63,9 @@ _br_find_exe (Gnc_GbrInitError *error)
|
|||||||
g_free (prefix);
|
g_free (prefix);
|
||||||
return result;
|
return result;
|
||||||
#elif defined MAC_INTEGRATION
|
#elif defined MAC_INTEGRATION
|
||||||
GtkOSXApplication *theApp;
|
gchar *path = quartz_application_get_executable_path();
|
||||||
g_type_init();
|
g_print ("Application Path %s\n", path);
|
||||||
theApp = g_object_new (GTK_TYPE_OSX_APPLICATION, NULL);
|
return path;
|
||||||
return gtk_osxapplication_get_executable_path(theApp);
|
|
||||||
#else
|
#else
|
||||||
char *path, *path2, *line, *result;
|
char *path, *path2, *line, *result;
|
||||||
size_t buf_size;
|
size_t buf_size;
|
||||||
|
@ -23,7 +23,7 @@ AM_CPPFLAGS = \
|
|||||||
${QOF_CFLAGS} \
|
${QOF_CFLAGS} \
|
||||||
${GOFFICE_CFLAGS} \
|
${GOFFICE_CFLAGS} \
|
||||||
${LIBGDA_CFLAGS} \
|
${LIBGDA_CFLAGS} \
|
||||||
${IGE_MAC_CFLAGS}
|
${GTK_MAC_CFLAGS}
|
||||||
|
|
||||||
libgncmod_gnome_utils_la_SOURCES = \
|
libgncmod_gnome_utils_la_SOURCES = \
|
||||||
account-quickfill.c \
|
account-quickfill.c \
|
||||||
@ -204,7 +204,7 @@ libgncmod_gnome_utils_la_LIBADD = \
|
|||||||
${DB_LIBS} \
|
${DB_LIBS} \
|
||||||
${REGEX_LIBS} \
|
${REGEX_LIBS} \
|
||||||
${LIBXML2_LIBS} \
|
${LIBXML2_LIBS} \
|
||||||
${IGE_MAC_LIBS}
|
${GTK_MAC_LIBS}
|
||||||
|
|
||||||
if HAVE_X11_XLIB_H
|
if HAVE_X11_XLIB_H
|
||||||
libgncmod_gnome_utils_la_LIBADD += -lX11
|
libgncmod_gnome_utils_la_LIBADD += -lX11
|
||||||
|
@ -69,7 +69,7 @@
|
|||||||
#include "gnc-autosave.h"
|
#include "gnc-autosave.h"
|
||||||
#include "print-session.h"
|
#include "print-session.h"
|
||||||
#ifdef MAC_INTEGRATION
|
#ifdef MAC_INTEGRATION
|
||||||
#include <igemacintegration/gtkosxapplication.h>
|
#include <gtkmacintegration/gtkosxapplication.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Names of signals generated by the main window. */
|
/** Names of signals generated by the main window. */
|
||||||
@ -3456,23 +3456,20 @@ gnc_quartz_set_menu(GncMainWindow* window)
|
|||||||
if (GTK_IS_MENU_ITEM (item))
|
if (GTK_IS_MENU_ITEM (item))
|
||||||
gtk_widget_hide (GTK_WIDGET (item));
|
gtk_widget_hide (GTK_WIDGET (item));
|
||||||
|
|
||||||
/* the about group */
|
item = gtk_ui_manager_get_widget (window->ui_merge,
|
||||||
group = gtk_osxapplication_add_app_menu_group (theApp);
|
"/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,
|
item = gtk_ui_manager_get_widget (window->ui_merge,
|
||||||
"/menubar/Help/HelpAbout");
|
"/menubar/Help/HelpAbout");
|
||||||
if (GTK_IS_MENU_ITEM (item))
|
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 (),
|
||||||
/* the preferences group */
|
0);
|
||||||
group = gtk_osxapplication_add_app_menu_group (theApp);
|
gtk_osxapplication_insert_app_menu_item (theApp, GTK_WIDGET (item), 0);
|
||||||
|
}
|
||||||
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,
|
item = gtk_ui_manager_get_widget (window->ui_merge,
|
||||||
"/menubar/Help");
|
"/menubar/Help");
|
||||||
|
@ -123,7 +123,7 @@ AM_CPPFLAGS = \
|
|||||||
${GNOME_CFLAGS} \
|
${GNOME_CFLAGS} \
|
||||||
${GLADE_CFLAGS} \
|
${GLADE_CFLAGS} \
|
||||||
$(GLIB_CFLAGS) \
|
$(GLIB_CFLAGS) \
|
||||||
${IGE_MAC_CFLAGS}
|
${GTK_MAC_CFLAGS}
|
||||||
|
|
||||||
# We build this in an earlier directory.
|
# We build this in an earlier directory.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user