summaryrefslogtreecommitdiff
path: root/panels/keyboard/cc-keyboard-shortcut-dialog.ui
blob: 6d017db589013f07f46f37e9ac0370d4dc527757 (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
<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <template class="CcKeyboardShortcutDialog" parent="AdwWindow">
    <property name="modal">True</property>
    <property name="default-width">600</property>
    <property name="default-height">540</property>
    <property name="title" translatable="yes">Keyboard Shortcuts</property>
    <signal name="map" handler="gtk_widget_grab_focus" object="search_entry" swapped="yes"/>

    <child>
      <object class="AdwLeaflet" id="leaflet">
        <property name="can-unfold">False</property>
        <property name="can-navigate-forward">False</property>
        <property name="can-navigate-back">True</property>
        <signal name="notify::visible-child" handler="shortcut_dialog_visible_child_changed_cb" swapped="yes"/>

        <child>
          <object class="GtkBox" id="main_box">
            <property name="orientation">vertical</property>

            <child>
              <object class="AdwHeaderBar">

                <!-- Reset All… button -->
                <child>
                  <object class="GtkButton" id="reset_all_button">
                    <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" swapped="yes" />
                  </object>
                </child>

              </object> <!-- ./AdwHeaderBar main_header_bar -->
            </child>

            <!-- Search Entry -->
            <child>
              <object class="GtkSearchBar">
                <property name="search-mode-enabled">True</property>
                <property name="child">
                  <!-- xxx: Pack the search entry inside a box so that Escape key won't hide the bar -->
                  <object class="GtkBox">
                    <child>
                      <object class="GtkSearchEntry" id="search_entry">
                        <property name="placeholder_text" translatable="yes">Search shortcuts</property>
                        <property name="halign">center</property>
                        <property name="width-chars">28</property>
                        <signal name="search-changed" handler="shortcut_search_entry_changed_cb" swapped="yes" />
                        <accessibility>
                          <property name="label" translatable="yes">Search Shortcuts</property>
                        </accessibility>
                      </object>
                    </child>
                  </object>
                </property>
              </object>
            </child>
            <child>
              <object class="GtkStack" id="section_stack">
                <property name="vhomogeneous">False</property>
                <property name="css-classes">shortcut-list</property>

                <!-- Shortcut section title rows -->
                <child>
                  <object class="AdwPreferencesPage" id="section_list_page">
                    <child>
                      <object class="AdwPreferencesGroup">
                        <child>
                          <object class="GtkListBox" id="section_list_box">
                            <property name="selection-mode">none</property>
                            <signal name="row-activated" handler="shortcut_section_row_activated_cb" swapped="yes"/>
                            <style>
                              <class name="boxed-list"/>
                            </style>
                          </object>
                        </child>
                      </object>
                    </child>
                  </object>
                </child>

                <child>
                  <object class="AdwPreferencesPage" id="search_result_page"/>
                </child>
                <child>
                  <object class="AdwStatusPage" id="empty_results_page">
                    <property name="vexpand">True</property>
                    <property name="icon_name">edit-find-symbolic</property>
                    <property name="title" translatable="yes">No keyboard shortcut found</property>
                    <property name="description" translatable="yes">Try a different search.</property>
                  </object>
                </child>

              </object> <!-- ./GtkStack section_stack -->
            </child>

          </object>  <!-- ./GtkBox main_box -->
        </child>

        <child>
          <object class="GtkBox" id="subview_box">
            <property name="orientation">vertical</property>

            <child>
              <object class="AdwHeaderBar">
                <property name="title-widget">
                  <object class="AdwWindowTitle" id="subview_title" />
                </property>

                <!-- Back button -->
                <child>
                  <object class="GtkButton" id="back_button">
                    <property name="icon-name">go-previous-symbolic</property>
                    <accessibility>
                      <property name="label">Back</property>
                    </accessibility>
                    <signal name="clicked" handler="back_button_clicked_cb" swapped="yes" />
                    <style>
                      <class name="image-button"/>
                    </style>
                  </object>
                </child>
              </object> <!-- ./AdwHeaderBar subview_header_bar -->
            </child>

            <child>
              <object class="GtkStack" id="subview_stack">

                <child>
                  <object class="GtkStack" id="shortcut_list_stack">
                    <property name="vhomogeneous">False</property>
                  </object>
                </child>

                <child>
                  <object class="AdwStatusPage" id="empty_custom_shortcut_page">
                    <property name="vexpand">True</property>
                    <property name="icon-name">input-keyboard-symbolic</property>
                    <property name="title" translatable="yes">Add Custom Shortcuts</property>
                    <property name="description" translatable="yes">Set up custom shortcuts for launching apps, running scripts, and more.</property>
                    <child>
                      <object class="GtkButton">
                        <property name="halign">center</property>
                        <property name="label" translatable="yes">Add Shortcut…</property>
                        <signal name="clicked" handler="add_custom_shortcut_clicked_cb" swapped="yes"/>
                        <style>
                          <class name="suggested-action"/>
                          <class name="pill"/>
                        </style>
                      </object>
                    </child>
                  </object>
                </child>

              </object>  <!-- ./GtkStack subview_stack -->
            </child>

          </object>  <!-- ./GtkBox subview_box -->
        </child>

      </object>  <!-- ./AdwLeaflet leaflet -->
    </child>

  </template>
  <object class="GtkSizeGroup" id="accelerator_size_group"/>
</interface>