summaryrefslogtreecommitdiff
path: root/data/ui/app-window.ui
blob: 05ac3746537051dc59c14d0a2ef8378ddbfa975a (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
365
366
367
368
369
370
<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <requires lib="gtk" version="4.0"/>
  <requires lib="libadwaita" version="1.0"/>
  
  <menu id="context-menu">
    <item>
      <attribute name="label" translatable="yes" comments="Menu item to rotate page to left (anti-clockwise)">Rotate _Left</attribute>
      <attribute name="action">app.rotate_left</attribute>
    </item>
    <item>
      <attribute name="label" translatable="yes" comments="Menu item to rotate page to right (clockwise)">Rotate _Right</attribute>
      <attribute name="action">app.rotate_right</attribute>
    </item>
    <submenu>
      <attribute name="label" translatable="yes" comments="Label for page crop submenu">_Crop</attribute>

      <section>
        <item>
          <attribute name="label" translatable="yes" comments="Radio button for no crop">_None</attribute>
          <attribute name="action">crop.set</attribute>
          <attribute name="target">none</attribute>
        </item>

        <item>
          <attribute name="label" translatable="yes" comments="Radio button for cropping page to A4 size">A_4</attribute>
          <attribute name="action">crop.set</attribute>
          <attribute name="target">A4</attribute>
        </item>

        <item>
          <attribute name="label" translatable="yes" comments="Radio button for cropping page to A5 size">A_5</attribute>
          <attribute name="action">crop.set</attribute>
          <attribute name="target">A5</attribute>
        </item>

        <item>
          <attribute name="label" translatable="yes" comments="Radio button for cropping page to A6 size">A_6</attribute>
          <attribute name="action">crop.set</attribute>
          <attribute name="target">A6</attribute>
        </item>

        <item>
          <attribute name="label" translatable="yes" comments="Radio button for cropping page to US letter size">_Letter</attribute>
          <attribute name="action">crop.set</attribute>
          <attribute name="target">letter</attribute>
        </item>

        <item>
          <attribute name="label" translatable="yes" comments="Radio button for cropping to page to US legal size">Le_gal</attribute>
          <attribute name="action">crop.set</attribute>
          <attribute name="target">legal</attribute>
        </item>

        <item>
          <attribute name="label" translatable="yes" comments="Radio button for cropping page to 4x6 inch">4×6</attribute>
          <attribute name="action">crop.set</attribute>
          <attribute name="target">4x6</attribute>
        </item>

        <item>
          <attribute name="label" translatable="yes" comments="Radio button for cropping page to A3">A_3</attribute>
          <attribute name="action">crop.set</attribute>
          <attribute name="target">A3</attribute>
        </item>

        <item>
          <attribute name="label" translatable="yes" comments="Radio button for cropping to custom page size">_Custom</attribute>
          <attribute name="action">crop.set</attribute>
          <attribute name="target">custom</attribute>
        </item>
      </section>

      <section>
        <item>
          <attribute name="label" translatable="yes" comments="Menu item to rotate the crop area">_Rotate Crop</attribute>
          <attribute name="action">crop.rotate</attribute>
        </item>
      </section>

    </submenu>
    <item>
      <attribute name="label" translatable="yes" comments="Menu item to move the selected page to the left">Move Left</attribute>
      <attribute name="action">app.move_left</attribute>
    </item>
    <item>
      <attribute name="label" translatable="yes" comments="Menu item to move the selected page to the right">Move Right</attribute>
      <attribute name="action">app.move_right</attribute>
    </item>
    <item>
      <attribute name="label" translatable="yes">Copy</attribute>
      <attribute name="action">app.copy_page</attribute>
    </item>
    <item>
      <attribute name="label" translatable="yes">Delete</attribute>
      <attribute name="action">app.delete_page</attribute>
    </item>
  </menu>

  <menu id="scan-menu">
    <section>
      <item>
        <attribute name="label" translatable="yes">_Single Page</attribute>
        <attribute name="action">app.scan_type</attribute>
        <attribute name="target">single</attribute>
      </item>

      <item>
        <attribute name="label" translatable="yes">All Pages From _Feeder</attribute>
        <attribute name="action">app.scan_type</attribute>
        <attribute name="target">adf</attribute>
      </item>

      <item>
        <attribute name="label" translatable="yes">_Multiple Pages From Flatbed</attribute>
        <attribute name="action">app.scan_type</attribute>
        <attribute name="target">batch</attribute>
      </item>
    </section>

    <section>
      <item>
        <attribute name="label" translatable="yes">_Text</attribute>
        <attribute name="action">app.document_hint</attribute>
        <attribute name="target">text</attribute>
      </item>

      <item>
        <attribute name="label" translatable="yes">_Image</attribute>
        <attribute name="action">app.document_hint</attribute>
        <attribute name="target">photo</attribute>
      </item>
    </section>
  </menu>

  <template class="AppWindow" parent="AdwApplicationWindow">
    <property name="width_request">320</property>
    <property name="height_request">480</property>
    <property name="title" translatable="yes" comments="Title of scan window">Document Scanner</property>
    <property name="icon_name">org.gnome.SimpleScan</property>
    <signal name="close-request" handler="window_close_request_cb" swapped="no"/>
    <property name="content">
      <object class="GtkBox">
        <property name="orientation">vertical</property>
        
        <child>
          <object class="GtkPopoverMenu" id="page_menu">
            <property name="menu-model">context-menu</property>
            <property name="has_arrow">false</property>
            <property name="halign">start</property>
          </object>
        </child>

        <child>
          <object class="AdwHeaderBar" id="header_bar">
            <child type="start">
              <object class="GtkBox" id="open_box">
                <property name="valign">center</property>
                <property name="margin-start">6</property>
                <property name="spacing">6</property>
                <child>
                  <object class="GtkButton" id="stop_button">
                    <property name="visible">0</property>
                    <property name="tooltip_text" translatable="yes" comments="Tooltip for stop button">Stop the current scan</property>
                    <property name="use_underline">True</property>
                    <signal name="clicked" handler="stop_scan_button_clicked_cb" swapped="no"/>
                    <child>
                      <object class="GtkBox">
                        <property name="spacing">6</property>
                        <property name="halign">center</property>
                        <child>
                          <object class="GtkSpinner" id="stop_button_spinner">
                            <property name="spinning">True</property>
                          </object>
                        </child>
                        <child>
                          <object class="GtkLabel">
                            <property name="label" translatable="yes">S_top</property>
                            <property name="use_underline">True</property>
                            <property name="width_chars">6</property>
                            <property name="xalign">0.33</property>
                            <property name="halign">center</property>
                          </object>
                        </child>
                      </object>
                    </child>
                    <style>
                      <class name="text-button"/>
                      <class name="destructive-action"/>
                    </style>
                  </object>
                </child>
                <child>
                  <object class="GtkButton" id="scan_button">
                    <property name="sensitive">0</property>
                    <property name="tooltip_text" translatable="yes" comments="Tooltip for scan toolbar button. Replaced by text associated with each scan type."></property>
                    <property name="use_underline">True</property>
                    <signal name="clicked" handler="scan_button_clicked_cb" swapped="no"/>

                    <property name="child">
                      <object class="AdwButtonContent" id="scan_button_content">
                        <property name="icon-name">scanner-symbolic</property>
                        <property name="label" translatable="yes">_Scan</property>
                        <property name="use-underline">True</property>
                      </object>
                    </property>
                  </object>
                </child>
                <child>
                  <object class="GtkMenuButton" id="scan_options_menu">
                    <property name="menu_model">scan-menu</property>
                    <property name="icon_name">emblem-system-symbolic</property>
                  </object>
                </child>
              </object>
            </child>
            <child type="end">
              <object class="GtkMenuButton" id="menu_button">
                <property name="use_underline">True</property>
                <property name="primary">True</property>
                <property name="icon_name">open-menu-symbolic</property>
              </object>
            </child>
            <child type="end">
              <object class="GtkButton" id="save_button">
                <property name="sensitive">0</property>
                <property name="tooltip_text" translatable="yes" comments="Tooltip for save toolbar button">Save document to a file</property>
                <property name="use_underline">True</property>
                <property name="action-name">app.save</property>
                <property name="icon_name">document-save-symbolic</property>
              </object>
            </child>
            <style>
              <class name="titlebar"/>
            </style>
          </object>
        </child>

        <child>
          <object class="GtkStack" id="stack">
            <property name="vexpand">True</property>
            <child>
              <object class="GtkStackPage">
                <property name="name">startup</property>
                <property name="child">
                  <object class="AdwStatusPage" id="status_page">
                    <property name="icon_name">org.gnome.SimpleScan-symbolic</property>
                    <child>
                      <object class="GtkBox">
                        <property name="orientation">vertical</property>
                        <property name="spacing">12</property>

                        <child>
                          <object class="GtkLabel" id="status_secondary_label">
                            <property name="visible">False</property>
                            <property name="wrap">True</property>
                            <property name="wrap-mode">word-char</property>
                            <property name="justify">center</property>
                            <property name="use-markup">True</property>
                            <!-- <property name="track_visited_links">False</property> -->
                            <signal name="activate-link" handler="status_label_activate_link_cb" swapped="no"/>
                            <style>
                              <class name="body"/>
                              <class name="description"/>
                            </style>
                          </object>
                        </child>
                        <child>
                          <object class="GtkBox" id="device_buttons_box">
                            <property name="visible">False</property>
                            <property name="orientation">horizontal</property>
                            <property name="halign">center</property>
                            <property name="spacing">10</property>
                            <child>
                              <object class="GtkDropDown" id="device_drop_down">
                                <property name="width_request">200</property>
                                <signal name="notify::selected" handler="device_drop_down_changed_cb" swapped="no"/>
                              </object>
                            </child>
                            <child>
                              <object class="GtkButton" id="refresh_devices">
                                <property name="tooltip_text" translatable="yes" comments="Tooltip for stop button">Refresh device list</property>
                                <property name="icon_name">view-refresh-symbolic</property>

                                <signal name="clicked" handler="redetect_button_clicked_cb" swapped="no"/>
                              </object>
                            </child>
                          </object>
                        </child>
                      </object>
                    </child>
                  </object>
                </property>
              </object>
            </child>
            <child>
              <object class="GtkStackPage">
                <property name="name">document</property>
                <property name="child">
                  <object class="GtkBox" id="main_vbox">
                    <property name="orientation">vertical</property>
                    <child>
                      <object class="GtkActionBar" id="action_bar">
                        <child type="start">
                          <object class="GtkButton">
                            <property name="margin-start">6</property>
                            <signal name="clicked" handler="new_document_cb" swapped="no"/>

                            <property name="child">
                              <object class="AdwButtonContent">
                                <property name="icon-name">list-add-symbolic</property>
                                <property name="label" translatable="yes">New Document</property>
                              </object>
                            </property>
                          </object>
                        </child>

                        <child type="center">
                          <object class="GtkBox">
                            <property name="orientation">horizontal</property>
                            <property name="spacing">5</property>

                            <child>
                              <object class="GtkButton">
                                <property name="icon-name">object-rotate-left-symbolic</property>
                                <property name="tooltip-text" translatable="yes">Rotate the page to the left (counter-clockwise)</property>
                                <property name="action-name">app.rotate_left</property>
                              </object>
                            </child>

                            <child>
                              <object class="GtkButton">
                                <property name="icon-name">object-rotate-right-symbolic</property>
                                <property name="tooltip-text" translatable="yes">Rotate the page to the right (clockwise)</property>
                                <property name="action-name">app.rotate_right</property>
                              </object>
                            </child>

                            <child>
                              <object class="GtkToggleButton" id="crop_button">
                                <property name="icon-name">crop-symbolic</property>
                                <property name="tooltip-text" translatable="yes">Crop the selected page</property>
                                <signal name="toggled" handler="crop_toggle_cb" swapped="no"/>
                              </object>
                            </child>

                            <child>
                              <object class="GtkButton" id="delete_button">
                                <property name="icon-name">user-trash-symbolic</property>
                                <property name="tooltip-text" translatable="yes">Delete the selected page</property>
                                <property name="action-name">app.delete_page</property>
                              </object>
                            </child>

                          </object>
                        </child>

                      </object>
                    </child>
                  </object>
                </property>
              </object>
            </child>
          </object>
        </child>

      </object>
    </property>
  </template>
</interface>