[Xfce4-commits] [xfce/xfce4-power-manager] 01/01: Remove non-functional power-save-on-battery feature

noreply at xfce.org noreply at xfce.org
Mon Jul 14 16:32:26 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 e0bcd3b7c2ca72355a9b027cd853e9ad320d3ede
Author: Harald Judt <h.judt at gmx.at>
Date:   Mon Jul 14 13:15:12 2014 +0200

    Remove non-functional power-save-on-battery feature
    
    The exact intent of this feature is unclear, its implementation
    unfinished.
---
 data/interfaces/xfpm-settings.ui        |   15 ---------------
 settings/xfpm-settings.c                |   21 ---------------------
 src/org.freedesktop.PowerManagement.xml |    4 ----
 src/xfpm-config.h                       |    2 --
 src/xfpm-power.c                        |   12 ------------
 src/xfpm-xfconf.c                       |   10 ----------
 6 files changed, 64 deletions(-)

diff --git a/data/interfaces/xfpm-settings.ui b/data/interfaces/xfpm-settings.ui
index 19f542b..d7dcbee 100644
--- a/data/interfaces/xfpm-settings.ui
+++ b/data/interfaces/xfpm-settings.ui
@@ -414,21 +414,6 @@
                                 <property name="position">0</property>
                               </packing>
                             </child>
-                            <child>
-                              <object class="GtkCheckButton" id="power-save">
-                                <property name="label" translatable="yes">Prefer saving power over performance</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">False</property>
-                                <property name="draw_indicator">True</property>
-                                <signal name="toggled" handler="power_save_toggled_cb" swapped="no"/>
-                              </object>
-                              <packing>
-                                <property name="expand">True</property>
-                                <property name="fill">True</property>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
                           </object>
                         </child>
                       </object>
diff --git a/settings/xfpm-settings.c b/settings/xfpm-settings.c
index 0878080..eda4034 100644
--- a/settings/xfpm-settings.c
+++ b/settings/xfpm-settings.c
@@ -110,9 +110,6 @@ void        button_power_changed_cb                 (GtkWidget *w,
 void        button_hibernate_changed_cb            (GtkWidget *w, 
 						    XfconfChannel *channel);
 
-void        power_save_toggled_cb                  (GtkWidget *w, 
-						    XfconfChannel *channel);
-
 void        notify_toggled_cb                      (GtkWidget *w, 
 						    XfconfChannel *channel);
 
@@ -318,17 +315,6 @@ button_hibernate_changed_cb (GtkWidget *w, XfconfChannel *channel)
 }
 
 void
-power_save_toggled_cb (GtkWidget *w, XfconfChannel *channel)
-{
-    gboolean val = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(w));
-    
-    if (!xfconf_channel_set_bool (channel, PROPERTIES_PREFIX POWER_SAVE_ON_BATTERY, val) )
-    {
-	g_critical ("Cannot set value for property %s\n", POWER_SAVE_ON_BATTERY);
-    }
-}
-
-void
 notify_toggled_cb (GtkWidget *w, XfconfChannel *channel)
 {
     gboolean val = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(w));
@@ -732,10 +718,8 @@ xfpm_settings_on_battery (XfconfChannel *channel, gboolean auth_suspend,
     gboolean valid;
     gint list_value;
     gint val;
-    gboolean save_power;
     GtkListStore *list_store;
     GtkTreeIter iter;
-    GtkWidget *power_save;
     GtkWidget *inact;
     GtkWidget *battery_critical;
     GtkWidget *lid;
@@ -805,11 +789,6 @@ xfpm_settings_on_battery (XfconfChannel *channel, gboolean auth_suspend,
 	}
     }
     
-    power_save = GTK_WIDGET (gtk_builder_get_object (xml, "power-save"));
-    save_power = xfconf_channel_get_bool (channel, PROPERTIES_PREFIX POWER_SAVE_ON_BATTERY, TRUE);
-    
-    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(power_save), save_power);
-    
     /*
      * DPMS settings when running on battery power
      */
