[Xfce4-commits] [xfce/xfce4-power-manager] 38/64: Redo settings dialog from scratch and remove unused code Remove trayicon and treeview code, make dpms mode sensitive conditionally Settings dialog now mostly conforms to Xfce's HIG

noreply at xfce.org noreply at xfce.org
Mon May 26 06:00:33 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 294db79e9c1a70483aeb3f4daf99dc779a0246e0
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Thu May 8 01:45:01 2014 +0200

    Redo settings dialog from scratch and remove unused code Remove trayicon and treeview code, make dpms mode sensitive conditionally Settings dialog now mostly conforms to Xfce's HIG
---
 data/interfaces/xfpm-settings.ui | 1634 ++++++++++++++++++++++----------------
 settings/xfpm-settings.c         |  197 +----
 2 files changed, 943 insertions(+), 888 deletions(-)

diff --git a/data/interfaces/xfpm-settings.ui b/data/interfaces/xfpm-settings.ui
index 3958ce8..7812fe7 100644
--- a/data/interfaces/xfpm-settings.ui
+++ b/data/interfaces/xfpm-settings.ui
@@ -13,178 +13,234 @@
       <object class="GtkVBox" id="dialog-vbox">
         <property name="visible">True</property>
         <child>
-          <object class="GtkVBox" id="plugged_box">
+          <object class="GtkVBox" id="plug-child">
             <property name="visible">True</property>
             <child>
-              <object class="GtkNotebook" id="notebook1">
+              <object class="GtkNotebook" id="main-notebook">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <child>
-                  <object class="GtkVBox" id="vbox-general">
+                  <object class="GtkVBox" id="vbox1">
                     <property name="visible">True</property>
-                    <property name="orientation">vertical</property>
+                    <property name="can_focus">False</property>
                     <property name="border_width">12</property>
                     <child>
-                      <object class="GtkTable" id="table3">
+                      <object class="GtkFrame" id="frame1">
                         <property name="visible">True</property>
-                        <property name="n_rows">4</property>
-                        <property name="n_columns">2</property>
-                        <property name="column_spacing">6</property>
-                        <child>
-                          <object class="GtkComboBox" id="power-combox">
-                            <property name="visible">True</property>
-                            <property name="model">model1</property>
-                            <signal name="changed" handler="button_power_changed_cb"/>
-                            <child>
-                              <object class="GtkCellRendererText" id="renderer1"/>
-                            <attributes>
-                              <attribute name="text">0</attribute>
-                            </attributes>
-                            </child>
-                          </object>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="top_attach">1</property>
-                            <property name="y_padding">3</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkComboBox" id="sleep-combox">
-                            <property name="visible">True</property>
-                            <property name="model">model4</property>
-                            <signal name="changed" handler="button_sleep_changed_cb"/>
-                            <child>
-                              <object class="GtkCellRendererText" id="renderer4"/>
-                              <attributes>
-                                <attribute name="text">0</attribute>
-                              </attributes>
-                            </child>
-                          </object>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="top_attach">3</property>
-                            <property name="y_padding">3</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="sleep-label">
-                            <property name="visible">True</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">When sleep button is pressed</property>
-                          </object>
-                          <packing>
-                            <property name="top_attach">3</property>
-                            <property name="bottom_attach">4</property>
-                            <property name="x_options">GTK_FILL</property>
-                          </packing>
-                        </child>
+                        <property name="can_focus">False</property>
+                        <property name="label_xalign">0</property>
+                        <property name="shadow_type">none</property>
                         <child>
-                          <object class="GtkComboBox" id="hibernate-combox">
+                          <object class="GtkAlignment" id="alignment1">
                             <property name="visible">True</property>
-                            <property name="model">model3</property>
-                            <signal name="changed" handler="button_hibernate_changed_cb"/>
+                            <property name="can_focus">False</property>
+                            <property name="border_width">6</property>
+                            <property name="bottom_padding">18</property>
+                            <property name="left_padding">12</property>
                             <child>
-                              <object class="GtkCellRendererText" id="renderer3"/>
-                              <attributes>
-                                <attribute name="text">0</attribute>
-                              </attributes>
+                              <object class="GtkVBox" id="vbox2">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="spacing">5</property>
+                                <child>
+                                  <object class="GtkTable" id="table1">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="n_rows">3</property>
+                                    <property name="n_columns">2</property>
+                                    <property name="column_spacing">6</property>
+                                    <property name="row_spacing">6</property>
+                                    <child>
+                                      <object class="GtkLabel" id="power-label">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="xalign">0</property>
+                                        <property name="label" translatable="yes">When power button is pressed</property>
+                                      </object>
+                                      <packing>
+                                        <property name="x_options">GTK_FILL</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkLabel" id="sleep-label">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="xalign">0</property>
+                                        <property name="label" translatable="yes">When sleep button is pressed</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="GtkLabel" id="hibernate-label">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="xalign">0</property>
+                                        <property name="label" translatable="yes">When hibernate button is pressed</property>
+                                      </object>
+                                      <packing>
+                                        <property name="top_attach">2</property>
+                                        <property name="bottom_attach">3</property>
+                                        <property name="x_options">GTK_FILL</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkComboBox" id="power-combox">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <signal name="changed" handler="button_power_changed_cb" swapped="no"/>
+                                        <child>
+                                          <object class="GtkCellRendererText" id="renderer1"/>
+                                          <attributes>
+                                            <attribute name="text">0</attribute>
+                                          </attributes>
+                                        </child>
+                                      </object>
+                                      <packing>
+                                        <property name="left_attach">1</property>
+                                        <property name="right_attach">2</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkComboBox" id="sleep-combox">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <signal name="changed" handler="button_sleep_changed_cb" swapped="no"/>
+                                        <child>
+                                          <object class="GtkCellRendererText" id="renderer4"/>
+                                          <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="hibernate-combox">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <signal name="changed" handler="button_hibernate_changed_cb" swapped="no"/>
+                                        <child>
+                                          <object class="GtkCellRendererText" id="renderer3"/>
+                                          <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">2</property>
+                                        <property name="bottom_attach">3</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkCheckButton" id="lock-screen">
+                                    <property name="label" translatable="yes">Lock screen when going for suspend/hibernate</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="use_action_appearance">False</property>
+                                    <property name="draw_indicator">True</property>
+                                    <signal name="toggled" handler="lock_screen_toggled_cb" swapped="no"/>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkCheckButton" id="network-manager-sleep">
+                                    <property name="label" translatable="yes">Notify Network Manager of suspend/hibernate</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="tooltip_text" translatable="yes">When enabled this signals to network manager that the system is going to suspend/hibernate so it can power down the network interfaces, saving power.</property>
+                                    <property name="use_action_appearance">False</property>
+                                    <property name="draw_indicator">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">2</property>
+                                  </packing>
+                                </child>
+                              </object>
                             </child>
                           </object>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="top_attach">2</property>
