From c18d856b22f47f42fe3bcb877dc98a5f87dc81c3 Mon Sep 17 00:00:00 2001 From: Pasupathi Duraisamy Date: Wed, 13 Nov 2002 09:08:44 +0000 Subject: [PATCH] Reset Picture option to "Wall paper" only in the case of "none" while DnD. 2002-11-13 Pasupathi Duraisamy * background-properties-capplet.c (drag_data_received_cb): Reset Picture option to "Wall paper" only in the case of "none" while DnD. Fixes #94329 --- capplets/background/ChangeLog | 6 ++++++ capplets/background/background-properties-capplet.c | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/capplets/background/ChangeLog b/capplets/background/ChangeLog index 78f367999..4e80f2ddf 100644 --- a/capplets/background/ChangeLog +++ b/capplets/background/ChangeLog @@ -1,3 +1,9 @@ +2002-11-13 Pasupathi Duraisamy + + * background-properties-capplet.c (drag_data_received_cb): + Reset Picture option to "Wall paper" only in the case of + "none" while DnD. Fixes #94329 + 2002-11-02 Jody Goldberg * Release 2.1.2 diff --git a/capplets/background/background-properties-capplet.c b/capplets/background/background-properties-capplet.c index 9521f0d8d..03c2118da 100644 --- a/capplets/background/background-properties-capplet.c +++ b/capplets/background/background-properties-capplet.c @@ -486,6 +486,7 @@ drag_data_received_cb (GtkWidget *widget, GdkDragContext *context, { GConfClient *client = gconf_client_get_default (); ApplierSet *set = (ApplierSet*) data; + gchar *picture_option; if (info == TARGET_URI_LIST || info == TARGET_BGIMAGE) @@ -519,7 +520,12 @@ drag_data_received_cb (GtkWidget *widget, GdkDragContext *context, gconf_entry_free (entry); gconf_value_free (value); - gconf_client_set_string (client, BG_PREFERENCES_PICTURE_OPTIONS, "wallpaper", NULL); + picture_option = gconf_client_get_string (client, BG_PREFERENCES_PICTURE_OPTIONS, NULL); + if ((picture_option != NULL) && !strcmp (picture_option, "none")) + gconf_client_set_string (client, BG_PREFERENCES_PICTURE_OPTIONS, "wallpaper", NULL); + + g_free (picture_option); + } gnome_vfs_uri_list_free (uris); } else if (info == TARGET_COLOR) {