[gtk+/gtk-2-24-quartz] Bug 658772: Directory paths for resource directories are hard coded.



commit 1cee7936fbadcabb09aa8c1327e0e9c9935b51d7
Author: John Ralls <jralls ceridwen us>
Date:   Sat Oct 8 18:08:29 2011 -0700

    Bug 658772: Directory paths for resource directories are hard coded.
    
    Provide dynamic path discovery functions as are provided for win32.

 configure.in     |    9 +++++++++
 gtk/gtkprivate.h |    5 +++--
 2 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/configure.in b/configure.in
index 43105ab..c046834 100644
--- a/configure.in
+++ b/configure.in
@@ -1253,9 +1253,18 @@ else
   AM_CONDITIONAL(USE_WIN32, false)
 fi
 
+AC_ARG_ENABLE(quartz-relocation,
+              [AS_HELP_STRING([--enable-quartz-relocation],
+                              [enable bundle-based relocation functions])],
+                              [quartz_relocation=yes])
+
 if test "x$gdktarget" = "xquartz"; then
   GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -framework Cocoa"
   AM_CONDITIONAL(USE_QUARTZ, true)
+  if test "x$quartz_relocation" = xyes; then
+    AC_DEFINE([QUARTZ_RELOCATION], [1], [Use NSBundle functions to determine load paths for libraries, translations, etc.])
+  fi
+
 else
   AM_CONDITIONAL(USE_QUARTZ, false)
 fi
diff --git a/gtk/gtkprivate.h b/gtk/gtkprivate.h
index 029ccf7..53afe0e 100644
--- a/gtk/gtkprivate.h
+++ b/gtk/gtkprivate.h
@@ -74,7 +74,8 @@ typedef enum
 #define GTK_PRIVATE_SET_FLAG(wid,flag)    G_STMT_START{ (GTK_PRIVATE_FLAGS (wid) |= (PRIVATE_ ## flag)); }G_STMT_END
 #define GTK_PRIVATE_UNSET_FLAG(wid,flag)  G_STMT_START{ (GTK_PRIVATE_FLAGS (wid) &= ~(PRIVATE_ ## flag)); }G_STMT_END
 
-#if defined G_OS_WIN32 || defined GDK_WINDOWING_QUARTZ
+#if defined G_OS_WIN32 \
+  || (defined GDK_WINDOWING_QUARTZ && defined QUARTZ_RELOCATION)
 
 const gchar *_gtk_get_datadir ();
 const gchar *_gtk_get_libdir ();
@@ -93,7 +94,7 @@ const gchar *_gtk_get_data_prefix ();
 #undef GTK_DATA_PREFIX
 #define GTK_DATA_PREFIX _gtk_get_data_prefix ()
 
-#endif /* G_OS_WIN32 || GDK_WINDOWING_QUARTZ */
+#endif /* G_OS_WIN32 */
 
 gboolean _gtk_fnmatch (const char *pattern,
 		       const char *string,



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