change back to the previous code, that fixes the themes:/// thumbnails

2005-02-09  Sebastien Bacher  <seb128@debian.org>

        * theme-thumbnailer.c: (main): change back to the previous code,
        that fixes the themes:/// thumbnails (Closes: #165778).
This commit is contained in:
Sebastien Bacher 2005-02-09 12:11:31 +00:00 committed by Sebastien Bacher
parent f544fa95e2
commit 4a2404ef61
2 changed files with 9 additions and 22 deletions

View file

@ -1,3 +1,8 @@
2005-02-09 Sebastien Bacher <seb128@debian.org>
* theme-thumbnailer.c: (main): change back to the previous code,
that fixes the themes:/// thumbnails (Closes: #165778).
2005-01-27 Kjartan Maraas <kmaraas@gnome.org>
* theme-thumbnailer.c: (main): Don't leak the theme name

View file

@ -18,7 +18,6 @@
*/
#include <gdk/gdk.h>
#include "config.h"
#include <gnome-theme-info.h>
#include <theme-thumbnail.h>
@ -124,7 +123,6 @@ main(int argc, char **argv)
GdkPixbuf *pixbuf;
GnomeThemeMetaInfo *theme;
GnomeVFSURI *uri;
gchar *theme_name;
theme_thumbnail_factory_init (argc, argv);
@ -139,30 +137,14 @@ main(int argc, char **argv)
}
gnome_theme_init (NULL);
if (g_path_is_absolute (argv[1])) {
theme_name = g_build_filename (argv[1], "index.theme", NULL);
}
else {
theme_name = g_build_filename (PREFIX, "/share/themes/", argv[1], "index.theme", NULL);
}
if (!g_file_test (theme_name, G_FILE_TEST_EXISTS)) {
g_printerr("%s is not a valid theme\n", argv[1]);
g_free (theme_name);
return 1;
}
uri = gnome_vfs_uri_new (theme_name);
g_free (theme_name);
uri = gnome_vfs_uri_new (argv[1]);
theme = gnome_theme_read_meta_theme (uri);
gnome_vfs_uri_unref (uri);
if (theme) {
pixbuf = generate_theme_thumbnail (theme, TRUE);
save_pixbuf(pixbuf, argv[2]);
gdk_pixbuf_unref(pixbuf);
}
return 0;
}