diff --git a/src/org.freedesktop.PowerManagement.xml b/src/org.freedesktop.PowerManagement.xml
index ae00d7a..387bfdb 100644
--- a/src/org.freedesktop.PowerManagement.xml
+++ b/src/org.freedesktop.PowerManagement.xml
@@ -35,10 +35,6 @@
       <arg type="b" name="can_hibernate" direction="out"/>
     </method>
     
-    <method name="GetPowerSaveStatus">
-      <arg type="b" name="save_power" direction="out"/>
-    </method>
-    
     <method name="GetOnBattery">
       <arg type="b" name="on_battery" direction="out"/>
     </method>
diff --git a/src/xfpm-config.h b/src/xfpm-config.h
index 104d415..70c6113 100644
--- a/src/xfpm-config.h
+++ b/src/xfpm-config.h
@@ -37,8 +37,6 @@ G_BEGIN_DECLS
  */
 #define 	PROPERTIES_PREFIX		"/xfce4-power-manager/"
 
-
-#define 	POWER_SAVE_ON_BATTERY        	"power-save-on-battery"
 #define     	CPU_FREQ_CONTROL             	"enable-cpu-freq-control"
 #define     	LOCK_SCREEN_ON_SLEEP         	"lock-screen-suspend-hibernate"
 
diff --git a/src/xfpm-power.c b/src/xfpm-power.c
index a9200c3..83a6639 100644
--- a/src/xfpm-power.c
+++ b/src/xfpm-power.c
@@ -1519,10 +1519,6 @@ static gboolean xfpm_power_dbus_can_suspend (XfpmPower * power,
 					   gboolean * OUT_can_suspend,
 					   GError ** error);
 
-static gboolean xfpm_power_dbus_get_power_save_status (XfpmPower * power,
-						     gboolean * OUT_save_power,
-						     GError ** error);
-
 static gboolean xfpm_power_dbus_get_on_battery (XfpmPower * power,
 					      gboolean * OUT_on_battery,
 					      GError ** error);
@@ -1724,14 +1720,6 @@ static gboolean xfpm_power_dbus_can_suspend (XfpmPower * power,
     return TRUE;
 }
 
-static gboolean xfpm_power_dbus_get_power_save_status (XfpmPower * power,
-						     gboolean * OUT_save_power,
-						     GError ** error)
-{
-    //FIXME
-    return TRUE;
-}
-
 static gboolean xfpm_power_dbus_get_on_battery (XfpmPower * power,
 					      gboolean * OUT_on_battery,
 					      GError ** error)
diff --git a/src/xfpm-xfconf.c b/src/xfpm-xfconf.c
index a869ef6..88795ab 100644
--- a/src/xfpm-xfconf.c
+++ b/src/xfpm-xfconf.c
@@ -57,7 +57,6 @@ enum
     PROP_0,
     PROP_GENERAL_NOTIFICATION,
     PROP_LOCK_SCREEN_ON_SLEEP,
-    PROP_POWER_SAVE_ON_BATTERY,
     PROP_ENABLE_CPU_FREQ,
     PROP_CRITICAL_LEVEL,
     PROP_SHOW_BRIGHTNESS_POPUP,
@@ -254,15 +253,6 @@ xfpm_xfconf_class_init (XfpmXfconfClass *klass)
                                                            G_PARAM_READWRITE));
     
     /**
-     * XfpmXfconf::power-save-on-battery
-     **/
-    g_object_class_install_property (object_class,
-                                     PROP_POWER_SAVE_ON_BATTERY,
-                                     g_param_spec_boolean (POWER_SAVE_ON_BATTERY,
-                                                           NULL, NULL,
-                                                           TRUE,
-                                                           G_PARAM_READWRITE));
-    /**
      * XfpmXfconf::enable-cpu-freq-control
      **/
     g_object_class_install_property (object_class,

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


More information about the Xfce4-commits mailing list