gtk+ r22099 - in branches/gtk-2-14: . gtk



Author: tml
Date: Mon Jan 12 16:47:28 2009
New Revision: 22099
URL: http://svn.gnome.org/viewvc/gtk+?rev=22099&view=rev

Log:
2009-01-12  Tor Lillqvist  <tml iki fi>

	Bug 164002 - query scripts don't work uninstalled on windows

	* gtk/gtkmain.c (_gtk_get_libdir): If the gtk DLL is in a ".libs"
	folder, assume we are running uninstalled, and use the
	configure-time GTK_LIBDIR.



Modified:
   branches/gtk-2-14/ChangeLog
   branches/gtk-2-14/gtk/gtkmain.c

Modified: branches/gtk-2-14/gtk/gtkmain.c
==============================================================================
--- branches/gtk-2-14/gtk/gtkmain.c	(original)
+++ branches/gtk-2-14/gtk/gtkmain.c	Mon Jan 12 16:47:28 2009
@@ -89,6 +89,24 @@
  * original GTK_LOCALEDIR definition. Yeah, this is a bit sucky.
  */
 const gchar *
+_gtk_get_libdir (void)
+{
+  static char *gtk_libdir = NULL;
+  if (gtk_libdir == NULL)
+    {
+      gchar *root = g_win32_get_package_installation_directory_of_module (gtk_dll);
+      gchar *slash = strrchr (root, '\\');
+      if (g_ascii_strcasecmp (slash + 1, ".libs") == 0)
+	gtk_libdir = GTK_LIBDIR;
+      else
+	gtk_libdir = g_build_filename (root, "lib", NULL);
+      g_free (root);
+    }
+
+  return gtk_libdir;
+}
+
+const gchar *
 _gtk_get_localedir (void)
 {
   static char *gtk_localedir = NULL;
@@ -333,20 +351,6 @@
 }
 
 const gchar *
-_gtk_get_libdir (void)
-{
-  static char *gtk_libdir = NULL;
-  if (gtk_libdir == NULL)
-    {
-      gchar *root = g_win32_get_package_installation_directory_of_module (gtk_dll);
-      gtk_libdir = g_build_filename (root, "lib", NULL);
-      g_free (root);
-    }
-
-  return gtk_libdir;
-}
-
-const gchar *
 _gtk_get_sysconfdir (void)
 {
   static char *gtk_sysconfdir = NULL;



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