[gnome-power-manager] Make changes to the Power control center capplet to better match the mockup
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-power-manager] Make changes to the Power control center capplet to better match the mockup
- Date: Thu, 30 Sep 2010 14:29:31 +0000 (UTC)
commit 965e8cb3871cb6de26accafde6d27928f076ef7c
Author: Richard Hughes <richard hughsie com>
Date: Thu Sep 30 15:28:03 2010 +0100
Make changes to the Power control center capplet to better match the mockup
data/gpm-prefs.ui | 1163 +++++++++++++++++---------------------------------
src/cc-power-panel.c | 79 +----
2 files changed, 389 insertions(+), 853 deletions(-)
---
diff --git a/data/gpm-prefs.ui b/data/gpm-prefs.ui
index 57dfbbe..f11c764 100644
--- a/data/gpm-prefs.ui
+++ b/data/gpm-prefs.ui
@@ -1,55 +1,7 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="2.16"/>
<!-- interface-naming-policy toplevel-contextual -->
- <object class="GtkAdjustment" id="adjustment1">
- <property name="value">1</property>
- <property name="lower">1</property>
- <property name="upper">61</property>
- <property name="step_increment">1</property>
- <property name="page_increment">5</property>
- </object>
- <object class="GtkAdjustment" id="adjustment2">
- <property name="value">23</property>
- <property name="lower">1</property>
- <property name="upper">61</property>
- <property name="step_increment">1</property>
- <property name="page_increment">5</property>
- </object>
- <object class="GtkAdjustment" id="adjustment3">
- <property name="value">0.5</property>
- <property name="upper">1</property>
- <property name="step_increment">0.01</property>
- <property name="page_increment">0.050000000000000003</property>
- </object>
- <object class="GtkAdjustment" id="adjustment4">
- <property name="value">1</property>
- <property name="lower">1</property>
- <property name="upper">61</property>
- <property name="step_increment">1</property>
- <property name="page_increment">5</property>
- </object>
- <object class="GtkAdjustment" id="adjustment5">
- <property name="value">23</property>
- <property name="lower">1</property>
- <property name="upper">61</property>
- <property name="step_increment">1</property>
- <property name="page_increment">5</property>
- </object>
- <object class="GtkAdjustment" id="adjustment6">
- <property name="value">1</property>
- <property name="lower">1</property>
- <property name="upper">61</property>
- <property name="step_increment">1</property>
- <property name="page_increment">5</property>
- </object>
- <object class="GtkAdjustment" id="adjustment7">
- <property name="value">23</property>
- <property name="lower">1</property>
- <property name="upper">61</property>
- <property name="step_increment">1</property>
- <property name="page_increment">5</property>
- </object>
<object class="GtkDialog" id="dialog_preferences">
<property name="border_width">5</property>
<property name="title" translatable="yes">Power Management Preferences</property>
@@ -60,7 +12,6 @@
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox1">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
<object class="GtkNotebook" id="notebook_preferences">
@@ -71,247 +22,143 @@
<object class="GtkVBox" id="vbox_ac">
<property name="visible">True</property>
<property name="border_width">12</property>
- <property name="orientation">vertical</property>
- <property name="spacing">12</property>
+ <property name="spacing">9</property>
<child>
- <object class="GtkVBox" id="vbox_ac_actions">
+ <object class="GtkHBox" id="hbox_ac_display">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
+ <property name="spacing">12</property>
<child>
- <object class="GtkLabel" id="label_ac_actions_sect">
+ <object class="GtkLabel" id="label_ac_display">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes"><b>Actions</b></property>
- <property name="use_markup">True</property>
+ <property name="label" translatable="yes">Put _display to sleep when inactive for:</property>
+ <property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkAlignment" id="alignment45">
+ <object class="GtkComboBox" id="combobox_ac_display">
<property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkVBox" id="vbox79">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkHBox" id="hbox_ac_computer">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkLabel" id="label_ac_computer">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Put computer to _sleep when inactive for:</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="combobox_ac_computer">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox_ac_lid">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkLabel" id="label_ac_lid">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">When laptop lid is cl_osed:</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="combobox_ac_lid">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton_ac_spindown">
- <property name="label" translatable="yes">Sp_in down hard disks when possible</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- </child>
</object>
<packing>
- <property name="fill">False</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="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox_ac_display">
+ <object class="GtkHBox" id="hbox_ac_computer">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
+ <property name="spacing">12</property>
<child>
- <object class="GtkLabel" id="label_ac_display_sect">
+ <object class="GtkLabel" id="label_ac_computer">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes"><b>Display</b></property>
- <property name="use_markup">True</property>
+ <property name="label" translatable="yes">Put computer to _sleep when inactive for:</property>
+ <property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkAlignment" id="alignment46">
+ <object class="GtkComboBox" id="combobox_ac_computer">
<property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkVBox" id="vbox83">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">5</property>
- <child>
- <object class="GtkHBox" id="hbox_ac_display">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkLabel" id="label_ac_display">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Put _display to sleep when inactive for:</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="combobox_ac_display">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox_ac_brightness">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkLabel" id="label_ac_brightness">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Set display _brightness to:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">hscale_ac_brightness</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkHScale" id="hscale_ac_brightness">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="adjustment">adjustment3</property>
- <property name="digits">2</property>
- <property name="value_pos">bottom</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton_ac_display_dim">
- <property name="label" translatable="yes">Di_m display when idle</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- </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">False</property>
<property name="position">1</property>
</packing>
</child>
+ <child>
+ <object class="GtkHBox" id="hbox_ac_lid">
+ <property name="visible">True</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label_ac_lid">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">When laptop lid is cl_osed:</property>
+ <property name="use_underline">True</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="combobox_ac_lid">
+ <property name="visible">True</property>
+ </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">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton_ac_spindown">
+ <property name="label" translatable="yes">Sp_in down hard disks when possible</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton_ac_display_dim">
+ <property name="label" translatable="yes">Di_m display when idle</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
</object>
+ <packing>
+ <property name="tab_fill">False</property>
+ </packing>
</child>
<child type="tab">
<object class="GtkLabel" id="label_tab_ac">
@@ -326,259 +173,192 @@
<object class="GtkVBox" id="vbox_battery">
<property name="visible">True</property>
<property name="border_width">12</property>
- <property name="orientation">vertical</property>
- <property name="spacing">12</property>
+ <property name="spacing">9</property>
<child>
- <object class="GtkVBox" id="vbox_battery_actions">
+ <object class="GtkHBox" id="hbox_battery_display">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
+ <property name="spacing">12</property>
<child>
- <object class="GtkLabel" id="label_battery_actions_sect">
+ <object class="GtkLabel" id="label_battery_display">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes"><b>Actions</b></property>
- <property name="use_markup">True</property>
+ <property name="label" translatable="yes">Put _display to sleep when inactive for:</property>
+ <property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkAlignment" id="alignment47">
+ <object class="GtkComboBox" id="combobox_battery_display">
<property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkVBox" id="vbox86">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkHBox" id="hbox_battery_computer">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkLabel" id="label_battery_computer">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Put computer to _sleep when inactive for:</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="combobox_battery_computer">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox_battery_lid">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkLabel" id="label_battery_lid">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">When laptop lid is cl_osed:</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="combobox_battery_lid">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox20">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkLabel" id="label121">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">When battery po_wer is critically low:</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="combobox_battery_critical">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton_battery_spindown">
- <property name="label" translatable="yes">Sp_in down hard disks when possible</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">3</property>
- </packing>
- </child>
- </object>
- </child>
</object>
<packing>
- <property name="fill">False</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="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox_battery_display">
+ <object class="GtkHBox" id="hbox_battery_computer">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
+ <property name="spacing">12</property>
<child>
- <object class="GtkLabel" id="label_battery_display_sect">
+ <object class="GtkLabel" id="label_battery_computer">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes"><b>Display</b></property>
- <property name="use_markup">True</property>
+ <property name="label" translatable="yes">Put computer to _sleep when inactive for:</property>
+ <property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkAlignment" id="alignment48">
+ <object class="GtkComboBox" id="combobox_battery_computer">
<property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkVBox" id="vbox88">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">5</property>
- <child>
- <object class="GtkHBox" id="hbox_battery_display">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkLabel" id="label_battery_display">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Put _display to sleep when inactive for:</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="combobox_battery_display">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton_battery_display_reduce">
- <property name="label" translatable="yes">_Reduce backlight brightness</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton_battery_display_dim">
- <property name="label" translatable="yes">Di_m display when idle</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- </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>
+ <child>
+ <object class="GtkHBox" id="hbox_battery_lid">
+ <property name="visible">True</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label_battery_lid">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">When laptop lid is cl_osed:</property>
+ <property name="use_underline">True</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="combobox_battery_lid">
+ <property name="visible">True</property>
+ </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">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox20">
+ <property name="visible">True</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label121">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">When battery po_wer is critically low:</property>
+ <property name="use_underline">True</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="combobox_battery_critical">
+ <property name="visible">True</property>
+ </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">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton_battery_spindown">
+ <property name="label" translatable="yes">Sp_in down hard disks when possible</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton_battery_display_reduce">
+ <property name="label" translatable="yes">_Reduce backlight brightness</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">5</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton_battery_display_dim">
+ <property name="label" translatable="yes">Di_m display when idle</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">6</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="position">1</property>
+ <property name="tab_fill">False</property>
</packing>
</child>
<child type="tab">
@@ -595,436 +375,241 @@
<object class="GtkVBox" id="vbox_ups">
<property name="visible">True</property>
<property name="border_width">12</property>
- <property name="orientation">vertical</property>
- <property name="spacing">12</property>
+ <property name="spacing">9</property>
<child>
- <object class="GtkVBox" id="vbox_ups_actions">
+ <object class="GtkHBox" id="hbox_ups_display">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
+ <property name="spacing">12</property>
<child>
- <object class="GtkLabel" id="label_ups_actions_sect">
+ <object class="GtkLabel" id="label_ups_display">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes"><b>Actions</b></property>
- <property name="use_markup">True</property>
+ <property name="label" translatable="yes">Put _display to sleep when inactive for:</property>
+ <property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkAlignment" id="alignment49">
+ <object class="GtkComboBox" id="combobox_ups_display">
<property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkVBox" id="vbox91">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkHBox" id="hbox_ups_computer">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkLabel" id="label_ups_computer">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Put computer to _sleep when inactive for:</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="combobox_ups_computer">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox18">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkLabel" id="label_ups_low">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">When UPS power is l_ow:</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="combobox_ups_low">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox19">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkLabel" id="label_ups_critical">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">When UPS power is _critically low:</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="combobox_ups_critical">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- </child>
</object>
<packing>
- <property name="fill">False</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="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox_ups_display">
+ <object class="GtkHBox" id="hbox_ups_computer">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
+ <property name="spacing">12</property>
<child>
- <object class="GtkLabel" id="label_ups_display_sect">
+ <object class="GtkLabel" id="label_ups_computer">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes"><b>Display</b></property>
- <property name="use_markup">True</property>
+ <property name="label" translatable="yes">Put computer to _sleep when inactive for:</property>
+ <property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkAlignment" id="alignment50">
+ <object class="GtkComboBox" id="combobox_ups_computer">
<property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkVBox" id="vbox93">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">5</property>
- <child>
- <object class="GtkHBox" id="hbox_ups_display">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkLabel" id="label_ups_display">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Put _display to sleep when inactive for:</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="combobox_ups_display">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- </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>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="label_tab_ups">
- <property name="visible">True</property>
- <property name="label" translatable="yes">On UPS Power</property>
- </object>
- <packing>
- <property name="position">2</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox_general">
- <property name="visible">True</property>
- <property name="border_width">12</property>
- <property name="orientation">vertical</property>
- <property name="spacing">12</property>
<child>
- <object class="GtkVBox" id="vbox75">
+ <object class="GtkHBox" id="hbox18">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
+ <property name="spacing">12</property>
<child>
- <object class="GtkLabel" id="label122">
+ <object class="GtkLabel" id="label_ups_low">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes"><b>Actions</b></property>
- <property name="use_markup">True</property>
+ <property name="label" translatable="yes">When UPS power is l_ow:</property>
+ <property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkAlignment" id="alignment44">
+ <object class="GtkComboBox" id="combobox_ups_low">
<property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkVBox" id="vbox76">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkHBox" id="hbox_general_power">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkLabel" id="label_general_power">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">When the power _button is pressed:</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="combobox_general_power">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox_general_suspend">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkLabel" id="label_general_suspend">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">When the _suspend button is pressed:</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="combobox_general_suspend">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
</object>
<packing>
- <property name="fill">False</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">0</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox_notification">
+ <object class="GtkHBox" id="hbox19">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
+ <property name="spacing">12</property>
<child>
- <object class="GtkLabel" id="label_notification_area_sect">
+ <object class="GtkLabel" id="label_ups_critical">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes"><b>Notification Area</b></property>
- <property name="use_markup">True</property>
+ <property name="label" translatable="yes">When UPS power is _critically low:</property>
+ <property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkAlignment" id="alignment37">
+ <object class="GtkComboBox" id="combobox_ups_critical">
<property name="visible">True</property>
- <property name="left_padding">12</property>
+ </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">3</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label_tab_ups">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">On UPS Power</property>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox_general">
+ <property name="visible">True</property>
+ <property name="border_width">12</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkVBox" id="vbox76">
+ <property name="visible">True</property>
+ <property name="spacing">9</property>
+ <child>
+ <object class="GtkHBox" id="hbox_general_power">
+ <property name="visible">True</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label_general_power">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">When the power _button is pressed:</property>
+ <property name="use_underline">True</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="combobox_general_power">
+ <property name="visible">True</property>
+ </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">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox_general_suspend">
+ <property name="visible">True</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label_general_suspend">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">When the _suspend button is pressed:</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
<child>
- <object class="GtkVBox" id="vbox62">
+ <object class="GtkComboBox" id="combobox_general_suspend">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkRadioButton" id="radiobutton_notification_never">
- <property name="label" translatable="yes">_Never display an icon</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkRadioButton" id="radiobutton_notification_low">
- <property name="label" translatable="yes">_Only display an icon when battery power is low</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- <property name="group">radiobutton_notification_never</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkRadioButton" id="radiobutton_notification_charge">
- <property name="label" translatable="yes">Only display an icon when charging or _discharging</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- <property name="group">radiobutton_notification_never</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkRadioButton" id="radiobutton_notification_present">
- <property name="label" translatable="yes">Only display an icon when a battery is p_resent</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- <property name="group">radiobutton_notification_never</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">3</property>
- </packing>
- </child>
</object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
</child>
</object>
<packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="position">1</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
</packing>
</child>
</object>
@@ -1044,6 +629,8 @@
</child>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
@@ -1085,6 +672,7 @@
</object>
<packing>
<property name="expand">False</property>
+ <property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
@@ -1096,4 +684,21 @@
<action-widget response="0">button_defaults</action-widget>
</action-widgets>
</object>
+ <object class="GtkSizeGroup" id="sizegroup_labels">
+ <widgets>
+ <widget name="label_ups_critical"/>
+ <widget name="label_ups_low"/>
+ <widget name="label_ups_computer"/>
+ <widget name="label_ups_display"/>
+ <widget name="label121"/>
+ <widget name="label_battery_lid"/>
+ <widget name="label_battery_computer"/>
+ <widget name="label_battery_display"/>
+ <widget name="label_ac_lid"/>
+ <widget name="label_ac_computer"/>
+ <widget name="label_ac_display"/>
+ <widget name="label_general_power"/>
+ <widget name="label_general_suspend"/>
+ </widgets>
+ </object>
</interface>
diff --git a/src/cc-power-panel.c b/src/cc-power-panel.c
index fa863f6..c7e4517 100644
--- a/src/cc-power-panel.c
+++ b/src/cc-power-panel.c
@@ -66,17 +66,6 @@ cc_power_panel_help_cb (GtkWidget *widget, CcPowerPanel *panel)
}
/**
- * cc_power_panel_icon_radio_cb:
- **/
-static void
-cc_power_panel_icon_radio_cb (GtkWidget *widget, CcPowerPanel *panel)
-{
- gint policy;
- policy = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), "policy"));
- g_settings_set_enum (panel->priv->settings, GPM_SETTINGS_ICON_POLICY, policy);
-}
-
-/**
* cc_power_panel_format_percentage_cb:
**/
static gchar *
@@ -312,63 +301,6 @@ cc_power_panel_setup_time_combo (CcPowerPanel *panel, const gchar *widget_name,
G_CALLBACK (cc_power_panel_action_time_changed_cb), panel);
}
-/** setup the notification page */
-static void
-cc_power_panel_setup_notification (CcPowerPanel *panel)
-{
- gint icon_policy;
- GtkWidget *radiobutton_icon_present;
- GtkWidget *radiobutton_icon_charge;
- GtkWidget *radiobutton_icon_low;
- GtkWidget *radiobutton_icon_never;
- gboolean is_writable;
-
- icon_policy = g_settings_get_enum (panel->priv->settings, GPM_SETTINGS_ICON_POLICY);
- radiobutton_icon_present = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder,
- "radiobutton_notification_present"));
- radiobutton_icon_charge = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder,
- "radiobutton_notification_charge"));
- radiobutton_icon_low = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder,
- "radiobutton_notification_low"));
- radiobutton_icon_never = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder,
- "radiobutton_notification_never"));
-
- is_writable = g_settings_is_writable (panel->priv->settings, GPM_SETTINGS_ICON_POLICY);
- gtk_widget_set_sensitive (radiobutton_icon_present, is_writable);
- gtk_widget_set_sensitive (radiobutton_icon_charge, is_writable);
- gtk_widget_set_sensitive (radiobutton_icon_low, is_writable);
- gtk_widget_set_sensitive (radiobutton_icon_never, is_writable);
-
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radiobutton_icon_present),
- icon_policy == GPM_ICON_POLICY_PRESENT);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radiobutton_icon_charge),
- icon_policy == GPM_ICON_POLICY_CHARGE);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radiobutton_icon_low),
- icon_policy == GPM_ICON_POLICY_LOW);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radiobutton_icon_never),
- icon_policy == GPM_ICON_POLICY_NEVER);
-
- g_object_set_data (G_OBJECT (radiobutton_icon_present), "policy",
- GINT_TO_POINTER (GPM_ICON_POLICY_PRESENT));
- g_object_set_data (G_OBJECT (radiobutton_icon_charge), "policy",
- GINT_TO_POINTER (GPM_ICON_POLICY_CHARGE));
- g_object_set_data (G_OBJECT (radiobutton_icon_low), "policy",
- GINT_TO_POINTER (GPM_ICON_POLICY_LOW));
- g_object_set_data (G_OBJECT (radiobutton_icon_never), "policy",
- GINT_TO_POINTER (GPM_ICON_POLICY_NEVER));
-
- /* only connect the callbacks after we set the value, else the settings
- * keys gets written to (for a split second), and the icon flickers. */
- g_signal_connect (radiobutton_icon_present, "clicked",
- G_CALLBACK (cc_power_panel_icon_radio_cb), panel);
- g_signal_connect (radiobutton_icon_charge, "clicked",
- G_CALLBACK (cc_power_panel_icon_radio_cb), panel);
- g_signal_connect (radiobutton_icon_low, "clicked",
- G_CALLBACK (cc_power_panel_icon_radio_cb), panel);
- g_signal_connect (radiobutton_icon_never, "clicked",
- G_CALLBACK (cc_power_panel_icon_radio_cb), panel);
-}
-
/**
* cc_power_panel_setup_ac:
**/
@@ -412,11 +344,11 @@ cc_power_panel_setup_ac (CcPowerPanel *panel)
button_lid_actions);
/* setup brightness slider */
- widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, "hscale_ac_brightness"));
- g_settings_bind (panel->priv->settings, GPM_SETTINGS_BRIGHTNESS_AC,
- widget, "fill-level",
- G_SETTINGS_BIND_DEFAULT);
- g_signal_connect (G_OBJECT (widget), "format-value",
+// widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, "hscale_ac_brightness"));
+// g_settings_bind (panel->priv->settings, GPM_SETTINGS_BRIGHTNESS_AC,
+// widget, "fill-level",
+// G_SETTINGS_BIND_DEFAULT);
+if(0) g_signal_connect (G_OBJECT (widget), "format-value",
G_CALLBACK (cc_power_panel_format_percentage_cb), NULL);
/* set up the checkboxes */
@@ -768,7 +700,6 @@ cc_power_panel_init (CcPowerPanel *panel)
cc_power_panel_setup_battery (panel);
cc_power_panel_setup_ups (panel);
cc_power_panel_setup_general (panel);
- cc_power_panel_setup_notification (panel);
out:
main_window = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, "dialog_preferences"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]