summaryrefslogtreecommitdiffstats
path: root/panels/power/cc-power-panel.ui
blob: 44c515b9500f821e7fedba47c9141efc0590a76f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <object class="GtkListStore" id="time_liststore">
    <columns>
      <!-- column-name name -->
      <column type="gchararray"/>
      <!-- column-name value -->
      <column type="gint"/>
    </columns>
    <data>
      <row>
        <col id="0" translatable="yes" context="automatic_suspend" comments="Translators: Option for &quot;Delay&quot; in &quot;Automatic suspend&quot; dialog.">15 minutes</col>
        <col id="1">900</col>
      </row>
      <row>
        <col id="0" translatable="yes" context="automatic_suspend" comments="Translators: Option for &quot;Delay&quot; in &quot;Automatic suspend&quot; dialog.">20 minutes</col>
        <col id="1">1200</col>
      </row>
      <row>
        <col id="0" translatable="yes" context="automatic_suspend" comments="Translators: Option for &quot;Delay&quot; in &quot;Automatic suspend&quot; dialog.">25 minutes</col>
        <col id="1">1500</col>
      </row>
      <row>
        <col id="0" translatable="yes" context="automatic_suspend" comments="Translators: Option for &quot;Delay&quot; in &quot;Automatic suspend&quot; dialog.">30 minutes</col>
        <col id="1">1800</col>
      </row>
      <row>
        <col id="0" translatable="yes" context="automatic_suspend" comments="Translators: Option for &quot;Delay&quot; in &quot;Automatic suspend&quot; dialog.">45 minutes</col>
        <col id="1">2700</col>
      </row>
      <row>
        <col id="0" translatable="yes" context="automatic_suspend" comments="Translators: Option for &quot;Delay&quot; in &quot;Automatic suspend&quot; dialog.">1 hour</col>
        <col id="1">3600</col>
      </row>
      <row>
        <col id="0" translatable="yes" context="automatic_suspend" comments="Translators: Option for &quot;Delay&quot; in &quot;Automatic suspend&quot; dialog.">80 minutes</col>
        <col id="1">4800</col>
      </row>
      <row>
        <col id="0" translatable="yes" context="automatic_suspend" comments="Translators: Option for &quot;Delay&quot; in &quot;Automatic suspend&quot; dialog.">90 minutes</col>
        <col id="1">5400</col>
      </row>
      <row>
        <col id="0" translatable="yes" context="automatic_suspend" comments="Translators: Option for &quot;Delay&quot; in &quot;Automatic suspend&quot; dialog.">100 minutes</col>
        <col id="1">6000</col>
      </row>
      <row>
        <col id="0" translatable="yes" context="automatic_suspend" comments="Translators: Option for &quot;Delay&quot; in &quot;Automatic suspend&quot; dialog.">2 hours</col>
        <col id="1">7200</col>
      </row>
    </data>
  </object>
  <template class="CcPowerPanel" parent="CcPanel">
    <child type="content">
      <object class="AdwPreferencesPage">
        <child>
          <object class="AdwPreferencesGroup" id="battery_section">
            <property name="title" translatable="yes">Battery</property>
            <child>
              <object class="GtkListBox" id="battery_listbox">
                <property name="selection-mode">none</property>
                <signal name="keynav-failed" handler="keynav_failed_cb" object="CcPowerPanel" swapped="yes"/>
                <accessibility>
                  <relation name="labelled-by">battery_section</relation>
                </accessibility>
                <style>
                  <class name="boxed-list"/>
                </style>
              </object>
            </child>
          </object>
        </child>
        <child>
          <object class="AdwPreferencesGroup" id="device_section">
            <property name="title" translatable="yes">Devices</property>
            <child>
              <object class="GtkListBox" id="device_listbox">
                <property name="selection-mode">none</property>
                <signal name="keynav-failed" handler="keynav_failed_cb" object="CcPowerPanel" swapped="yes"/>
                <accessibility>
                  <relation name="labelled-by">device_section</relation>
                </accessibility>
                <style>
                  <class name="boxed-list"/>
                </style>
              </object>
            </child>
          </object>
        </child>
        <child>
          <object class="AdwPreferencesGroup" id="power_profile_section">
            <property name="visible">False</property>
            <property name="title" translatable="yes">Power Mode</property>
            <property name="description" translatable="yes">Affects system performance and power usage.</property>
            <child>
              <object class="GtkListBox" id="power_profile_listbox">
                <property name="selection-mode">none</property>
                <signal name="keynav-failed" handler="keynav_failed_cb" object="CcPowerPanel" swapped="yes"/>
                <signal name="row-activated" handler="power_profiles_row_activated_cb" object="CcPowerPanel" swapped="yes"/>
                <accessibility>
                  <relation name="labelled-by">power_profile_section</relation>
                </accessibility>
                <style>
                  <class name="boxed-list"/>
                </style>
              </object>
            </child>
            <child>
              <object class="GtkListBox" id="power_profile_info_listbox">
                <property name="visible">False</property>
                <property name="selection-mode">none</property>
                <property name="margin_top">12</property>
                <signal name="keynav-failed" handler="keynav_failed_cb" object="CcPowerPanel" swapped="yes"/>
                <style>
                  <class name="boxed-list"/>
                </style>
              </object>
            </child>
          </object>
        </child>
        <child>
          <object class="AdwPreferencesGroup" id="power_saving_section">
            <property name="title" translatable="yes">Power Saving Options</property>
            <child>
              <object class="AdwActionRow" id="als_row">
                <property name="title" translatable="yes">Automatic Screen Brightness</property>
                <property name="subtitle" translatable="yes">Screen brightness adjusts to the surrounding light.</property>
                <property name="activatable_widget">als_switch</property>
                <child>
                  <object class="GtkSwitch" id="als_switch">
                    <property name="valign">center</property>
                    <signal name="notify::active" handler="als_switch_changed_cb" object="CcPowerPanel" swapped="yes"/>
                  </object>
                </child>
              </object>
            </child>
            <child>
              <object class="AdwActionRow" id="dim_screen_row">
                <property name="title" translatable="yes">Dim Screen</property>
                <property name="subtitle" translatable="yes">Reduces the screen brightness when the computer is inactive.</property>
                <property name="activatable_widget">dim_screen_switch</property>
                <child>
                  <object class="GtkSwitch" id="dim_screen_switch">
                    <property name="valign">center</property>
                  </object>
                </child>
              </object>
            </child>
            <child>
              <object class="AdwComboRow" id="blank_screen_row">
                <property name="title" translatable="yes">Screen _Blank</property>
                <property name="subtitle" translatable="yes">Turns the screen off after a period of inactivity.</property>
                <property name="use_underline">True</property>
                <signal name="notify::selected-item" handler="blank_screen_row_changed_cb" object="CcPowerPanel" swapped="yes"/>
              </object>
            </child>
            <child>
              <object class="AdwActionRow" id="power_saver_low_battery_row">
                <property name="visible">False</property>
                <property name="title" translatable="yes">Automatic Power Saver</property>
                <property name="subtitle" translatable="yes">Enables power saver mode when battery is low.</property>
                <property name="use_underline">True</property>
                <property name="activatable_widget">power_saver_low_battery_switch</property>
                <child>
                  <object class="GtkSwitch" id="power_saver_low_battery_switch">
                    <property name="valign">center</property>
                  </object>
                </child>
              </object>
            </child>
            <child>
              <object class="AdwActionRow" id="automatic_suspend_row">
                <property name="visible">False</property>
                <property name="title" translatable="yes">_Automatic Suspend</property>
                <property name="subtitle" translatable="yes">Pauses the computer after a period of inactivity.</property>
                <property name="use_underline">True</property>
                <property name="activatable">True</property>
                <signal name="activated" handler="automatic_suspend_row_activated_cb" swapped="yes"/>
                <child>
                  <object class="GtkLabel" id="automatic_suspend_label">
                    <property name="halign">end</property>
                    <signal name="mnemonic-activate" handler="automatic_suspend_label_mnemonic_activate_cb" object="CcPowerPanel" swapped="yes"/>
                  </object>
                </child>
                <child>
                  <object class="GtkImage">
                    <property name="valign">center</property>
                    <property name="icon-name">go-next-symbolic</property>
                  </object>
                </child>
              </object>
            </child>
          </object>
        </child>
        <child>
          <object class="AdwPreferencesGroup" id="general_section">
            <child>
              <object class="AdwComboRow" id="power_button_row">
                <property name="visible">False</property>
                <property name="title" translatable="yes">Po_wer Button Behavior</property>
                <property name="use_underline">True</property>
                <signal name="notify::selected-item" handler="power_button_row_changed_cb" object="CcPowerPanel" swapped="yes"/>
              </object>
            </child>
            <child>
              <object class="AdwActionRow" id="battery_percentage_row">
                <property name="visible">False</property>
                <property name="title" translatable="yes">Show Battery _Percentage</property>
                <property name="use_underline">True</property>
                <property name="activatable_widget">battery_percentage_switch</property>
                <child>
                  <object class="GtkSwitch" id="battery_percentage_switch">
                    <property name="valign">center</property>
                  </object>
                </child>
              </object>
            </child>
          </object>
        </child>
      </object>
    </child>
  </template>
  <object class="GtkSizeGroup" id="battery_row_sizegroup">
    <property name="mode">vertical</property>
  </object>
  <object class="GtkSizeGroup" id="level_sizegroup">
    <property name="mode">horizontal</property>
    <widgets>
    </widgets>
  </object>
  <object class="GtkSizeGroup" id="row_sizegroup">
    <property name="mode">vertical</property>
    <widgets>
      <widget name="als_row"/>
      <widget name="dim_screen_row"/>
      <widget name="blank_screen_row"/>
      <widget name="automatic_suspend_row"/>
      <widget name="power_button_row"/>
      <widget name="battery_percentage_row"/>
    </widgets>
  </object>

  <object class="GtkDialog" id="automatic_suspend_dialog">
    <property name="title" translatable="yes">Automatic Suspend</property>
    <property name="resizable">False</property>
    <property name="use_header_bar">1</property>
    <property name="hide-on-close">True</property>
    <child>
      <object class="GtkBox">
        <property name="margin_start">6</property>
        <property name="margin_end">6</property>
        <property name="margin_top">6</property>
        <property name="margin_bottom">6</property>
        <property name="orientation">vertical</property>
        <child>
          <object class="GtkGrid">
            <property name="margin_start">12</property>
            <property name="margin_end">6</property>
            <property name="margin_top">12</property>
            <property name="margin_bottom">12</property>
            <property name="row_spacing">12</property>
            <property name="column_spacing">6</property>
            <child>
              <object class="GtkLabel" id="suspend_on_ac_label">
                <property name="margin_top">12</property>
                <property name="xalign">0</property>
                <property name="label" translatable="yes">_Plugged In</property>
                <property name="use_underline">True</property>
                <property name="mnemonic_widget">suspend_on_ac_switch</property>
                <layout>
                  <property name="column">0</property>
                  <property name="row">2</property>
                </layout>
              </object>
            </child>
            <child>
              <object class="GtkLabel" id="suspend_on_battery_label">
                <property name="xalign">0</property>
                <property name="label" translatable="yes">On _Battery Power</property>
                <property name="use_underline">True</property>
                <property name="mnemonic_widget">suspend_on_battery_switch</property>
                <layout>
                  <property name="column">0</property>
                  <property name="row">0</property>
                </layout>
              </object>
            </child>
            <child>
              <object class="GtkSwitch" id="suspend_on_battery_switch">
                <property name="halign">end</property>
                <layout>
                  <property name="column">2</property>
                  <property name="row">0</property>
                </layout>
              </object>
            </child>
            <child>
              <object class="GtkComboBoxText" id="suspend_on_battery_delay_combo">
                <property name="entry_text_column">0</property>
                <property name="id_column">1</property>
                <property name="model">time_liststore</property>
                <layout>
                  <property name="column">2</property>
                  <property name="row">1</property>
                </layout>
              </object>
            </child>
            <child>
              <object class="GtkLabel" id="suspend_on_battery_delay_label">
                <property name="margin_start">20</property>
                <property name="xalign">1</property>
                <property name="label" translatable="yes">Delay</property>
                <property name="mnemonic_widget">suspend_on_battery_delay_combo</property>
                <layout>
                  <property name="column">1</property>
                  <property name="row">1</property>
                </layout>
                <style>
                  <class name="dim-label"/>
                </style>
              </object>
            </child>
            <child>
              <object class="GtkSwitch" id="suspend_on_ac_switch">
                <property name="halign">end</property>
                <property name="margin_top">12</property>
                <layout>
                  <property name="column">2</property>
                  <property name="row">2</property>
                </layout>
              </object>
            </child>
            <child>
              <object class="GtkComboBoxText" id="suspend_on_ac_delay_combo">
                <property name="entry_text_column">0</property>
                <property name="id_column">1</property>
                <property name="model">time_liststore</property>
                <layout>
                  <property name="column">2</property>
                  <property name="row">3</property>
                </layout>
              </object>
            </child>
            <child>
              <object class="GtkLabel">
                <property name="margin_start">20</property>
                <property name="xalign">1</property>
                <property name="label" translatable="yes">Delay</property>
                <property name="mnemonic_widget">suspend_on_ac_delay_combo</property>
                <layout>
                  <property name="column">1</property>
                  <property name="row">3</property>
                </layout>
                <style>
                  <class name="dim-label"/>
                </style>
              </object>
            </child>
          </object>
        </child>
      </object>
    </child>
  </object>
</interface>