-                            <property name="y_padding">3</property>
-                          </packing>
                         </child>
-                        <child>
-                          <object class="GtkLabel" id="hibernate-label">
+                        <child type="label">
+                          <object class="GtkLabel" id="label1">
                             <property name="visible">True</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">When hibernate button is pressed</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes"><b>Default actions</b></property>
+                            <property name="use_markup">True</property>
                           </object>
-                          <packing>
-                            <property name="top_attach">2</property>
-                            <property name="bottom_attach">3</property>
-                            <property name="x_options">GTK_FILL</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="power-label">
-                            <property name="visible">True</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">When power button is pressed</property>
-                          </object>
-                          <packing>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                            <property name="x_options">GTK_FILL</property>
-                          </packing>
                         </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkFrame" id="frame2">
+                        <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="GtkComboBox" id="tray-combox">
+                          <object class="GtkAlignment" id="alignment2">
                             <property name="visible">True</property>
-                            <signal name="changed" handler="set_show_tray_icon_cb"/>
+                            <property name="can_focus">False</property>
+                            <property name="border_width">6</property>
+                            <property name="bottom_padding">6</property>
+                            <property name="left_padding">12</property>
                             <child>
-                              <object class="GtkCellRendererText" id="renderer2"/>
-                              <attributes>
-                                <attribute name="text">0</attribute>
-                              </attributes>
+                              <object class="GtkCheckButton" id="notification">
+                                <property name="label" translatable="yes">Show notifications</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="use_action_appearance">False</property>
+                                <property name="draw_indicator">True</property>
+                                <signal name="toggled" handler="notify_toggled_cb" swapped="no"/>
+                              </object>
                             </child>
                           </object>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="y_padding">3</property>
-                          </packing>
                         </child>
-                        <child>
-                          <object class="GtkLabel" id="label24">
+                        <child type="label">
+                          <object class="GtkLabel" id="label5">
                             <property name="visible">True</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">System tray icon</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes"><b>Appearance</b></property>
+                            <property name="use_markup">True</property>
                           </object>
-                          <packing>
-                            <property name="x_options">GTK_FILL</property>
-                          </packing>
                         </child>
                       </object>
                       <packing>
                         <property name="expand">False</property>
-                        <property name="padding">3</property>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkCheckButton" id="enable-dpms">
-                        <property name="label" translatable="yes">Monitor power management control</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="draw_indicator">True</property>
-                        <property name="tooltip-text" translatable="yes">Disable Display Power Management Signaling (DPMS), e.g don't attempt to switch off the display or put it in sleep mode.</property>
-                        <signal name="toggled" handler="dpms_toggled_cb"/>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="padding">3</property>
+                        <property name="fill">True</property>
                         <property name="position">1</property>
                       </packing>
                     </child>
-                    <child>
-                      <object class="GtkCheckButton" id="notification">
-                        <property name="label" translatable="yes">Show notifications</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="notify_toggled_cb"/>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="padding">3</property>
-                        <property name="position">2</property>
-                      </packing>
-                    </child>
                   </object>
                 </child>
                 <child type="tab">
@@ -194,286 +250,470 @@
                     <property name="label" translatable="yes">General</property>
                   </object>
                   <packing>
-                    <property name="position">0</property>
                     <property name="tab_fill">False</property>
                   </packing>
                 </child>
                 <child>
-                <object class="GtkVBox" id="vbox-actions">
-                  <property name="visible">True</property>
-                  <property name="orientation">vertical</property>
-                  <property name="border_width">12</property>
-                  <child>
-                  <object class="GtkTable" id="actions_table">
+                  <object class="GtkVBox" id="vbox3">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="n_rows">6</property>
-                    <property name="n_columns">3</property>
-                    <property name="row_spacing">6</property>
-                    <property name="column_spacing">12</property>
-                    <child>
-                      <placeholder/>
-                    </child>
+                    <property name="border_width">12</property>
+                    <property name="spacing">6</property>
                     <child>
-                      <object class="GtkLabel" id="actions_onbattery_label">
+                      <object class="GtkAlignment" id="alignment5">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="label" translatable="yes"><b>On Battery</b></property>
-                        <property name="use_markup">True</property>
+                        <property name="bottom_padding">18</property>
+                        <child>
+                          <object class="GtkVBox" id="vbox5">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="spacing">3</property>
+                            <child>
+                              <object class="GtkHBox" id="hbox1">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="spacing">6</property>
+                                <child>
+                                  <object class="GtkLabel" id="system-sleepmode-label">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">System 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="system-sleep-mode">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <signal name="changed" handler="on_sleep_mode_changed_cb" swapped="no"/>
+                                    <child>
+                                      <object class="GtkCellRendererText" id="renderer8"/>
+                                      <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">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="use_action_appearance">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>
                       <packing>
-                        <property name="left_attach">1</property>
-                        <property name="top_attach">0</property>
-                        <property name="y_padding">6</property>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkLabel" id="actions_onac_label">
+                      <object class="GtkFrame" id="frame5">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="label" translatable="yes"><b>Plugged In</b></property>
-                        <property name="use_markup">True</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">2</property>
-                        <property name="top_attach">0</property>
-                        <property name="y_padding">6</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" id="on-battery-lid-label">
-                        <property name="visible">True</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">When laptop lid is closed</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">1</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="model">model6</property>
-                        <signal name="changed" handler="on_battery_lid_changed_cb"/>
+                        <property name="label_xalign">0</property>
+                        <property name="shadow_type">none</property>
                         <child>
