]> Pileus Git - ~andy/gtk/blobdiff - gdk-pixbuf/gdk-pixbuf-io.c
Speed up printer listing in the print dialog
[~andy/gtk] / gdk-pixbuf / gdk-pixbuf-io.c
index abb920359e3873feb914737b018c33a87ecb6826..646b0f1eaa89305f9f11198a36adf7583a7d4a2a 100644 (file)
@@ -277,6 +277,13 @@ correct_prefix (gchar **path)
   if (strncmp (*path, GTK_PREFIX "/", strlen (GTK_PREFIX "/")) == 0 ||
       strncmp (*path, GTK_PREFIX "\\", strlen (GTK_PREFIX "\\")) == 0)
     {
+         gchar *tem = NULL;
+      if (strlen(*path) > 5 && strncmp (*path - 5, ".libs", 5) == 0)
+        {
+          /* We are being run from inside the build tree, and shouldn't mess about. */
+          return;
+       }
+
       /* This is an entry put there by gdk-pixbuf-query-loaders on the
        * packager's system. On Windows a prebuilt GTK+ package can be
        * installed in a random location. The gdk-pixbuf.loaders file
@@ -284,7 +291,7 @@ correct_prefix (gchar **path)
        * builder's machine. Replace the build-time prefix with the
        * installation prefix on this machine.
        */
-      gchar *tem = *path;
+      tem = *path;
       *path = g_strconcat (get_toplevel (), tem + strlen (GTK_PREFIX), NULL);
       g_free (tem);
     }
@@ -2452,14 +2459,14 @@ gchar *
 gdk_pixbuf_format_get_description (GdkPixbufFormat *format)
 {
        gchar *domain;
-       gchar *description;
+       const gchar *description;
        g_return_val_if_fail (format != NULL, NULL);
 
        if (format->domain != NULL) 
                domain = format->domain;
        else 
                domain = GETTEXT_PACKAGE;
-       description = dgettext (domain, format->description);
+       description = g_dgettext (domain, format->description);
 
        return g_strdup (description);
 }