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



commit 0b52d2f9470ac76ae465cabdb08fa8ec13848ade
Author: Stephan Sundermann <stephansundermann gmail com>
Date:   Tue Jun 2 12:24:27 2015 +0200

    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/d1709f6193f65fa5fbbdc5bf92a9e148a8ffa700
    
    Signed-off-by: Andrés G. Aragoneses <knocte gmail com>

 build/build.rules.mk                               |    2 +-
 build/m4/banshee/osx.m4                            |    2 +-
 .../GtkOsxApplication.cs                           |   31 +++++++++----------
 3 files changed, 17 insertions(+), 18 deletions(-)
---
diff --git a/build/build.rules.mk b/build/build.rules.mk
index 1066de3..ef34f45 100644
--- a/build/build.rules.mk
+++ b/build/build.rules.mk
@@ -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) \
diff --git a/build/m4/banshee/osx.m4 b/build/m4/banshee/osx.m4
index 4eee7cc..0496b7f 100644
--- a/build/m4/banshee/osx.m4
+++ b/build/m4/banshee/osx.m4
@@ -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)
diff --git a/src/Backends/Banshee.Osx/OsxIntegration.GtkOsxApplication/GtkOsxApplication.cs 
b/src/Backends/Banshee.Osx/OsxIntegration.GtkOsxApplication/GtkOsxApplication.cs
index de722cd..0d5efa8 100644
--- a/src/Backends/Banshee.Osx/OsxIntegration.GtkOsxApplication/GtkOsxApplication.cs
+++ b/src/Backends/Banshee.Osx/OsxIntegration.GtkOsxApplication/GtkOsxApplication.cs
@@ -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
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]