[Xfce4-commits] [xfce/xfce4-power-manager] 02/14: Move laptop lid to general tab

noreply at xfce.org noreply at xfce.org
Sun Jul 27 13:04:04 CEST 2014


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

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

commit 36d4560ff87c7950f7b1a7014421969b4e39c264
Author: Harald Judt <h.judt at gmx.at>
Date:   Thu Jul 24 14:57:28 2014 +0200

    Move laptop lid to general tab
---
 data/interfaces/xfpm-settings.ui |  187 ++++++++++++++++++++++++--------------
 settings/xfpm-settings.c         |   18 ++--
 2 files changed, 129 insertions(+), 76 deletions(-)

diff --git a/data/interfaces/xfpm-settings.ui b/data/interfaces/xfpm-settings.ui
index 48c8c25..87daa4e 100644
--- a/data/interfaces/xfpm-settings.ui
+++ b/data/interfaces/xfpm-settings.ui
@@ -144,6 +144,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="border_width">12</property>
+                    <property name="spacing">6</property>
                     <child>
                       <object class="GtkFrame" id="frame1">
                         <property name="visible">True</property>
@@ -281,7 +282,7 @@
                                   <packing>
                                     <property name="expand">False</property>
                                     <property name="fill">True</property>
-                                    <property name="position">1</property>
+                                    <property name="position">2</property>
                                   </packing>
                                 </child>
                               </object>
@@ -304,6 +305,120 @@
                       </packing>
                     </child>
                     <child>
+                      <object class="GtkFrame" id="frame-laptop-lid">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label_xalign">0</property>
+                        <property name="shadow_type">none</property>
+                        <child>
+                          <object class="GtkAlignment" id="alignment4">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="left_padding">12</property>
+                            <child>
+                              <object class="GtkTable" id="table5">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="n_rows">2</property>
+                                <property name="n_columns">3</property>
+                                <property name="column_spacing">18</property>
+                                <property name="row_spacing">6</property>
+                                <child>
+                                  <object class="GtkLabel" id="lid-on-battery-label">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">On battery</property>
+                                    <property name="use_markup">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="right_attach">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="lid-on-ac-label">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">Plugged in</property>
+                                    <property name="use_markup">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">2</property>
+                                    <property name="right_attach">3</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="lid-action-label">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">When laptop lid is closed</property>
+                                  </object>
+                                  <packing>
+                                    <property name="top_attach">1</property>
+                                    <property name="bottom_attach">2</property>
+                                    <property name="x_options">GTK_FILL</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkComboBox" id="lid-on-battery-combo">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <child>
+                                      <object class="GtkCellRendererText" id="renderer9"/>
+                                      <attributes>
+                                        <attribute name="text">0</attribute>
+                                      </attributes>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="right_attach">2</property>
+                                    <property name="top_attach">1</property>
+                                    <property name="bottom_attach">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkComboBox" id="lid-on-ac-combo">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <child>
+                                      <object class="GtkCellRendererText" id="renderer10"/>
+                                      <attributes>
+                                        <attribute name="text">0</attribute>
+                                      </attributes>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">2</property>
+                                    <property name="right_attach">3</property>
+                                    <property name="top_attach">1</property>
+                                    <property name="bottom_attach">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <placeholder/>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                        <child type="label">
+                          <object class="GtkLabel" id="label3">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes"><b>Laptop Lid</b></property>
+                            <property name="use_markup">True</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
                       <object class="GtkFrame" id="frame2">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
@@ -340,7 +455,7 @@
                       <packing>
                         <property name="expand">False</property>
                         <property name="fill">True</property>
-                        <property name="position">1</property>
+                        <property name="position">2</property>
                       </packing>
                     </child>
                   </object>
@@ -399,7 +514,7 @@
                               <object class="GtkTable" id="table2">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
-                                <property name="n_rows">4</property>
+                                <property name="n_rows">3</property>
                                 <property name="n_columns">3</property>
                                 <property name="column_spacing">18</property>
                                 <property name="row_spacing">6</property>
@@ -492,72 +607,6 @@
                                   <placeholder/>
                                 </child>
                                 <child>