-                          <object class="GtkCellRendererText" id="renderer6"/>
-                            <attributes>
-                              <attribute name="text">0</attribute>
-                            </attributes>
+                          <object class="GtkAlignment" id="alignment6">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="bottom_padding">6</property>
+                            <property name="left_padding">12</property>
+                            <child>
+                              <object class="GtkTable" id="table2">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="n_rows">3</property>
+                                <property name="n_columns">3</property>
+                                <property name="row_spacing">6</property>
+                                <property name="column_spacing">18</property>
+                                <child>
+                                  <object class="GtkLabel" id="label3">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes"><b>On battery</b></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="label4">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes"><b>Plugged in</b></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="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">1</property>
+                                    <property name="bottom_attach">2</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">1</property>
+                                    <property name="bottom_attach">2</property>
+                                  </packing>
+                                </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">1</property>
+                                    <property name="bottom_attach">2</property>
+                                    <property name="x_options">GTK_FILL</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="label7">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">Put system to sleep when inactive for</property>
+                                  </object>
+                                  <packing>
+                                    <property name="top_attach">2</property>
+                                    <property name="bottom_attach">3</property>
+                                    <property name="x_options">GTK_FILL</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkHScale" id="inactivity-on-battery">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="adjustment">adjustment5</property>
+                                    <property name="update_policy">discontinuous</property>
+                                    <property name="digits">0</property>
+                                    <property name="value_pos">bottom</property>
+                                    <signal name="format_value" handler="format_inactivity_value_cb" swapped="no"/>
+                                    <signal name="value_changed" handler="inactivity_on_battery_value_changed_cb" swapped="no"/>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="right_attach">2</property>
+                                    <property name="top_attach">2</property>
+                                    <property name="bottom_attach">3</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkHScale" id="inactivity-on-ac">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="adjustment">adjustment1</property>
+                                    <property name="update_policy">discontinuous</property>
+                                    <property name="digits">0</property>
+                                    <property name="value_pos">bottom</property>
+                                    <signal name="format_value" handler="format_inactivity_value_cb" swapped="no"/>
+                                    <signal name="value_changed" handler="inactivity_on_ac_value_changed_cb" swapped="no"/>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">2</property>
+                                    <property name="right_attach">3</property>
+                                    <property name="top_attach">2</property>
+                                    <property name="bottom_attach">3</property>
+                                  </packing>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                        <child type="label">
+                          <object class="GtkLabel" id="label8">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes"><b>System power saving</b></property>
+                            <property name="use_markup">True</property>
+                          </object>
                         </child>
                       </object>
                       <packing>
-                        <property name="left_attach">1</property>
-                        <property name="top_attach">1</property>
-                        <property name="x_options">GTK_EXPAND</property>
-                        <property name="y_options">GTK_EXPAND</property>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkComboBox" id="on-ac-lid">
+                      <object class="GtkFrame" id="frame3">
                         <property name="visible">True</property>
-                        <property name="model">model5</property>
-                        <signal name="changed" handler="on_ac_lid_changed_cb"/>
+                        <property name="can_focus">False</property>
+                        <property name="label_xalign">0</property>
+                        <property name="shadow_type">none</property>
                         <child>
-                          <object class="GtkCellRendererText" id="renderer5"/>
-                            <attributes>
-                              <attribute name="text">0</attribute>
-                            </attributes>
+                          <object class="GtkAlignment" id="alignment3">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="border_width">6</property>
+                            <property name="bottom_padding">6</property>
+                            <property name="left_padding">12</property>
+                            <child>
+                              <object class="GtkVBox" id="vbox4">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="spacing">3</property>
+                                <child>
+                                  <object class="GtkHBox" id="hbox2">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="spacing">6</property>
+                                    <child>
+                                      <object class="GtkLabel" id="critical-level-label">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="xalign">0</property>
+                                        <property name="label" translatable="yes">Critical battery power level</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkSpinButton" id="critical-spin">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="invisible_char">•</property>
+                                        <property name="adjustment">adjustment9</property>
+                                        <property name="primary_icon_activatable">False</property>
+                                        <property name="secondary_icon_activatable">False</property>
+                                        <property name="primary_icon_sensitive">True</property>
+                                        <property name="secondary_icon_sensitive">True</property>
+                                        <signal name="value_changed" handler="critical_level_value_changed_cb" swapped="no"/>
+                                        <signal name="output" handler="critical_spin_output_cb" swapped="no"/>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkHBox" id="hbox3">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="spacing">6</property>
+                                    <child>
+                                      <object class="GtkLabel" id="label11">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="xalign">0</property>
+                                        <property name="label" translatable="yes">On critical battery power</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="battery-critical-combox">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <signal name="changed" handler="battery_critical_changed_cb" swapped="no"/>
+                                        <child>
+                                          <object class="GtkCellRendererText" id="renderer7"/>
+                                          <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">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                        <child type="label">
+                          <object class="GtkLabel" id="label9">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes"><b>Critical power</b></property>
+                            <property name="use_markup">True</property>
+                          </object>
                         </child>
                       </object>
                       <packing>
