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:
parent
f544fa95e2
commit
4a2404ef61
2 changed files with 9 additions and 22 deletions
|
@ -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>
|
2005-01-27 Kjartan Maraas <kmaraas@gnome.org>
|
||||||
|
|
||||||
* theme-thumbnailer.c: (main): Don't leak the theme name
|
* theme-thumbnailer.c: (main): Don't leak the theme name
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <gdk/gdk.h>
|
#include <gdk/gdk.h>
|
||||||
#include "config.h"
|
|
||||||
#include <gnome-theme-info.h>
|
#include <gnome-theme-info.h>
|
||||||
#include <theme-thumbnail.h>
|
#include <theme-thumbnail.h>
|
||||||
|
|
||||||
|
@ -124,7 +123,6 @@ main(int argc, char **argv)
|
||||||
GdkPixbuf *pixbuf;
|
GdkPixbuf *pixbuf;
|
||||||
GnomeThemeMetaInfo *theme;
|
GnomeThemeMetaInfo *theme;
|
||||||
GnomeVFSURI *uri;
|
GnomeVFSURI *uri;
|
||||||
gchar *theme_name;
|
|
||||||
|
|
||||||
theme_thumbnail_factory_init (argc, argv);
|
theme_thumbnail_factory_init (argc, argv);
|
||||||
|
|
||||||
|
@ -139,30 +137,14 @@ main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
gnome_theme_init (NULL);
|
gnome_theme_init (NULL);
|
||||||
if (g_path_is_absolute (argv[1])) {
|
uri = gnome_vfs_uri_new (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);
|
|
||||||
theme = gnome_theme_read_meta_theme (uri);
|
theme = gnome_theme_read_meta_theme (uri);
|
||||||
gnome_vfs_uri_unref (uri);
|
gnome_vfs_uri_unref (uri);
|
||||||
|
|
||||||
if (theme) {
|
|
||||||
pixbuf = generate_theme_thumbnail (theme, TRUE);
|
pixbuf = generate_theme_thumbnail (theme, TRUE);
|
||||||
|
|
||||||
save_pixbuf(pixbuf, argv[2]);
|
save_pixbuf(pixbuf, argv[2]);
|
||||||
gdk_pixbuf_unref(pixbuf);
|
gdk_pixbuf_unref(pixbuf);
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue