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
* 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);
}
gchar **mimes;
gchar *type;
gint j;
+ gboolean uncertain;
- mime_type = g_content_type_guess (filename, buffer, size, NULL);
+ mime_type = g_content_type_guess (NULL, buffer, size, &uncertain);
+ if (uncertain)
+ mime_type = g_content_type_guess (filename, buffer, size, NULL);
for (modules = get_file_formats (); modules; modules = g_slist_next (modules)) {
GdkPixbufModule *module = (GdkPixbufModule *)modules->data;
data.stream = stream;
data.cancellable = cancellable;
- if (!gdk_pixbuf_save_to_callbackv (pixbuf, save_to_stream,
- &data, type,
- keys, values,
- error)) {
- error = NULL; /* Ignore further errors */
- res = FALSE;
- }
+ res = gdk_pixbuf_save_to_callbackv (pixbuf, save_to_stream,
+ &data, type,
+ keys, values,
+ error);
g_strfreev (keys);
g_strfreev (values);
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);
}