gnome-control-center/panels/power/cc-power-panel.ui
Felipe Borges 37f5cbe6af power: Fix blank-screen settings not applying
The AdwComboRow widget has a selected-item property, while we were
connecting to selected-index (which doesn't exist.

It is likely that selected-index existed in the past in libhandy
or libadwaita and this is a regression during the port to GTK4.

Fixes #2025
2022-08-23 15:26:46 +00:00

364 lines
17 KiB
XML

<?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-index" 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>