-                        <property name="left_attach">2</property>
-                        <property name="top_attach">1</property>
-                        <property name="x_options">GTK_EXPAND</property>
-                        <property name="y_options">GTK_EXPAND</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" id="label6">
-                        <property name="visible">True</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">Put the computer to sleep when inactive for</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">2</property>
-                        <property name="x_options">GTK_FILL</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkHScale" id="inactivity-on-battery">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="update_policy">discontinuous</property>
-                        <property name="adjustment">adjustment5</property>
-                        <property name="digits">0</property>
-                        <property name="value_pos">bottom</property>
-                        <signal name="value_changed" handler="inactivity_on_battery_value_changed_cb"/>
-                        <signal name="format_value" handler="format_inactivity_value_cb"/>
-                      </object>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="top_attach">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkHScale" id="inactivity-on-ac">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="update_policy">discontinuous</property>
-                        <property name="adjustment">adjustment1</property>
-                        <property name="digits">0</property>
-                        <property name="value_pos">bottom</property>
-                        <signal name="value_changed" handler="inactivity_on_ac_value_changed_cb"/>
-                        <signal name="format_value" handler="format_inactivity_value_cb"/>
-                      </object>
-                      <packing>
-                        <property name="left_attach">2</property>
-                        <property name="top_attach">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" id="label10">
-                        <property name="visible">True</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">Spin down hard disks</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">3</property>
-                        <property name="x_options">GTK_FILL</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkCheckButton" id="spin-down-on-battery">
-                         <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="on_battery_spin_changed"/>
-                       </object>
-                       <packing>
-                        <property name="left_attach">1</property>
-                        <property name="top_attach">3</property>
-                        <property name="x_options">GTK_EXPAND</property>
-                        <property name="y_options">GTK_EXPAND</property>
-                       </packing>
-                     </child>
-                     <child>
-                      <object class="GtkCheckButton" id="spin-down-on-ac">
-                         <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="on_ac_spin_changed"/>
-                       </object>
-                       <packing>
-                        <property name="left_attach">2</property>
-                        <property name="top_attach">3</property>
-                        <property name="x_options">GTK_EXPAND</property>
-                        <property name="y_options">GTK_EXPAND</property>
-                       </packing>
-                     </child>
-                     <child>
-                      <object class="GtkLabel" id="label34">
-                        <property name="visible">True</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">When battery power is at</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">4</property>
-                        <property name="x_options">GTK_FILL</property>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">2</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkHBox" id="critical-box">
+                      <object class="GtkFrame" id="frame4">
                         <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="GtkSpinButton" id="critical-spin">
+                          <object class="GtkAlignment" id="alignment4">
                             <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="invisible_char">&#x25CF;</property>
-                            <property name="adjustment">adjustment9</property>
-                            <signal name="value_changed" handler="critical_level_value_changed_cb"/>
-                            <signal name="output" handler="critical_spin_output_cb"/>
+                            <property name="can_focus">False</property>
+                            <property name="border_width">6</property>
+                            <property name="bottom_padding">6</property>
+                            <property name="left_padding">12</property>
+                            <child>
+                              <object class="GtkHBox" id="hbox4">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="spacing">6</property>
+                                <child>
+                                  <object class="GtkLabel" id="label13">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">Spin down hard disks</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkCheckButton" id="spin-down-on-battery">
+                                     <property name="visible">True</property>
+                                     <property name="can_focus">True</property>
+                                     <property name="receives_default">False</property>
+                                     <property name="label" translatable="yes">On battery</property>
+                                     <property name="draw_indicator">True</property>
+                                     <signal name="toggled" handler="on_battery_spin_changed"/>
+                                   </object>
+                                   <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
+                                   </packing>
+                                 </child>
+                                 <child>
+                                  <object class="GtkCheckButton" id="spin-down-on-ac">
+                                     <property name="visible">True</property>
+                                     <property name="can_focus">True</property>
+                                     <property name="receives_default">False</property>
+                                     <property name="label" translatable="yes">Plugged in</property>
+                                     <property name="draw_indicator">True</property>
+                                     <signal name="toggled" handler="on_ac_spin_changed"/>
+                                   </object>
+                                   <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">2</property>
+                                   </packing>
+                                 </child>
+                              </object>
+                            </child>
                           </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="padding">3</property>
-                            <property name="position">0</property>
-                          </packing>
                         </child>
-                        <child>
-                          <object class="GtkComboBox" id="battery-critical-combox">
+                        <child type="label">
+                          <object class="GtkLabel" id="label12">
                             <property name="visible">True</property>
-                            <property name="model">model7</property>
-                            <signal name="changed" handler="battery_critical_changed_cb"/>
-                            <child>
-                              <object class="GtkCellRendererText" id="renderer7"/>
-                                <attributes>
-                                  <attribute name="text">0</attribute>
-                                </attributes>
-                            </child>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes"><b>Hard disks</b></property>
+                            <property name="use_markup">True</property>
                           </object>
-                          <packing>
-                            <property name="expand">True</property>
-                            <property name="fill">True</property>
-                            <property name="padding">3</property>
-                            <property name="position">1</property>
-                          </packing>
                         </child>
                       </object>
                       <packing>
-                        <property name="left_attach">1</property>
-                        <property name="top_attach">4</property>
-                        <property name="x_options">GTK_EXPAND</property>
-                        <property name="y_options">GTK_EXPAND</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" id="label35">
-                        <property name="visible">True</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">Prefer saving power over performance</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">5</property>
-                        <property name="x_options">GTK_FILL</property>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">3</property>
                       </packing>
                     </child>
-                    <child>
-                      <object class="GtkCheckButton" id="power-save">
-                         <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"/>
-                       </object>
-                       <packing>
-                        <property name="left_attach">1</property>
-                        <property name="top_attach">5</property>
-                        <property name="x_options">GTK_EXPAND</property>
-                        <property name="y_options">GTK_EXPAND</property>
-                       </packing>
-                     </child>
                   </object>
                   <packing>
-                    <property name="expand">False</property>
+                    <property name="position">1</property>
                   </packing>
-                  </child>
-                  </object>
                 </child>
                 <child type="tab">
-                  <object class="GtkLabel" id="actions">
+                  <object class="GtkLabel" id="system">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="label" translatable="yes">Actions</property>
+                    <property name="label" translatable="yes">System</property>
                   </object>
                   <packing>
                     <property name="position">1</property>
