From 9038f2ce984e005ce04a7a40d45fe83fa79fd342 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 29 May 2008 21:04:52 +0000 Subject: [PATCH] Bug 535453 - gdk_pixbuf_format_get_license returns NULL for any of the loaders * queryloaders.c (write_loader_info): Add the license info after the description. * gdk-pixbuf-io.c (gdk_pixbuf_io_init): Read the license info from the module file. Reported by Andrey Tsyvarev. svn path=/trunk/; revision=20241 --- gdk-pixbuf/ChangeLog | 11 +++++++++++ gdk-pixbuf/gdk-pixbuf-io.c | 4 ++++ gdk-pixbuf/queryloaders.c | 4 ++-- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog index c45405715a..0156425109 100644 --- a/gdk-pixbuf/ChangeLog +++ b/gdk-pixbuf/ChangeLog @@ -1,3 +1,14 @@ +2008-05-29 Matthias Clasen + + Bug 535453 - gdk_pixbuf_format_get_license returns NULL for + any of the loaders + + * queryloaders.c (write_loader_info): Add the license info + after the description. + + * gdk-pixbuf-io.c (gdk_pixbuf_io_init): Read the license info + from the module file. Reported by Andrey Tsyvarev. + 2008-05-28 Michael Natterer * gdk-pixbuf.h: define GDK_PIXBUF_H_INSIDE around including all diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c index 62c676ff5c..f441e7c334 100644 --- a/gdk-pixbuf/gdk-pixbuf-io.c +++ b/gdk-pixbuf/gdk-pixbuf-io.c @@ -466,6 +466,10 @@ gdk_pixbuf_io_init (void) have_error = TRUE; } module->info->description = g_strdup (tmp_buf->str); + + if (scan_string (&p, tmp_buf)) { + module->info->license = g_strdup (tmp_buf->str); + } } else if (!module->info->mime_types) { int n = 1; diff --git a/gdk-pixbuf/queryloaders.c b/gdk-pixbuf/queryloaders.c index 6a3a7c5694..bf98b10420 100644 --- a/gdk-pixbuf/queryloaders.c +++ b/gdk-pixbuf/queryloaders.c @@ -127,9 +127,9 @@ write_loader_info (const char *path, GdkPixbufFormat *info) char **ext; g_printf("\"%s\"\n", path); - g_printf ("\"%s\" %u \"%s\" \"%s\"\n", + g_printf ("\"%s\" %u \"%s\" \"%s\" \"%s\"\n", info->name, info->flags, - info->domain ? info->domain : GETTEXT_PACKAGE, info->description); + info->domain ? info->domain : GETTEXT_PACKAGE, info->description, info->license); for (mime = info->mime_types; *mime; mime++) { g_printf ("\"%s\" ", *mime); }