gnome-control-center/panels/keyboard/cc-keyboard-panel.ui
Ian Douglas Scott 8b7eac0a7b keyboard: replace CcAltCharsKeyDialog with a generic XkbModifierDialog
Previously, there were multiple redundant lists of possible values for
this setting. This uses one struct to define not only all the possible
values, but also anything specific to the alternate characters key, so
this can be used for other modifiers.

This also changes the style of the dialog to use a GtkListBox.
2020-10-19 04:00:32 +00:00

205 lines
9.5 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkAdjustment" id="cursor_blink_time_adjustment">
<property name="lower">100</property>
<property name="upper">2500</property>
<property name="value">1000</property>
<property name="step_increment">200</property>
<property name="page_increment">200</property>
</object>
<template class="CcKeyboardPanel" parent="CcPanel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="expand">True</property>
<signal name="key-press-event" handler="gtk_search_bar_handle_event" object="search_bar" swapped="yes" />
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkSearchBar" id="search_bar">
<property name="visible">True</property>
<property name="hexpand">True</property>
<property name="search_mode_enabled" bind-source="search_button" bind-property="active" bind-flags="bidirectional" />
<child>
<object class="GtkSearchEntry" id="search_entry">
<property name="visible">True</property>
<property name="width_chars">30</property>
<signal name="notify::text" handler="gtk_list_box_invalidate_filter" object="shortcuts_listbox" swapped="yes" />
</object>
</child>
</object>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="hscrollbar_policy">never</property>
<property name="propagate_natural_width">True</property>
<property name="propagate_natural_height">True</property>
<property name="max_content_height">350</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="margin_top">32</property>
<property name="margin_bottom">32</property>
<property name="margin_left">18</property>
<property name="margin_right">18</property>
<property name="spacing">12</property>
<property name="halign">center</property>
<child>
<object class="GtkFrame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkListBox" id="alternate_chars_listbox">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="selection-mode">none</property>
<property name="width-request">250</property>
<signal name="row-activated" handler="alternate_chars_activated" object="CcKeyboardPanel" swapped="no" />
<child>
<object class="HdyActionRow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="use-underline">true</property>
<property name="title" translatable="yes">Alternate Characters Key</property>
<property name="subtitle" translatable="yes">Hold down and type to enter different characters</property>
<property name="activatable">True</property>
<child>
<object class="GtkLabel" id="value_alternate_chars">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="no">Right Alt</property>
</object>
</child>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="icon_name">go-next-symbolic</property>
<style>
<class name="dim-label"/>
</style>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkFrame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkListBox" id="shortcuts_listbox">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="selection-mode">none</property>
<property name="width-request">250</property>
<signal name="row-activated" handler="shortcut_row_activated" object="CcKeyboardPanel" swapped="no" />
<child>
<object class="GtkListBoxRow" id="add_shortcut_row">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="border_width">6</property>
<child type="center">
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">list-add-symbolic</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</template>
<!-- Header widgets -->
<object class="GtkToggleButton" id="search_button">
<property name="visible">True</property>
<style>
<class name="image-button" />
</style>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="icon_name">system-search-symbolic</property>
</object>
</child>
</object>
<object class="GtkButton" id="reset_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Reset All…</property>
<property name="tooltip-text" translatable="yes">Reset all shortcuts to their default keybindings</property>
<signal name="clicked" handler="reset_all_clicked_cb" object="CcKeyboardPanel" swapped="yes" />
</object>
<object class="GtkBox" id="empty_search_placeholder">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="border_width">18</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixel_size">80</property>
<property name="icon_name">edit-find-symbolic</property>
<style>
<class name="dim-label"/>
</style>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">No keyboard shortcut found</property>
<attributes>
<attribute name="weight" value="bold"/>
<attribute name="scale" value="1.44"/>
</attributes>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Try a different search</property>
<style>
<class name="dim-label"/>
</style>
</object>
</child>
</object>
</interface>