-                                  <placeholder/>
-                                </child>
-                                <child>
-                                  <placeholder/>
-                                </child>
-                                <child>
-                                  <placeholder/>
-                                </child>
-                                <child>
-                                  <placeholder/>
-                                </child>
-                                <child>
-                                  <placeholder/>
-                                </child>
-                                <child>
-                                  <object class="GtkLabel" id="on-battery-lid-label">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">When laptop lid is closed</property>
-                                  </object>
-                                  <packing>
-                                    <property name="top_attach">3</property>
-                                    <property name="bottom_attach">4</property>
-                                    <property name="x_options">GTK_FILL</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkComboBox" id="on-battery-lid">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <signal name="changed" handler="on_battery_lid_changed_cb" swapped="no"/>
-                                    <child>
-                                      <object class="GtkCellRendererText" id="renderer6"/>
-                                      <attributes>
-                                        <attribute name="text">0</attribute>
-                                      </attributes>
-                                    </child>
-                                  </object>
-                                  <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="right_attach">2</property>
-                                    <property name="top_attach">3</property>
-                                    <property name="bottom_attach">4</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkComboBox" id="on-ac-lid">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <signal name="changed" handler="on_ac_lid_changed_cb" swapped="no"/>
-                                    <child>
-                                      <object class="GtkCellRendererText" id="renderer5"/>
-                                      <attributes>
-                                        <attribute name="text">0</attribute>
-                                      </attributes>
-                                    </child>
-                                  </object>
-                                  <packing>
-                                    <property name="left_attach">2</property>
-                                    <property name="right_attach">3</property>
-                                    <property name="top_attach">3</property>
-                                    <property name="bottom_attach">4</property>
-                                  </packing>
-                                </child>
-                                <child>
                                   <object class="GtkLabel" id="system-sleepmode-label">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
diff --git a/settings/xfpm-settings.c b/settings/xfpm-settings.c
index 803fe55..7c970fb 100644
--- a/settings/xfpm-settings.c
+++ b/settings/xfpm-settings.c
@@ -796,7 +796,7 @@ xfpm_settings_on_battery (XfconfChannel *channel, gboolean auth_suspend,
     /*
      * Lid switch settings on battery
      */
-    lid = GTK_WIDGET (gtk_builder_get_object (xml, "on-battery-lid"));
+    lid = GTK_WIDGET (gtk_builder_get_object (xml, "lid-on-battery-combo"));
     if ( has_lid )
     {
 	list_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_INT);
@@ -840,7 +840,7 @@ xfpm_settings_on_battery (XfconfChannel *channel, gboolean auth_suspend,
     }
     else
     {
-	label = GTK_WIDGET (gtk_builder_get_object (xml, "on-battery-lid-label"));
+	label = GTK_WIDGET (gtk_builder_get_object (xml, "lid-action-label"));
 	gtk_widget_hide (label);
 	gtk_widget_hide (lid);
     }
@@ -874,6 +874,8 @@ xfpm_settings_on_ac (XfconfChannel *channel, gboolean auth_suspend,
 {
     GtkWidget *inact;
     GtkWidget *lid;
+    GtkWidget *label;
+    GtkWidget *frame;
     GtkWidget *brg;
     GtkWidget *brg_level;
     GtkListStore *list_store;
@@ -915,7 +917,7 @@ xfpm_settings_on_ac (XfconfChannel *channel, gboolean auth_suspend,
     /*
      * Lid switch settings on AC power
      */
-    lid = GTK_WIDGET (gtk_builder_get_object (xml, "on-ac-lid"));
+    lid = GTK_WIDGET (gtk_builder_get_object (xml, "lid-on-ac-combo"));
     if ( has_lid )
     {
 	list_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_INT);
@@ -958,10 +960,11 @@ xfpm_settings_on_ac (XfconfChannel *channel, gboolean auth_suspend,
     }
     else
     {
-	GtkWidget *label;
-	label = GTK_WIDGET (gtk_builder_get_object (xml, "on-ac-lid-label"));
+	label = GTK_WIDGET (gtk_builder_get_object (xml, "lid-action-label"));
+	frame = GTK_WIDGET (gtk_builder_get_object (xml, "frame-laptop-lid"));
 	gtk_widget_hide (label);
 	gtk_widget_hide (lid);
+	gtk_widget_hide (frame);
     }
     
 	/*
@@ -2001,8 +2004,9 @@ xfpm_settings_dialog_new (XfconfChannel *channel, gboolean auth_suspend,
 	gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (xml ,"system_onbattery")));
 	gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (xml ,"system_pluggedin")));
 	gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (xml ,"inactivity-on-battery")));
-	gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (xml ,"on-battery-lid")));
-	gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (xml ,"on-battery-lid-label")));
+	gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (xml ,"lid-on-battery-label")));
+	gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (xml ,"lid-on-battery-combo")));
+	gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (xml ,"lid-on-ac-label")));
 	gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (xml ,"blank-on-battery")));
     }
     

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


More information about the Xfce4-commits mailing list