[Xfce4-commits] [xfce/xfce4-power-manager] 01/01: Remove the dpms sleep mode combobox Users can still control the sleep mode via the hidden option dpms-sleep-mode ("Standby" or "Suspend") The default value is "Suspend" (implicitely set in xfpm-dpms.c)
noreply at xfce.org
noreply at xfce.org
Thu Jul 17 00:08:23 CEST 2014
This is an automated email from the git hooks/post-receive script.
ochosi pushed a commit to branch master
in repository xfce/xfce4-power-manager.
commit 5cfb252b81c37aac8305b0cdbaaf49d7f168ae12
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Thu Jul 17 00:08:18 2014 +0200
Remove the dpms sleep mode combobox
Users can still control the sleep mode via the hidden option dpms-sleep-mode ("Standby" or "Suspend")
The default value is "Suspend" (implicitely set in xfpm-dpms.c)
---
data/interfaces/xfpm-settings.ui | 43 ------------------------
settings/xfpm-settings.c | 67 --------------------------------------
2 files changed, 110 deletions(-)
diff --git a/data/interfaces/xfpm-settings.ui b/data/interfaces/xfpm-settings.ui
index 32b471a..4e0a0f6 100644
--- a/data/interfaces/xfpm-settings.ui
+++ b/data/interfaces/xfpm-settings.ui
@@ -780,49 +780,6 @@
<property name="position">0</property>
</packing>
</child>
- <child>
- <object class="GtkHBox" id="hbox5">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="dpms-mode-label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Sleep mode</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="sleep-dpms-mode">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <signal name="changed" handler="on_sleep_dpms_mode_changed_cb" swapped="no"/>
- <child>
- <object class="GtkCellRendererText" id="renderer9"/>
- <attributes>
- <attribute name="text">0</attribute>
- </attributes>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
</object>
<packing>
<property name="expand">False</property>
diff --git a/settings/xfpm-settings.c b/settings/xfpm-settings.c
index 5ff353f..1662b8f 100644
--- a/settings/xfpm-settings.c
+++ b/settings/xfpm-settings.c
@@ -116,9 +116,6 @@ void notify_toggled_cb (GtkWidget *w,
void on_sleep_mode_changed_cb (GtkWidget *w,
XfconfChannel *channel);
-void on_sleep_dpms_mode_changed_cb (GtkWidget *w,
- XfconfChannel *channel);
-
void dpms_toggled_cb (GtkWidget *w,
XfconfChannel *channel);
@@ -350,30 +347,6 @@ on_sleep_mode_changed_cb (GtkWidget *w, XfconfChannel *channel)
}
void
-on_sleep_dpms_mode_changed_cb (GtkWidget *w, XfconfChannel *channel)
-{
- GtkTreeModel *model;
- GtkTreeIter selected_row;
- gchar *value = "";
-
- if (!gtk_combo_box_get_active_iter (GTK_COMBO_BOX (w), &selected_row))
- return;
-
- model = gtk_combo_box_get_model (GTK_COMBO_BOX(w));
-
- gtk_tree_model_get(model,
- &selected_row,
- 0,
- &value,
- -1);
-
- if (!xfconf_channel_set_string (channel, PROPERTIES_PREFIX DPMS_SLEEP_MODE, value) )
- {
- g_critical ("Cannot set value for property %s\n", DPMS_SLEEP_MODE);
- }
-}
-
-void
dpms_toggled_cb (GtkWidget *w, XfconfChannel *channel)
{
#ifdef HAVE_DPMS
@@ -383,8 +356,6 @@ dpms_toggled_cb (GtkWidget *w, XfconfChannel *channel)
gtk_widget_set_sensitive (on_ac_dpms_off, val);
gtk_widget_set_sensitive (on_ac_dpms_sleep, val);
- gtk_widget_set_sensitive (GTK_WIDGET (gtk_builder_get_object (xml, "sleep-dpms-mode")), val);
- gtk_widget_set_sensitive (GTK_WIDGET (gtk_builder_get_object (xml, "dpms-mode-label")), val);
gtk_widget_set_sensitive (GTK_WIDGET (gtk_builder_get_object (xml, "sleep-display-label")), val);
gtk_widget_set_sensitive (GTK_WIDGET (gtk_builder_get_object (xml, "switch-off-display-label")), val);
@@ -1211,7 +1182,6 @@ xfpm_settings_advanced (XfconfChannel *channel, gboolean auth_suspend,
GtkWidget *critical_level;
GtkWidget *lock;
GtkWidget *label;
- GtkWidget *sleep_dpms_mode;
GtkWidget *sleep_mode;
gchar *list_str;
@@ -1272,43 +1242,6 @@ xfpm_settings_advanced (XfconfChannel *channel, gboolean auth_suspend,
g_free (str);
/*
- * Display sleep mode
- */
- sleep_dpms_mode = GTK_WIDGET (gtk_builder_get_object (xml, "sleep-dpms-mode"));
-
-#ifdef HAVE_DPMS
- list_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_INT);
- gtk_combo_box_set_model (GTK_COMBO_BOX(sleep_dpms_mode), GTK_TREE_MODEL(list_store));
- gtk_list_store_append (list_store, &iter);
- gtk_list_store_set (list_store, &iter, 0, _("Suspend"), -1);
- gtk_list_store_append (list_store, &iter);
- gtk_list_store_set (list_store, &iter, 0, _("Standby"), -1);
-
- gtk_combo_box_set_active (GTK_COMBO_BOX (sleep_dpms_mode), 0);
-
- str = xfconf_channel_get_string (channel, PROPERTIES_PREFIX DPMS_SLEEP_MODE, "Standby");
-
- for ( valid = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (list_store), &iter);
- valid;
- valid = gtk_tree_model_iter_next (GTK_TREE_MODEL (list_store), &iter) )
- {
- gtk_tree_model_get (GTK_TREE_MODEL (list_store), &iter,
- 0, &list_str, -1);
- if ( g_strcmp0 (str, list_str) )
- {
- gtk_combo_box_set_active_iter (GTK_COMBO_BOX (sleep_dpms_mode), &iter);
- break;
- }
- }
-
- g_free (str);
-
-#else
- gtk_widget_hide (sleep_dpms_mode);
- gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (xml, "dpms-mode-label")));
-#endif
-
- /*
* Critical battery level
*/
critical_level = GTK_WIDGET (gtk_builder_get_object (xml, "critical-spin"));
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list