@@ -481,362 +721,366 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkVBox" id="vbox-display">
-                    <property name="visible">True</property>
-                    <property name="orientation">vertical</property>
-                    <property name="border_width">12</property>
-                  <child>
-                  <object class="GtkTable" id="display_table">
+                  <object class="GtkVBox" id="vbox6">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="n_rows">5</property>
-                    <property name="n_columns">3</property>
-                    <property name="row_spacing">6</property>
-                    <property name="column_spacing">12</property>
-                    <child>
-                      <object class="GtkLabel" id="display_onbattery_label">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes"><b>On Battery</b></property>
-                        <property name="use_markup">True</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="top_attach">0</property>
-                        <property name="y_padding">6</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" id="display_onac_label">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes"><b>Plugged In</b></property>
-                        <property name="use_markup">True</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">2</property>
-                        <property name="top_attach">0</property>
-                        <property name="y_padding">6</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" id="label36">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">Put display to sleep after</property>
-                        <property name="xalign">0</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">1</property>
-                        <property name="x_options">GTK_FILL</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkHScale" id="sleep-dpms-on-battery">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="update_policy">discontinuous</property>
-                        <property name="adjustment">adjustment6</property>
-                        <property name="digits">0</property>
-                        <property name="value_pos">bottom</property>
-                        <signal name="value_changed" handler="sleep_on_battery_value_changed_cb"/>
-                        <signal name="format_value" handler="format_dpms_value_cb"/>
-                      </object>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="top_attach">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkHScale" id="sleep-dpms-on-ac">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="update_policy">discontinuous</property>
-                        <property name="adjustment">adjustment2</property>
-                        <property name="digits">0</property>
-                        <property name="value_pos">bottom</property>
-                        <signal name="value_changed" handler="sleep_on_ac_value_changed_cb"/>
-                        <signal name="format_value" handler="format_dpms_value_cb"/>
-                      </object>
-                      <packing>
-                        <property name="left_attach">2</property>
-                        <property name="top_attach">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" id="label37">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">Switch off display after</property>
-                        <property name="xalign">0</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">2</property>
-                        <property name="x_options">GTK_FILL</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkHScale" id="off-dpms-on-battery">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="update_policy">discontinuous</property>
-                        <property name="adjustment">adjustment7</property>
-                        <property name="digits">0</property>
-                        <property name="value_pos">bottom</property>
-                        <signal name="value_changed" handler="off_on_battery_value_changed_cb"/>
-                        <signal name="format_value" handler="format_dpms_value_cb"/>
-                      </object>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="top_attach">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkHScale" id="off-dpms-on-ac">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="update_policy">discontinuous</property>
-                        <property name="adjustment">adjustment3</property>
-                        <property name="digits">0</property>
-                        <property name="value_pos">bottom</property>
-                        <signal name="value_changed" handler="off_on_ac_value_changed_cb"/>
-                        <signal name="format_value" handler="format_dpms_value_cb"/>
-                      </object>
-                      <packing>
-                        <property name="left_attach">2</property>
-                        <property name="top_attach">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" id="label38">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">Reduce brightness on inactivity</property>
-                        <property name="xalign">0</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">3</property>
-                        <property name="x_options">GTK_FILL</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkHScale" id="brg-on-battery">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="update_policy">discontinuous</property>
-                        <property name="adjustment">adjustment8</property>
-                        <property name="digits">0</property>
-                        <property name="value_pos">bottom</property>
-                        <signal name="value_changed" handler="brightness_on_battery_value_changed_cb"/>
-                        <signal name="format_value" handler="format_brightness_value_cb"/>
-                      </object>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="top_attach">3</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkHScale" id="brg-on-ac">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="update_policy">discontinuous</property>
-                        <property name="adjustment">adjustment4</property>
-                        <property name="digits">0</property>
-                        <property name="value_pos">bottom</property>
-                        <signal name="value_changed" handler="brightness_on_ac_value_changed_cb"/>
-                        <signal name="format_value" handler="format_brightness_value_cb"/>
-                      </object>
-                      <packing>
-                        <property name="left_attach">2</property>
-                        <property name="top_attach">3</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" id="label39">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">Reduce brightness to</property>
-                        <property name="xalign">0</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">4</property>
-                        <property name="x_options">GTK_FILL</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkSpinButton" id="brg-level-on-battery">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="invisible_char">&#x25CF;</property>
-                        <property name="adjustment">adjustment11</property>
-                        <property name="update_policy">if-valid</property>
-                        <signal name="value_changed" handler="brightness_level_on_battery"/>
-                        <signal name="output" handler="critical_spin_output_cb"/>
-                      </object>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="top_attach">4</property>
-                        <property name="x_options">GTK_EXPAND</property>
-                        <property name="y_options">GTK_EXPAND</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkSpinButton" id="brg-level-on-ac">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="invisible_char">&#x25CF;</property>
-                        <property name="adjustment">adjustment10</property>
-                        <property name="update_policy">if-valid</property>
-                        <signal name="value_changed" handler="brightness_level_on_ac"/>
-                        <signal name="output" handler="critical_spin_output_cb"/>
-                      </object>
-                      <packing>
-                        <property name="left_attach">2</property>
-                        <property name="top_attach">4</property>
-                        <property name="x_options">GTK_EXPAND</property>
-                        <property name="y_options">GTK_EXPAND</property>
-                      </packing>
-                    </child>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                  </packing>
-                  </child>
-                  </object>
-                </child>
-                <child type="tab">
-                  <object class="GtkLabel" id="display">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="label" translatable="yes">Display</property>
-                  </object>
-                  <packing>
-                    <property name="position">2</property>
-                    <property name="tab_fill">False</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkVBox" id="vbox-advanced">
-                    <property name="visible">True</property>
-                    <property name="orientation">vertical</property>
                     <property name="border_width">12</property>
-                  <child>
-                  <object class="GtkTable" id="advanced_table">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="n_rows">5</property>
-                    <property name="n_columns">3</property>
-                    <property name="row_spacing">6</property>
-                    <property name="column_spacing">6</property>
+                    <property name="spacing">18</property>
                     <child>
-                      <object class="GtkLabel" id="advanced_sleepmode_label">
+                      <object class="GtkVBox" id="vbox7">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">Computer sleep mode</property>
-                        <property name="xalign">0</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">0</property>
-                        <property name="x_options">GTK_FILL</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkComboBox" id="sleep-mode">
-                        <property name="visible">True</property>
-                        <property name="model">model6</property>
-                        <signal name="changed" handler="on_sleep_mode_changed_cb"/>
+                        <property name="spacing">6</property>
+                        <child>
+                          <object class="GtkCheckButton" id="enable-dpms">
+                            <property name="label" translatable="yes">Handle display power management</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="draw_indicator">True</property>
+                            <signal name="toggled" handler="dpms_toggled_cb" swapped="no"/>
+                          </object>
+                          <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
                         <child>
