diff options
author | Shakti Sen <shprasad@novell.com> | 2005-01-04 18:39:00 +0000 |
---|---|---|
committer | Sebastien Bacher <sbacher@src.gnome.org> | 2005-01-04 18:39:00 +0000 |
commit | 9946689e3df21647b3a260cf817ca0f25279e398 (patch) | |
tree | 42268c0f2f088ff753e2156478d34e0261780ad3 | |
parent | bd99e7e01bd826562e113ce59b5ff81a6f163168 (diff) | |
download | gnome-control-center-9946689e3df21647b3a260cf817ca0f25279e398.tar.gz |
Defined PREFIX to <prefix> bug #153203
2005-01-04 Shakti Sen <shprasad@novell.com>
* configure.in: Defined PREFIX to <prefix>
bug #153203
2005-01-04 Shakti Sen <shprasad@novell.com>
* theme-thumbnailer.c (main): Added the full path of the theme
so that it will create the thumbnail.
Fixes bug #153203
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | configure.in | 1 | ||||
-rw-r--r-- | vfs-methods/themus/ChangeLog | 6 | ||||
-rw-r--r-- | vfs-methods/themus/theme-thumbnailer.c | 25 |
5 files changed, 34 insertions, 4 deletions
@@ -1,3 +1,8 @@ +2005-01-04 Shakti Sen <shprasad@novell.com> + + * configure.in: Defined PREFIX to <prefix> + bug #153203 + 2005-01-03 Dan Winship <danw@novell.com> * configure.in: Remove redundant check for ngettext, since @@ -2,6 +2,7 @@ - don't set "close" as the default button (Closes: #98202). - use a temporary filename to not overwrite existant files in ~/.themes (Closes: #97180). +- theme-thumbnailer doesn't require an absolute path (Closes: #153203). - some bugs and leaks fixed. gnome-control-center 2.9.3 diff --git a/configure.in b/configure.in index 2d98deabc..dd519ff3d 100644 --- a/configure.in +++ b/configure.in @@ -459,6 +459,7 @@ else fi AC_DEFINE_UNQUOTED(GNOMECC_DATA_DIR, "${real_prefix}/share/${GETTEXT_PACKAGE}",[Path to gnomecc data files]) +AC_DEFINE_UNQUOTED(PREFIX, "$prefix", [install prefix]) GNOMECC_ICONS_DIR='$(datadir)/'${GETTEXT_PACKAGE}'/icons' AC_SUBST(GNOMECC_ICONS_DIR) GNOMECC_GLADE_DIR='$(datadir)/'${GETTEXT_PACKAGE}'/interfaces' diff --git a/vfs-methods/themus/ChangeLog b/vfs-methods/themus/ChangeLog index 5ab53d6c3..bf80ae552 100644 --- a/vfs-methods/themus/ChangeLog +++ b/vfs-methods/themus/ChangeLog @@ -1,3 +1,9 @@ +2005-01-04 Shakti Sen <shprasad@novell.com> + + * theme-thumbnailer.c (main): Added the full path of the theme + so that it will create the thumbnail. + Fixes bug #153203 + 2004-12-25 Kjartan Maraas <kmaraas@gnome.org> * theme-method.c: (vfs_module_init): NULL vs. 0 diff --git a/vfs-methods/themus/theme-thumbnailer.c b/vfs-methods/themus/theme-thumbnailer.c index 0b8fbbca6..93e45a628 100644 --- a/vfs-methods/themus/theme-thumbnailer.c +++ b/vfs-methods/themus/theme-thumbnailer.c @@ -18,6 +18,7 @@ */ #include <gdk/gdk.h> +#include "config.h" #include <gnome-theme-info.h> #include <theme-thumbnail.h> @@ -123,6 +124,7 @@ main(int argc, char **argv) GdkPixbuf *pixbuf; GnomeThemeMetaInfo *theme; GnomeVFSURI *uri; + gchar *theme_name; theme_thumbnail_factory_init (argc, argv); @@ -137,14 +139,29 @@ main(int argc, char **argv) } gnome_theme_init (NULL); - uri = gnome_vfs_uri_new (argv[1]); + 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]); + return 1; + } + + uri = gnome_vfs_uri_new (theme_name); + g_free (theme_name); theme = gnome_theme_read_meta_theme (uri); gnome_vfs_uri_unref (uri); - pixbuf = generate_theme_thumbnail (theme, TRUE); + if (theme) { + pixbuf = generate_theme_thumbnail (theme, TRUE); - save_pixbuf(pixbuf, argv[2]); - gdk_pixbuf_unref(pixbuf); + save_pixbuf(pixbuf, argv[2]); + gdk_pixbuf_unref(pixbuf); + } return 0; } |