Merge lp:~willcooke/unity-control-center/unity-control-center into lp:unity-control-center

Proposed by Will Cooke on 2016-07-06
Status: Merged
Approved by: Sebastien Bacher on 2016-07-12
Approved revision: 12867
Merged at revision: 12875
Proposed branch: lp:~willcooke/unity-control-center/unity-control-center
Merge into: lp:unity-control-center
Diff against target: 104 lines (+1/-61)
2 files modified
panels/power/cc-power-panel.c (+0/-13)
panels/power/power.ui (+1/-48)
To merge this branch: bzr merge lp:~willcooke/unity-control-center/unity-control-center
Reviewer Review Type Date Requested Status
Robert Ancell Approve on 2016-07-07
Sebastien Bacher 2016-07-06 Pending
Review via email: mp+299325@code.launchpad.net

Commit message

Removed "when battery is critical" functionality from the power panel as this is now handled by Upower and these settings now do nothing. Fixes LP: #1599264

Description of the change

Removed "when battery is critical" functionality from the power panel as this is now handled by Upower and these settings now do nothing. Fixes LP: #1599264

To post a comment you must log in.
Robert Ancell (robert-ancell) wrote :

gnome-control-center did the same thing in commit 008d7c1468854ec17a25397e353f987b858405cf, so it makes sense for us to do it too.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'panels/power/cc-power-panel.c'
2--- panels/power/cc-power-panel.c 2016-03-09 21:55:46 +0000
3+++ panels/power/cc-power-panel.c 2016-07-06 15:53:20 +0000
4@@ -1007,8 +1007,6 @@
5 gtk_widget_set_visible (WID (priv->builder, "label_header_battery"), has_batteries);
6 gtk_widget_set_visible (WID (priv->builder, "label_header_ac"), has_batteries);
7 gtk_widget_set_visible (WID (priv->builder, "combobox_sleep_battery"), has_batteries);
8- gtk_widget_set_visible (WID (priv->builder, "label_critical"), has_batteries);
9- gtk_widget_set_visible (WID (priv->builder, "combobox_critical"), has_batteries);
10 }
11
12 static gboolean
13@@ -1095,17 +1093,6 @@
14 G_CALLBACK (combo_time_changed_cb),
15 self);
16
17- /* actions */
18- value = g_settings_get_enum (self->priv->gsd_settings, "critical-battery-action");
19- widget = GTK_WIDGET (gtk_builder_get_object (self->priv->builder,
20- "combobox_critical"));
21- disable_unavailable_combo_items (self, GTK_COMBO_BOX (widget));
22- set_value_for_combo (GTK_COMBO_BOX (widget), value);
23- g_object_set_data (G_OBJECT(widget), "_gsettings_key", "critical-battery-action");
24- g_signal_connect (widget, "changed",
25- G_CALLBACK (combo_enum_changed_cb),
26- self);
27-
28 /* set screen link */
29 widget = GTK_WIDGET (gtk_builder_get_object (self->priv->builder,
30 "label_screen_settings"));
31
32=== modified file 'panels/power/power.ui'
33--- panels/power/power.ui 2013-11-28 06:13:07 +0000
34+++ panels/power/power.ui 2016-07-06 15:53:20 +0000
35@@ -1,28 +1,7 @@
36 <?xml version="1.0" encoding="UTF-8"?>
37 <interface>
38 <!-- interface-requires gtk+ 3.0 -->
39- <object class="GtkListStore" id="liststore_critical">
40- <columns>
41- <!-- column-name name -->
42- <column type="gchararray"/>
43- <!-- column-name value -->
44- <column type="gint"/>
45- <!-- column-name sensitive -->
46- <column type="gboolean"/>
47- </columns>
48- <data>
49- <row>
50- <col id="0" translatable="yes">Hibernate</col>
51- <col id="1">3</col>
52- <col id="2">True</col>
53- </row>
54- <row>
55- <col id="0" translatable="yes">Power off</col>
56- <col id="1">2</col>
57- <col id="2">True</col>
58- </row>
59- </data>
60- </object>
61+
62 <object class="GtkListStore" id="liststore_time">
63 <columns>
64 <!-- column-name name -->
65@@ -200,31 +179,6 @@
66 </packing>
67 </child>
68 <child>
69- <object class="GtkLabel" id="label_critical">
70- <property name="visible">True</property>
71- <property name="can_focus">False</property>
72- <property name="halign">end</property>
73- <property name="label" translatable="yes">When power is _critically low</property>
74- <property name="use_underline">True</property>
75- <property name="mnemonic_widget">combobox_critical</property>
76- </object>
77- <packing>
78- <property name="left_attach">0</property>
79- <property name="top_attach">2</property>
80- </packing>
81- </child>
82- <child>
83- <object class="GtkComboBox" id="combobox_critical">
84- <property name="visible">True</property>
85- <property name="can_focus">False</property>
86- <property name="model">liststore_critical</property>
87- </object>
88- <packing>
89- <property name="left_attach">1</property>
90- <property name="top_attach">2</property>
91- </packing>
92- </child>
93- <child>
94 <object class="GtkLabel" id="label_lid_action">
95 <property name="visible">True</property>
96 <property name="can_focus">False</property>
97@@ -492,7 +446,6 @@
98 <widgets>
99 <widget name="combobox_lid_battery"/>
100 <widget name="combobox_lid_ac"/>
101- <widget name="combobox_critical"/>
102 <widget name="combobox_sleep_battery"/>
103 <widget name="combobox_sleep_ac"/>
104 <widget name="combobox_sleep_ac"/>

Subscribers

People subscribed via source and target branches