-                          <object class="GtkCellRendererText" id="renderer8"/>
-                            <attributes>
-                              <attribute name="text">0</attribute>
-                            </attributes>
+                          <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">Display 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="left_attach">1</property>
-                        <property name="top_attach">0</property>
-                        <property name="y_options">GTK_EXPAND</property>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="padding">6</property>
+                        <property name="position">0</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkLabel" id="dpms-mode-label">
+                      <object class="GtkTable" id="table3">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">Display sleep mode</property>
-                        <property name="xalign">0</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">1</property>
-                        <property name="x_options">GTK_FILL</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkComboBox" id="sleep-dpms-mode">
-                        <property name="visible">True</property>
-                        <property name="model">model6</property>
-                        <signal name="changed" handler="on_sleep_dpms_mode_changed_cb"/>
+                        <property name="n_rows">5</property>
+                        <property name="n_columns">3</property>
+                        <property name="row_spacing">3</property>
+                        <property name="column_spacing">12</property>
+                        <child>
+                          <object class="GtkLabel" id="label6">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes"><b>Display power saving</b></property>
+                            <property name="use_markup">True</property>
+                          </object>
+                          <packing>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label14">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Put display to sleep after</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label15">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Switch off display after</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">2</property>
+                            <property name="bottom_attach">3</property>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label16">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Reduce brightness on inactivity</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">3</property>
+                            <property name="bottom_attach">4</property>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label17">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Reduce brightness to</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">4</property>
+                            <property name="bottom_attach">5</property>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label18">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes"><b>On battery</b></property>
+                            <property name="use_markup">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label19">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes"><b>Plugged in</b></property>
+                            <property name="use_markup">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">2</property>
+                            <property name="right_attach">3</property>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkHScale" id="sleep-dpms-on-battery">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="update_policy">discontinuous</property>
+                            <property name="adjustment">adjustment6</property>
+                            <property name="digits">0</property>
+                            <property name="value_pos">bottom</property>
+                            <signal name="value_changed" handler="sleep_on_battery_value_changed_cb"/>
+                            <signal name="format_value" handler="format_dpms_value_cb"/>
+                          </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>
+                            <property name="y_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkHScale" id="sleep-dpms-on-ac">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="update_policy">discontinuous</property>
+                            <property name="adjustment">adjustment2</property>
+                            <property name="digits">0</property>
+                            <property name="value_pos">bottom</property>
+                            <signal name="value_changed" handler="sleep_on_ac_value_changed_cb"/>
+                            <signal name="format_value" handler="format_dpms_value_cb"/>
+                          </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>
+                            <property name="y_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkHScale" id="off-dpms-on-battery">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="update_policy">discontinuous</property>
+                            <property name="adjustment">adjustment7</property>
+                            <property name="digits">0</property>
+                            <property name="value_pos">bottom</property>
+                            <signal name="value_changed" handler="off_on_battery_value_changed_cb" swapped="no"/>
+                            <signal name="format_value" handler="format_dpms_value_cb" swapped="no"/>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">2</property>
+                            <property name="bottom_attach">3</property>
+                            <property name="y_options">GTK_FILL</property>
+                          </packing>
+                        </child>
                         <child>
-                          <object class="GtkCellRendererText" id="renderer9"/>
-                            <attributes>
-                              <attribute name="text">0</attribute>
-                            </attributes>
+                          <object class="GtkHScale" id="off-dpms-on-ac">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="update_policy">discontinuous</property>
+                            <property name="adjustment">adjustment3</property>
+                            <property name="digits">0</property>
+                            <property name="value_pos">bottom</property>
+                            <signal name="value_changed" handler="off_on_ac_value_changed_cb" swapped="no"/>
+                            <signal name="format_value" handler="format_dpms_value_cb" swapped="no"/>
+                          </object>
+                          <packing>
+                            <property name="left_attach">2</property>
+                            <property name="right_attach">3</property>
+                            <property name="top_attach">2</property>
+                            <property name="bottom_attach">3</property>
+                            <property name="y_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkHScale" id="brg-on-battery">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="update_policy">discontinuous</property>
+                            <property name="adjustment">adjustment8</property>
+                            <property name="digits">0</property>
+                            <property name="value_pos">bottom</property>
+                            <signal name="value_changed" handler="brightness_on_battery_value_changed_cb" swapped="no"/>
+                            <signal name="format_value" handler="format_brightness_value_cb" swapped="no"/>
+                          </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>
+                            <property name="y_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkHScale" id="brg-on-ac">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="update_policy">discontinuous</property>
+                            <property name="adjustment">adjustment4</property>
+                            <property name="digits">0</property>
+                            <property name="value_pos">bottom</property>
+                            <signal name="value_changed" handler="brightness_on_ac_value_changed_cb" swapped="no"/>
+                            <signal name="format_value" handler="format_brightness_value_cb" swapped="no"/>
+                          </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>
+                            <property name="y_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkSpinButton" id="brg-level-on-battery">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="invisible_char">•</property>
+                            <property name="adjustment">adjustment11</property>
+                            <property name="primary_icon_activatable">False</property>
+                            <property name="secondary_icon_activatable">False</property>
+                            <property name="primary_icon_sensitive">True</property>
+                            <property name="secondary_icon_sensitive">True</property>
+                            <signal name="output" handler="critical_spin_output_cb" swapped="no"/>
+                            <signal name="value_changed" handler="brightness_level_on_battery" swapped="no"/>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">4</property>
+                            <property name="bottom_attach">5</property>
+                            <property name="x_options"/>
+                            <property name="y_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkSpinButton" id="brg-level-on-ac">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="invisible_char">•</property>
+                            <property name="adjustment">adjustment10</property>
+                            <property name="primary_icon_activatable">False</property>
+                            <property name="secondary_icon_activatable">False</property>
+                            <property name="primary_icon_sensitive">True</property>
+                            <property name="secondary_icon_sensitive">True</property>
+                            <signal name="output" handler="critical_spin_output_cb" swapped="no"/>
+                            <signal name="value_changed" handler="brightness_level_on_ac" swapped="no"/>
+                          </object>
+                          <packing>
+                            <property name="left_attach">2</property>
+                            <property name="right_attach">3</property>
+                            <property name="top_attach">4</property>
+                            <property name="bottom_attach">5</property>
+                            <property name="x_options"/>
+                            <property name="y_options">GTK_FILL</property>
+                          </packing>
                         </child>
                       </object>
                       <packing>
