[Xfce4-commits] [xfce/xfce4-power-manager] 05/07: Move display brightness settings to a separate tab
noreply at xfce.org
noreply at xfce.org
Thu Jul 10 19:34:01 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 84638aed53480f0c22da5aa132844f396f414122
Author: Harald Judt <h.judt at gmx.at>
Date: Wed Jul 9 17:25:08 2014 +0200
Move display brightness settings to a separate tab
Brightness handling is usually done by the kernel, so the user should have the
privilege to decide whether power manager takes over the handling or not. It is
not good to automatically take over the handling, break it and then make the user
worry how to get everything going again.
This means we will need more options that will not fit on the display tab anymore,
so create an extra tab for brightness.
As an added benefit, this solves the layout problems with the sizing behaviour
of the sliders in the table.
---
data/interfaces/xfpm-settings.ui | 214 +++++++++++++++++++++++++++++---------
1 file changed, 164 insertions(+), 50 deletions(-)
diff --git a/data/interfaces/xfpm-settings.ui b/data/interfaces/xfpm-settings.ui
index 0cfbfe9..a6d7d03 100644
--- a/data/interfaces/xfpm-settings.ui
+++ b/data/interfaces/xfpm-settings.ui
@@ -594,6 +594,18 @@
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
</child>
</object>
@@ -929,6 +941,7 @@
<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>
@@ -942,6 +955,7 @@
<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>
@@ -955,6 +969,7 @@
<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>
@@ -968,7 +983,6 @@
<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>
@@ -982,13 +996,11 @@
<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="blank-on-battery">
- <property name="width_request">200</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="update_policy">discontinuous</property>
@@ -1002,13 +1014,11 @@
<property name="right_attach">2</property>
<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="GtkHScale" id="blank-on-ac">
- <property name="width_request">200</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="update_policy">discontinuous</property>
@@ -1022,7 +1032,6 @@
<property name="right_attach">3</property>
<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>
@@ -1042,7 +1051,6 @@
<property name="right_attach">2</property>
<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>
@@ -1062,7 +1070,6 @@
<property name="right_attach">3</property>
<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>
@@ -1082,7 +1089,6 @@
<property name="right_attach">2</property>
<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>
@@ -1102,7 +1108,6 @@
<property name="right_attach">3</property>
<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>
@@ -1118,6 +1123,18 @@
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
</child>
</object>
@@ -1138,6 +1155,70 @@
<property name="position">1</property>
</packing>
</child>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </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="vbox8">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">12</property>
+ <property name="spacing">18</property>
+ <child>
+ <object class="GtkVBox" id="vbox9">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkCheckButton" id="enable-brg-ctrl">
+ <property name="label" translatable="yes">_Handle display 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">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="enable-brg-keys">
+ <property name="label" translatable="yes">_Register display brightness shortcut keys</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">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="GtkFrame" id="frame7">
<property name="visible">True</property>
@@ -1154,7 +1235,7 @@
<object class="GtkTable" id="table4">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_rows">2</property>
+ <property name="n_rows">3</property>
<property name="n_columns">3</property>
<property name="column_spacing">12</property>
<property name="row_spacing">3</property>
@@ -1166,6 +1247,9 @@
<property name="label" translatable="yes">On inactivity reduce to</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>
@@ -1177,8 +1261,9 @@
<property name="label" translatable="yes">Reduce after</property>
</object>
<packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
+ <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>
@@ -1188,6 +1273,7 @@
<property name="can_focus">True</property>
<property name="update_policy">discontinuous</property>
<property name="adjustment">adjustment8</property>
+ <property name="round_digits">0</property>
<property name="digits">0</property>
<property name="value_pos">bottom</property>
<signal name="format-value" handler="format_brightness_value_cb" swapped="no"/>
@@ -1196,9 +1282,8 @@
<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="x_options">GTK_FILL</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
@@ -1208,6 +1293,7 @@
<property name="can_focus">True</property>
<property name="update_policy">discontinuous</property>
<property name="adjustment">adjustment4</property>
+ <property name="round_digits">0</property>
<property name="digits">0</property>
<property name="value_pos">bottom</property>
<signal name="format-value" handler="format_brightness_value_cb" swapped="no"/>
@@ -1216,9 +1302,8 @@
<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="x_options">GTK_FILL</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
@@ -1228,6 +1313,7 @@
<property name="can_focus">True</property>
<property name="update_policy">discontinuous</property>
<property name="adjustment">adjustment11</property>
+ <property name="round_digits">0</property>
<property name="digits">0</property>
<property name="value_pos">bottom</property>
<signal name="format-value" handler="format_brightness_percentage_cb" swapped="no"/>
@@ -1236,7 +1322,8 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="x_options">GTK_FILL</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
@@ -1246,6 +1333,7 @@
<property name="can_focus">True</property>
<property name="update_policy">discontinuous</property>
<property name="adjustment">adjustment10</property>
+ <property name="round_digits">0</property>
<property name="digits">0</property>
<property name="value_pos">bottom</property>
<signal name="format-value" handler="format_brightness_percentage_cb" swapped="no"/>
@@ -1254,10 +1342,46 @@
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
- <property name="x_options">GTK_FILL</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="GtkLabel" id="brightness_onbattery">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">On battery</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
+ <child>
+ <object class="GtkLabel" id="brightness_pluggedin">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Plugged in</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
</child>
</object>
@@ -1267,7 +1391,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="ypad">1</property>
- <property name="label" translatable="yes"><b>Brightness</b></property>
+ <property name="label" translatable="yes"><b>Power saving</b></property>
<property name="use_markup">True</property>
</object>
</child>
@@ -1275,22 +1399,23 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">2</property>
+ <property name="position">1</property>
</packing>
</child>
</object>
<packing>
- <property name="position">2</property>
+ <property name="position">3</property>
</packing>
</child>
<child type="tab">
- <object class="GtkLabel" id="display">
+ <object class="GtkLabel" id="brightness">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Display</property>
+ <property name="label" translatable="yes">_Brightness</property>
+ <property name="use_underline">True</property>
</object>
<packing>
- <property name="position">2</property>
+ <property name="position">3</property>
<property name="tab_fill">False</property>
</packing>
</child>
@@ -1315,39 +1440,28 @@
<action-widget response="-3">close-button</action-widget>
</action-widgets>
</object>
- <object class="GtkSizeGroup" id="sg_critical_power">
+ <object class="GtkSizeGroup" id="sg_brightness_sliders">
<widgets>
- <widget name="critical-level-label"/>
- <widget name="battery-critical-label"/>
+ <widget name="brg-level-on-battery"/>
+ <widget name="brg-on-battery"/>
+ <widget name="brg-level-on-ac"/>
+ <widget name="brg-on-ac"/>
</widgets>
</object>
- <object class="GtkSizeGroup" id="sg_display_ac">
+ <object class="GtkSizeGroup" id="sg_critical_power">
<widgets>
- <widget name="display_pluggedin"/>
- <widget name="blank-on-ac"/>
- <widget name="sleep-dpms-on-ac"/>
- <widget name="off-dpms-on-ac"/>
- <widget name="brg-on-ac"/>
- <widget name="brg-level-on-ac"/>
+ <widget name="critical-level-label"/>
+ <widget name="battery-critical-label"/>
</widgets>
</object>
- <object class="GtkSizeGroup" id="sg_display_battery">
+ <object class="GtkSizeGroup" id="sg_display_sliders">
<widgets>
- <widget name="display_onbattery"/>
<widget name="blank-on-battery"/>
+ <widget name="blank-on-ac"/>
<widget name="sleep-dpms-on-battery"/>
+ <widget name="sleep-dpms-on-ac"/>
<widget name="off-dpms-on-battery"/>
- <widget name="brg-on-battery"/>
- <widget name="brg-level-on-battery"/>
- </widgets>
- </object>
- <object class="GtkSizeGroup" id="sg_display_labels">
- <widgets>
- <widget name="blank-display-label"/>
- <widget name="sleep-display-label"/>
- <widget name="switch-off-display-label"/>
- <widget name="reduce-brightness-label"/>
- <widget name="reduce-brightness-to-label"/>
+ <widget name="off-dpms-on-ac"/>
</widgets>
</object>
<object class="GtkListStore" id="model1">
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list