[Xfce4-commits] [xfce/xfce4-power-manager] 04/05: Fix on-battery-lid action combobox being empty after creation

noreply at xfce.org noreply at xfce.org
Mon Jun 16 17:42:28 CEST 2014


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

eric pushed a commit to branch master
in repository xfce/xfce4-power-manager.

commit 914379eba837f3bdea6ffc70c079637572c7af0e
Author: Harald Judt <h.judt at gmx.at>
Date:   Mon Jun 16 14:05:56 2014 +0200

    Fix on-battery-lid action combobox being empty after creation
    
    Copy & paste error; It gets overwritten by the spin-down creation code.
    
    Signed-off-by: Eric Koegel <eric.koegel at gmail.com>
---
 settings/xfpm-settings.c |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/settings/xfpm-settings.c b/settings/xfpm-settings.c
index 835c810..a7cb56c 100644
--- a/settings/xfpm-settings.c
+++ b/settings/xfpm-settings.c
@@ -848,7 +848,7 @@ xfpm_settings_on_battery (XfconfChannel *channel, gboolean auth_suspend,
     gtk_widget_set_sensitive (GTK_WIDGET(on_battery_dpms_off), FALSE);
 #endif
 
-     /*
+    /*
      * Lid switch settings on battery
      */
     lid = GTK_WIDGET (gtk_builder_get_object (xml, "on-battery-lid"));
@@ -876,7 +876,7 @@ xfpm_settings_on_battery (XfconfChannel *channel, gboolean auth_suspend,
 	gtk_list_store_append(list_store, &iter);
 	gtk_list_store_set (list_store, &iter, 0, _("Lock screen"), 1, LID_TRIGGER_LOCK_SCREEN, -1);
 	
-	gtk_combo_box_set_active (GTK_COMBO_BOX (lid), XFPM_DO_NOTHING);
+	gtk_combo_box_set_active (GTK_COMBO_BOX (lid), 0);
 	
 	val = xfconf_channel_get_uint (channel, PROPERTIES_PREFIX LID_SWITCH_ON_BATTERY_CFG, LID_TRIGGER_LOCK_SCREEN);
 	
@@ -899,9 +899,8 @@ xfpm_settings_on_battery (XfconfChannel *channel, gboolean auth_suspend,
 	gtk_widget_hide (label);
 	gtk_widget_hide (lid);
     }
-    
+
     /*
-     * 
      * Brightness on battery power
      */
     brg = GTK_WIDGET (gtk_builder_get_object (xml ,"brg-on-battery"));
@@ -927,6 +926,9 @@ xfpm_settings_on_battery (XfconfChannel *channel, gboolean auth_suspend,
     }
 #endif
 
+    /*
+     * Hard drive energy saving
+     */
     spin_down_hdd = GTK_WIDGET (gtk_builder_get_object (xml, "spin-down-hdd"));
 
     if ( can_spin_down && devkit_disk )
@@ -959,7 +961,7 @@ xfpm_settings_on_battery (XfconfChannel *channel, gboolean auth_suspend,
 				1, &list_value, -1);
 	    if ( val == list_value )
 	    {
-		gtk_combo_box_set_active_iter (GTK_COMBO_BOX (lid), &iter);
+		gtk_combo_box_set_active_iter (GTK_COMBO_BOX (spin_down_hdd), &iter);
 		break;
 	    }
 	}

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


More information about the Xfce4-commits mailing list