-                        <property name="left_attach">1</property>
-                        <property name="top_attach">1</property>
-                        <property name="y_options">GTK_EXPAND</property>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
                       </packing>
                     </child>
                   </object>
                   <packing>
-                    <property name="expand">False</property>
+                    <property name="position">2</property>
                   </packing>
-                  </child>
-                  <child>
-                      <object class="GtkCheckButton" id="lock-screen">
-                        <property name="label" translatable="yes">Lock screen when going for suspend/hibernate</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="lock_screen_toggled_cb"/>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="padding">3</property>
-                      </packing>
-                    </child>
-                  <child>
-                      <object class="GtkCheckButton" id="network-manager-sleep">
-                        <property name="label" translatable="yes">Notify Network Manager of suspend/hibernate</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="draw_indicator">True</property>
-                        <property name="tooltip-text" translatable="yes">When enabled this signals to network manager that the system is going to suspend/hibernate so it can power down the network interfaces, saving power.</property>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="padding">3</property>
-                      </packing>
-                    </child>
-                  </object>
                 </child>
                 <child type="tab">
-                  <object class="GtkLabel" id="advanced">
+                  <object class="GtkLabel" id="display">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="label" translatable="yes">Advanced</property>
+                    <property name="label" translatable="yes">Display</property>
                   </object>
                   <packing>
-                    <property name="position">3</property>
+                    <property name="position">2</property>
                     <property name="tab_fill">False</property>
                   </packing>
                 </child>
@@ -889,7 +1133,7 @@
       <action-widget response="-3">close-button</action-widget>
     </action-widgets>
   </object>
-  <object class="GtkAdjustment" id="adjustment10">
+    <object class="GtkAdjustment" id="adjustment10">
     <property name="value">80</property>
     <property name="lower">1</property>
     <property name="upper">100</property>
diff --git a/settings/xfpm-settings.c b/settings/xfpm-settings.c
index ab590b2..c54a21d 100644
--- a/settings/xfpm-settings.c
+++ b/settings/xfpm-settings.c
@@ -71,9 +71,6 @@ void 	    brightness_level_on_battery 	   (GtkSpinButton *w,
 void	    battery_critical_changed_cb 	   (GtkWidget *w, 
 						    XfconfChannel *channel);
 
-void        set_show_tray_icon_cb                  (GtkWidget *w, 
-						    XfconfChannel *channel);
-
 void        inactivity_on_ac_value_changed_cb      (GtkWidget *widget, 
 						    XfconfChannel *channel);
 
@@ -205,30 +202,6 @@ battery_critical_changed_cb (GtkWidget *w, XfconfChannel *channel)
 }
 
 void
-set_show_tray_icon_cb (GtkWidget *w, XfconfChannel *channel)
-{
-    GtkTreeModel     *model;
-    GtkTreeIter       selected_row;
-    gint value = 0;
-    
-    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,
-                       1,
-                       &value,
-                       -1);
-    
-    if (!xfconf_channel_set_uint (channel, PROPERTIES_PREFIX SHOW_TRAY_ICON_CFG, value) )
-    {
-	g_critical ("Cannot set value for property %s\n", SHOW_TRAY_ICON_CFG);
-    }
-}
-
-void
 inactivity_on_ac_value_changed_cb (GtkWidget *widget, XfconfChannel *channel)
 {
     gint value    = (gint)gtk_range_get_value (GTK_RANGE (widget));
@@ -402,6 +375,7 @@ 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);
     
     if ( GTK_IS_WIDGET (on_battery_dpms_off ) )
     {
@@ -1101,7 +1075,6 @@ xfpm_settings_general (XfconfChannel *channel, gboolean auth_hibernate,
 		       gboolean has_sleep_button, gboolean has_hibernate_button,
 		       gboolean has_power_button)
 {
-    GtkWidget *tray;
     GtkWidget *power;
     GtkWidget *power_label;
     GtkWidget *hibernate;
@@ -1116,45 +1089,9 @@ xfpm_settings_general (XfconfChannel *channel, gboolean auth_hibernate,
     gboolean val;
     
     GtkWidget *dpms;
-
-    /*
-     *  Tray icon settings
-     */
     GtkListStore *list_store;
     GtkTreeIter iter;
-    
-    list_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_INT);
-    
-    tray = GTK_WIDGET (gtk_builder_get_object (xml, "tray-combox"));
-    gtk_combo_box_set_model (GTK_COMBO_BOX(tray), GTK_TREE_MODEL(list_store));
 
-    gtk_list_store_append(list_store, &iter);
-    gtk_list_store_set (list_store, &iter, 0, _("Always show icon"), 1, SHOW_ICON_ALWAYS, -1);
-
-    gtk_list_store_append(list_store, &iter);
-    gtk_list_store_set (list_store, &iter, 0, _("When battery is present"), 1, SHOW_ICON_WHEN_BATTERY_PRESENT, -1);
-    
-    gtk_list_store_append(list_store, &iter);
-    gtk_list_store_set (list_store, &iter, 0, _("When battery is charging or discharging"), 1, SHOW_ICON_WHEN_BATTERY_CHARGING_DISCHARGING, -1);
-    
-    gtk_list_store_append(list_store, &iter);
-    gtk_list_store_set (list_store, &iter, 0, _("Never show icon"), 1, NEVER_SHOW_ICON, -1);
-    
-    value = xfconf_channel_get_uint (channel, PROPERTIES_PREFIX SHOW_TRAY_ICON_CFG, SHOW_ICON_WHEN_BATTERY_PRESENT);
-    
-    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,
-			    1, &list_value, -1);
-	if ( value == list_value )
-	{
-	    gtk_combo_box_set_active_iter (GTK_COMBO_BOX (tray), &iter);
-	    break;
-	}
-    } 
-		      
     dpms = GTK_WIDGET (gtk_builder_get_object (xml, "enable-dpms"));
 #ifdef HAVE_DPMS
     /*
@@ -1360,8 +1297,8 @@ xfpm_settings_advanced (XfconfChannel *channel, gboolean system_laptop,
      * Computer sleep mode
      */
     list_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_INT);
