Commit 0b52d2f9 authored by Stephan Sundermann's avatar Stephan Sundermann Committed by Andrés G. Aragoneses

osx: Update gtk-mac-integration to 2.0.7 (bgo#749839)

The current gtk-mac-integration needed for Banshee was
already 4 years old and doesn't compile anymore on osx 10.10.

The functions are now prefixed with gtkosx_ instead of gtk_osx.
From version 2.0.7 gtk-mac-integration is now split into two
libraries for gtk2 and gtk3.

Also update the configure check to test for the gtk3 version.

The relevant bockbuild commit that syncs with this change is:
https://github.com/BansheeMediaPlayer/bockbuild/commit/d1709f6193f65fa5fbbdc5bf92a9e148a8ffa700Signed-off-by: 's avatarAndrés G. Aragoneses <knocte@gmail.com>
parent ce777f1d
......@@ -36,7 +36,7 @@ $(ASSEMBLY_FILE): $(SOURCES_BUILD) $(RESOURCES_EXPANDED) $(DEP_LINK) $(DLL_MAP_V
@mkdir -p $(top_builddir)/bin
@if [ ! "x$(ENABLE_RELEASE)" = "xyes" ]; then \
$(top_srcdir)/build/dll-map-makefile-verifier $(srcdir)/Makefile.am $(srcdir)/$(notdir $@.config) && \
$(MONO) $(top_builddir)/build/dll-map-verifier.exe $(srcdir)/$(notdir $@.config) -iwinmm -ilibbanshee -ilibbnpx11 -ilibc -ilibc.so.6 -iintl -ilibmtp.dll -ilibgtkmacintegration.dylib -iCFRelease $(SOURCES_BUILD); \
$(MONO) $(top_builddir)/build/dll-map-verifier.exe $(srcdir)/$(notdir $@.config) -iwinmm -ilibbanshee -ilibbnpx11 -ilibc -ilibc.so.6 -iintl -ilibmtp.dll -ilibgtkmacintegration-gtk3.dylib -iCFRelease $(SOURCES_BUILD); \
fi;
$(MCS) \
$(MCS_FLAGS) \
......
......@@ -3,7 +3,7 @@ AC_DEFUN([BANSHEE_CHECK_OSX],
enable_osx="no"
if test "x${host_os%${host_os#??????}}" = "xdarwin"; then
enable_osx="yes"
PKG_CHECK_MODULES(GTKMACINTEGRATION, gtk-mac-integration >= 1.0.1)
PKG_CHECK_MODULES(GTKMACINTEGRATION, gtk-mac-integration-gtk3 >= 2.0.7)
PKG_CHECK_MODULES(MONOMAC, monomac >= 0.7)
MONOMAC_ASSEMBLIES=`$PKG_CONFIG --variable=Libraries monomac`
AC_SUBST(MONOMAC_LIBS)
......
......@@ -40,15 +40,14 @@ namespace OsxIntegration.GtkOsxApplication
public GtkOsxApplication ()
{
IntPtr osx_app = gtk_osxapplication_get_type ();
IntPtr osx_app = gtkosx_application_get_type ();
theApp = new GLib.GType (osx_app).Val;
}
// Takes the Gtk.MenuShell and sets it as OS X application menu
public void SetMenu (MenuShell shell)
{
gtk_osxapplication_set_menu_bar (theApp, shell.Handle);
gtkosx_application_set_menu_bar (theApp, shell.Handle);
}
// Places MenuItems into the OS X specific "Application" menu
......@@ -57,18 +56,18 @@ namespace OsxIntegration.GtkOsxApplication
// dialog in there
public void InsertIntoAppMenu (MenuItem item, int index)
{
gtk_osxapplication_insert_app_menu_item (theApp, item.Handle, index);
gtk_osxapplication_sync_menubar (theApp);
gtkosx_application_insert_app_menu_item (theApp, item.Handle, index);
gtkosx_application_sync_menubar (theApp);
}
public void SetWindowMenu (MenuItem item)
{
gtk_osxapplication_set_window_menu (theApp, item.Handle);
gtk_osxapplication_sync_menubar (theApp);
gtkosx_application_set_window_menu (theApp, item.Handle);
gtkosx_application_sync_menubar (theApp);
}
public void Ready ()
{
gtk_osxapplication_ready (theApp);
gtkosx_application_ready (theApp);
}
// Bindings against native gtk-mac-integration/GtkOSXApplication
......@@ -76,28 +75,28 @@ namespace OsxIntegration.GtkOsxApplication
// for documentation of these functions, see:
// http://gtk-osx.sourceforge.net/ige-mac-integration/GtkOSXApplication.html
private const string GtkMacIntegrationLibrary = "libgtkmacintegration.dylib";
private const string GtkMacIntegrationLibrary = "libgtkmacintegration-gtk3.dylib";
[DllImport (GtkMacIntegrationLibrary)]
protected extern static IntPtr gtk_osxapplication_get_type ();
protected extern static IntPtr gtkosx_application_get_type ();
[DllImport (GtkMacIntegrationLibrary)]
protected extern static void gtk_osxapplication_ready (IntPtr app);
protected extern static void gtkosx_application_ready (IntPtr app);
[DllImport (GtkMacIntegrationLibrary)]
protected extern static void gtk_osxapplication_set_menu_bar (IntPtr app, IntPtr menu_shell);
protected extern static void gtkosx_application_set_menu_bar (IntPtr app, IntPtr menu_shell);
[DllImport (GtkMacIntegrationLibrary)]
protected extern static void gtk_osxapplication_insert_app_menu_item (IntPtr app, IntPtr menu_item, int index);
protected extern static void gtkosx_application_insert_app_menu_item (IntPtr app, IntPtr menu_item, int index);
[DllImport (GtkMacIntegrationLibrary)]
protected extern static void gtk_osxapplication_sync_menubar (IntPtr app);
protected extern static void gtkosx_application_sync_menubar (IntPtr app);
[DllImport (GtkMacIntegrationLibrary)]
protected extern static void gtk_osxapplication_set_dock_menu (IntPtr app, IntPtr menu_shell);
protected extern static void gtkosx_application_set_dock_menu (IntPtr app, IntPtr menu_shell);
[DllImport (GtkMacIntegrationLibrary)]
protected extern static void gtk_osxapplication_set_window_menu (IntPtr app, IntPtr menu_item);
protected extern static void gtkosx_application_set_window_menu (IntPtr app, IntPtr menu_item);
// TODO add more functions from GtkOsxApplication
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment