From be47506bdf9c42722471c594b4971b3b8f5b2dcb Mon Sep 17 00:00:00 2001 From: Jens Granseuer Date: Thu, 14 Feb 2008 18:38:37 +0000 Subject: [PATCH] don't try to set shading and options in GConf when we're dealing with a 2008-02-14 Jens Granseuer * appearance-desktop.c: (wp_scale_type_changed): don't try to set shading and options in GConf when we're dealing with a read-only source (bug #516328) svn path=/trunk/; revision=8485 --- capplets/appearance/ChangeLog | 6 ++++++ capplets/appearance/appearance-desktop.c | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/capplets/appearance/ChangeLog b/capplets/appearance/ChangeLog index b22f475c8..54bcfdd0e 100644 --- a/capplets/appearance/ChangeLog +++ b/capplets/appearance/ChangeLog @@ -1,3 +1,9 @@ +2008-02-14 Jens Granseuer + + * appearance-desktop.c: (wp_scale_type_changed): don't try to set shading + and options in GConf when we're dealing with a read-only source (bug + #516328) + 2008-02-11 Matthias Clasen Fixes bug #511306 diff --git a/capplets/appearance/appearance-desktop.c b/capplets/appearance/appearance-desktop.c index 2eb5352be..5c55b1d04 100644 --- a/capplets/appearance/appearance-desktop.c +++ b/capplets/appearance/appearance-desktop.c @@ -385,7 +385,8 @@ wp_scale_type_changed (GtkComboBox *combobox, if (pixbuf != NULL) g_object_unref (pixbuf); - gconf_client_set_string (data->client, WP_OPTIONS_KEY, item->options, NULL); + if (gconf_client_key_is_writable (data->client, WP_OPTIONS_KEY, NULL) + gconf_client_set_string (data->client, WP_OPTIONS_KEY, item->options, NULL); } static void @@ -427,8 +428,9 @@ wp_shade_type_changed (GtkWidget *combobox, if (pixbuf != NULL) g_object_unref (pixbuf); - gconf_client_set_string (data->client, WP_SHADING_KEY, - item->shade_type, NULL); + if (gconf_client_key_is_writable (data->client, WP_SHADING_KEY, NULL) + gconf_client_set_string (data->client, WP_SHADING_KEY, + item->shade_type, NULL); } static void