-    sleep_mode = GTK_WIDGET (gtk_builder_get_object (xml, "sleep-mode"));
-    label = GTK_WIDGET (gtk_builder_get_object (xml, "advanced_sleepmode_label"));
+    sleep_mode = GTK_WIDGET (gtk_builder_get_object (xml, "system-sleep-mode"));
+    label = GTK_WIDGET (gtk_builder_get_object (xml, "system-sleepmode-label"));
     gtk_combo_box_set_model (GTK_COMBO_BOX(sleep_mode), GTK_TREE_MODEL(list_store));
     
     if ( can_suspend )
@@ -1508,130 +1445,6 @@ xfpm_settings_advanced (XfconfChannel *channel, gboolean system_laptop,
 #endif
 }
 
-void
-_cursor_changed_cb (GtkTreeView *view, gpointer data)
-{
-    GtkTreeSelection *sel;
-    GtkTreeModel     *model;
-    GtkTreeIter       selected_row;
-    gint int_data = 0;
-
-    sel = gtk_tree_view_get_selection (GTK_TREE_VIEW(view));
-
-    if ( !gtk_tree_selection_get_selected (sel, &model, &selected_row))
-	return;
-
-    gtk_tree_model_get(model,
-                       &selected_row,
-                       2,
-                       &int_data,
-                       -1);
-
-    if ( G_LIKELY (int_data >= 0 && int_data <= 3) )
-    {
-        gtk_notebook_set_current_page(GTK_NOTEBOOK(nt), int_data);
-    }
-}
-
-static void
-xfpm_settings_tree_view (XfconfChannel *channel, gboolean system_laptop)
-{
-    GtkWidget *view;
-    GdkPixbuf *pix;
-    GtkListStore *list_store;
-    GtkTreeIter iter;
-    GtkTreeViewColumn *col;
-    GtkCellRenderer *renderer;
-    GtkTreeSelection *sel;
-    GtkTreePath *path;
-    gint i = 0;
-    
-    view = GTK_WIDGET (gtk_builder_get_object (xml, "treeview"));
-    list_store = gtk_list_store_new(3, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_INT);
-
-    gtk_tree_view_set_model (GTK_TREE_VIEW(view), GTK_TREE_MODEL(list_store));
-    
-    gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(view),TRUE);
-    col = gtk_tree_view_column_new();
-
-    renderer = gtk_cell_renderer_pixbuf_new();
-    
-    gtk_tree_view_column_pack_start(col, renderer, FALSE);
-    gtk_tree_view_column_set_attributes(col, renderer, "pixbuf", 0, NULL);
-
-    renderer = gtk_cell_renderer_text_new();
-    gtk_tree_view_column_pack_start (col, renderer, FALSE);
-    gtk_tree_view_column_set_attributes (col, renderer, "text", 1, NULL);
-    
-    gtk_tree_view_append_column(GTK_TREE_VIEW(view),col);
-    
-    /*General settings */
-    pix = xfpm_icon_load ("preferences-system", 48); 
-    
-    gtk_list_store_append(list_store, &iter);
-    
-    if ( pix )
-    {
-	    gtk_list_store_set (list_store, &iter, 0, pix, 1, _("General"), 2, i, -1);
-	    g_object_unref(pix);
-    }
-    else
-    {
-	    gtk_list_store_set (list_store, &iter, 1, _("General"), 2, i, -1);
-    }
-    i++;
-    
-    /* ON ac power */
-    pix = xfpm_icon_load (XFPM_AC_ADAPTER_ICON, 48); 
-    gtk_list_store_append(list_store, &iter);
-    if ( pix )
-    {
-	    gtk_list_store_set(list_store, &iter, 0, pix, 1, _("On AC"), 2, i, -1);
-	    g_object_unref(pix);
-    }
-    else
-    {
-	    gtk_list_store_set(list_store, &iter, 1, _("On AC"), 2, i, -1);
-    }
-    i++;
-    
-    if ( system_laptop )
-    {
-	pix = xfpm_icon_load (XFPM_BATTERY_ICON, 48); 
-	gtk_list_store_append(list_store, &iter);
-	if ( pix )
-	{
-		gtk_list_store_set(list_store, &iter, 0, pix, 1, _("On Battery"), 2, i, -1);
-		g_object_unref(pix);
-	}
-	else
-	{
-		gtk_list_store_set(list_store, &iter, 1, _("On Battery"), 2, i, -1);
-	}
-    }
-    i++;
-    
-    pix = xfpm_icon_load ("applications-other", 48); 
-    gtk_list_store_append(list_store, &iter);
-    if ( pix )
-    {
-	    gtk_list_store_set(list_store, &iter, 0, pix, 1, _("Extended"), 2, i, -1);
-	    g_object_unref(pix);
-    }
-    else
-    {
-	    gtk_list_store_set(list_store, &iter, 1, _("Extended"), 2, i, -1);
-    }
-
-    sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(view));
-
-    path = gtk_tree_path_new_from_string("0");
-
-    gtk_tree_selection_select_path(sel, path);
-    gtk_tree_path_free(path);
-
-}
-
 static void
 settings_quit (GtkWidget *widget, XfconfChannel *channel)
 {
@@ -1726,8 +1539,6 @@ xfpm_settings_dialog_new (XfconfChannel *channel, gboolean system_laptop,
 				  has_lid,
 				  devkit_disk,
 				  can_spin_down);
-	
-    xfpm_settings_tree_view (channel, system_laptop);
     
     xfpm_settings_general   (channel, auth_hibernate, auth_suspend, can_shutdown, can_suspend, can_hibernate,
 			     has_sleep_button, has_hibernate_button, has_power_button );
@@ -1736,7 +1547,7 @@ xfpm_settings_dialog_new (XfconfChannel *channel, gboolean system_laptop,
     
     if ( id != 0 )
     {
-	plugged_box = GTK_WIDGET (gtk_builder_get_object (xml, "plugged_box"));
+	plugged_box = GTK_WIDGET (gtk_builder_get_object (xml, "plug-child"));
 	plug = gtk_plug_new (id);
 	gtk_widget_show (plug);
 	gtk_widget_reparent (plugged_box, plug);

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


More information about the Xfce4-commits mailing list