[Xfce4-commits] [xfce/xfdesktop] 01/01: settings: Fix background color loading

noreply at xfce.org noreply at xfce.org
Tue Aug 26 18:55:08 CEST 2014


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository xfce/xfdesktop.

commit 824050c60b3febe1f731964d343432dce32372dc
Author: Eric Koegel <eric.koegel at gmail.com>
Date:   Tue Aug 26 19:49:30 2014 +0300

    settings: Fix background color loading
    
    The issue was launching xfdesktop-settings changed the
    wallpaper background color, either to black or #7f000 or
    some other color.
    There's a bit of a mixup in the code, there's color 2s where
    there should be color 1s. With these corrected the colors
    should properly be loaded and old versions should be migrated.
    Bug reported to launchpad but never sent up to xfce's bugzilla:
    https://bugs.launchpad.net/ubuntu/+source/xfdesktop4/+bug/1313728
---
 settings/main.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/settings/main.c b/settings/main.c
index 12a9cc2..b3a582d 100644
--- a/settings/main.c
+++ b/settings/main.c
@@ -1322,12 +1322,12 @@ xfdesktop_settings_background_tab_change_bindings(AppearancePanel *panel,
         /* If the first color doesn't exist, try to load the old one */
         if(!xfconf_channel_has_property(channel, buf)) {
             GValue value = { 0, };
-            old_property = xfdesktop_settings_generate_old_binding_string(panel, "color2");
+            old_property = xfdesktop_settings_generate_old_binding_string(panel, "color1");
 
             xfconf_channel_get_property(channel, old_property, &value);
 
             if(G_VALUE_HOLDS_BOXED(&value)) {
-                gtk_color_button_set_color(GTK_COLOR_BUTTON(panel->color2_btn),
+                gtk_color_button_set_color(GTK_COLOR_BUTTON(panel->color1_btn),
                                            g_value_get_boxed(&value));
                 g_value_unset(&value);
             } else {
@@ -1357,12 +1357,12 @@ xfdesktop_settings_background_tab_change_bindings(AppearancePanel *panel,
         /* If the 2nd color doesn't exist, try to load the old one */
         if(!xfconf_channel_has_property(channel, buf)) {
             GValue value = { 0, };
-            old_property = xfdesktop_settings_generate_old_binding_string(panel, "color1");
+            old_property = xfdesktop_settings_generate_old_binding_string(panel, "color2");
 
             xfconf_channel_get_property(channel, old_property, &value);
 
             if(G_VALUE_HOLDS_BOXED(&value)) {
-                gtk_color_button_set_color(GTK_COLOR_BUTTON(panel->color1_btn),
+                gtk_color_button_set_color(GTK_COLOR_BUTTON(panel->color2_btn),
                                            g_value_get_boxed(&value));
                 g_value_unset(&value);
             } else {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list