summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Granseuer <jensgr@gmx.net>2007-09-25 19:37:34 +0000
committerJens Granseuer <jensg@src.gnome.org>2007-09-25 19:37:34 +0000
commit80b3fe1e7d22636f6cfc6d02f151751961f677db (patch)
treee9429e5b574e5371142f5b0c542646ac50b14a02
parenta31f90679b5ae1ffb8b179414d7b78ef2bfadef2 (diff)
downloadgnome-control-center-80b3fe1e7d22636f6cfc6d02f151751961f677db.tar.gz
Prevent lots of thumbs from being created with the color scheme of theGNOME_CONTROL_CENTER_2_20_0_1
2007-09-25 Jens Granseuer <jensgr@gmx.net> Prevent lots of thumbs from being created with the color scheme of the currently active theme (see comment #15 in bug 460023). Maybe it also helps with some of the other color-related issues. * theme-thumbnail.c: (create_gtk_theme_pixbuf), (generate_theme_thumbnail_async): when creating GTK theme thumbnails, explicitly pass the theme's color scheme to override the xsetting svn path=/branches/gnome-2-20/; revision=8136
-rw-r--r--capplets/common/ChangeLog10
-rw-r--r--capplets/common/theme-thumbnail.c14
2 files changed, 22 insertions, 2 deletions
diff --git a/capplets/common/ChangeLog b/capplets/common/ChangeLog
index d67a48be0..097487632 100644
--- a/capplets/common/ChangeLog
+++ b/capplets/common/ChangeLog
@@ -1,3 +1,13 @@
+2007-09-25 Jens Granseuer <jensgr@gmx.net>
+
+ Prevent lots of thumbs from being created with the color scheme of the
+ currently active theme (see comment #15 in bug 460023). Maybe it also
+ helps with some of the other color-related issues.
+
+ * theme-thumbnail.c: (create_gtk_theme_pixbuf),
+ (generate_theme_thumbnail_async): when creating GTK theme thumbnails,
+ explicitly pass the theme's color scheme to override the xsetting
+
2007-09-16 Jens Granseuer <jensgr@gmx.net>
Patch by: Darren Kenny <darren.kenny@sun.com>
diff --git a/capplets/common/theme-thumbnail.c b/capplets/common/theme-thumbnail.c
index 96034c023..f11eb082a 100644
--- a/capplets/common/theme-thumbnail.c
+++ b/capplets/common/theme-thumbnail.c
@@ -16,6 +16,7 @@
#include <libgnomeui/gnome-icon-theme.h>
#include "theme-thumbnail.h"
+#include "gtkrc-utils.h"
#include "capplet-util.h"
static gint child_pid;
@@ -345,7 +346,9 @@ create_gtk_theme_pixbuf (ThemeThumbnailData *theme_thumbnail_data)
gint width, height;
settings = gtk_settings_get_default ();
- g_object_set (settings, "gtk-theme-name", (char *) theme_thumbnail_data->control_theme_name->data, NULL);
+ g_object_set (settings, "gtk-theme-name", (char *) theme_thumbnail_data->control_theme_name->data,
+ "gtk-color-scheme", (char *) theme_thumbnail_data->gtk_color_scheme->data,
+ NULL);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
@@ -975,6 +978,8 @@ generate_theme_thumbnail_async (gpointer theme_info,
gpointer user_data,
GDestroyNotify destroy)
{
+ gchar *scheme;
+
if (async_data.set)
{
ThemeQueueItem *item;
@@ -1000,7 +1005,6 @@ generate_theme_thumbnail_async (gpointer theme_info,
return;
}
-
if (async_data.channel == NULL)
{
async_data.channel = g_io_channel_unix_new (pipe_from_factory_fd[0]);
@@ -1017,12 +1021,18 @@ generate_theme_thumbnail_async (gpointer theme_info,
async_data.user_data = user_data;
async_data.destroy = destroy;
+ if (!strcmp (thumbnail_type, THUMBNAIL_TYPE_GTK)) {
+ scheme = gtkrc_get_color_scheme_for_theme (theme_name);
+ gtk_color_scheme = scheme;
+ } else scheme = NULL;
+
send_thumbnail_request (thumbnail_type,
gtk_theme_name,
gtk_color_scheme,
metacity_theme_name,
icon_theme_name,
application_font);
+ g_free (scheme);
}
void