[libpeas/libpeas-1.8.1-osx] Use gtk-mac-integration



commit 550d06ad31eff2f21cb171063c6a1ee72d94edf4
Author: Jesse van den Kieboom <jessevdk gmail com>
Date:   Sun Jan 26 14:54:45 2014 +0100

    Use gtk-mac-integration

 configure.ac        |    2 +-
 libpeas/Makefile.am |    4 ++--
 libpeas/peas-dirs.c |   24 ++++++++++--------------
 3 files changed, 13 insertions(+), 17 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 937ef53..2714229 100644
--- a/configure.ac
+++ b/configure.ac
@@ -142,7 +142,7 @@ AM_CONDITIONAL(OS_OSX, test "$os_osx" = "yes")
 if test "$os_osx" = "yes"; then
        AC_DEFINE([OS_OSX],[1],[Defined if os is Mac OSX])
 
-       PKG_CHECK_MODULES(IGE_MAC, ige-mac-integration)
+       PKG_CHECK_MODULES(GTK_MAC, gtk-mac-integration)
 fi
 
 dnl ================================================================
diff --git a/libpeas/Makefile.am b/libpeas/Makefile.am
index de67252..810771a 100644
--- a/libpeas/Makefile.am
+++ b/libpeas/Makefile.am
@@ -4,7 +4,7 @@ INCLUDES =                                                              \
        -I$(top_srcdir)                                                 \
        -I$(srcdir)                                                     \
        $(PEAS_CFLAGS)                                                  \
-       $(IGE_MAC_CFLAGS)                                               \
+       $(GTK_MAC_CFLAGS)                                               \
        $(GCOV_CFLAGS)                                                  \
        $(WARN_CFLAGS)                                                  \
        $(DISABLE_DEPRECATED)                                           \
@@ -16,7 +16,7 @@ libpeas_1_0_la_LDFLAGS = \
        -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
        -export-dynamic -no-undefined -export-symbols-regex "^[^_].*"
 
-libpeas_1_0_la_LIBADD = $(PEAS_LIBS) $(IGE_MAC_LIBS)
+libpeas_1_0_la_LIBADD = $(PEAS_LIBS) $(GTK_MAC_LIBS)
 
 INST_H_FILES =                 \
        peas-plugin-info.h      \
diff --git a/libpeas/peas-dirs.c b/libpeas/peas-dirs.c
index a93bf73..0d51d49 100644
--- a/libpeas/peas-dirs.c
+++ b/libpeas/peas-dirs.c
@@ -24,7 +24,7 @@
 #endif
 
 #ifdef OS_OSX
-#include <ige-mac-bundle.h>
+#include <gtkosxapplication.h>
 #endif
 
 #include "peas-dirs.h"
@@ -42,13 +42,11 @@ peas_dirs_get_data_dir (void)
   data_dir = g_build_filename (win32_dir, "share", "libpeas-1.0", NULL);
   g_free (win32_dir);
 #elif defined (OS_OSX)
-  IgeMacBundle *bundle = ige_mac_bundle_get_default ();
-
-  if (ige_mac_bundle_get_is_app_bundle (bundle))
+  if (gtkosx_application_get_bundle_id () != NULL)
     {
-      const gchar *bundle_data_dir = ige_mac_bundle_get_datadir (bundle);
+      const gchar *bundle_resource_dir = gtkosx_application_get_resource_path ();
 
-      data_dir = g_build_filename (bundle_data_dir, "libpeas-1.0", NULL);
+      data_dir = g_build_filename (bundle_resource_dir, "share", "libpeas-1.0", NULL);
     }
   else
     {
@@ -74,11 +72,9 @@ peas_dirs_get_lib_dir (void)
   lib_dir = g_build_filename (win32_dir, "lib", "libpeas-1.0", NULL);
   g_free (win32_dir);
 #elif defined (OS_OSX)
-  IgeMacBundle *bundle = ige_mac_bundle_get_default ();
-
-  if (ige_mac_bundle_get_is_app_bundle (bundle))
+  if (gtkosx_application_get_bundle_id () != NULL)
     {
-      const gchar *path = ige_mac_bundle_get_resourcesdir (bundle);
+      const gchar *path = gtkosx_application_get_resource_path ();
 
       lib_dir = g_build_filename (path, "lib", "libpeas-1.0", NULL);
     }
@@ -126,11 +122,11 @@ peas_dirs_get_locale_dir (void)
 
   g_free (win32_dir);
 #elif defined (OS_OSX)
-  IgeMacBundle *bundle = ige_mac_bundle_get_default ();
-
-  if (ige_mac_bundle_get_is_app_bundle (bundle))
+  if (gtkosx_application_get_bundle_id () != NULL)
     {
-      locale_dir = g_strdup (ige_mac_bundle_get_localedir (bundle));
+      const gchar *path = gtkosx_application_get_resource_path ();
+
+      locale_dir = g_build_filename (path, "share", "locale", NULL);
     }
   else
     {


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