summaryrefslogtreecommitdiff
path: root/data/ui/contacts-main-window.ui
blob: 41b99e89f157d9ada7558c86cdb618383b905e2b (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
<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <menu id="hamburger_menu_popover">
    <section>
      <attribute name="label" translatable="yes">List Contacts By:</attribute>
      <item>
        <attribute name="label" translatable="yes">First Name</attribute>
        <attribute name="action">window.sort-on</attribute>
        <attribute name="target">firstname</attribute>
      </item>
      <item>
        <attribute name="label" translatable="yes">Surname</attribute>
        <attribute name="action">window.sort-on</attribute>
        <attribute name="target">surname</attribute>
      </item>
    </section>
    <section>
      <item>
        <attribute name="label" translatable="yes">Change Address Book…</attribute>
        <attribute name="action">app.change-book</attribute>
      </item>
      <item>
        <attribute name="label" translatable="yes">Online Accounts &lt;sup&gt;↗&lt;/sup&gt;</attribute>
        <attribute name="action">app.online-accounts</attribute>
        <attribute name="use-markup">True</attribute>
      </item>
    </section>
    <section>
      <item>
        <attribute name="label" translatable="yes">Keyboard Shortcuts</attribute>
        <attribute name="action">win.show-help-overlay</attribute>
      </item>
      <item>
        <attribute name="label" translatable="yes">Help</attribute>
        <attribute name="action">app.help</attribute>
      </item>
      <item>
        <attribute name="label" translatable="yes">About Contacts</attribute>
        <attribute name="action">app.about</attribute>
      </item>
    </section>
  </menu>

  <template class="ContactsMainWindow" parent="AdwApplicationWindow">
    <property name="default_width">800</property>
    <property name="default_height">600</property>
    <property name="icon_name">gnome-contacts</property>

    <child>
      <object class="GtkShortcutController">
        <property name="scope">global</property>
        <child>
          <object class="GtkShortcut">
            <property name="trigger">&lt;Control&gt;n</property>
            <property name="action">action(window.new-contact)</property>
          </object>
        </child>
      </object>
    </child>

    <child>
      <object class="AdwToastOverlay" id="toast_overlay">
        <child>
          <object class="AdwLeaflet" id="content_box">
            <property name="can-navigate-back">True</property>
            <signal name="notify::folded" handler="on_folded"/>
            <signal name="notify::child-transition-running" handler="on_child_transition_running"/>

            <child>
              <object class="AdwLeafletPage">
                <property name="name">list-pane</property>
                <property name="child">
                  <object class="GtkBox" id="list_pane_page">
                    <property name="orientation">vertical</property>
                    <child>
                      <object class="AdwHeaderBar" id="left_header">
                        <property name="hexpand">False</property>
                        <property name="show-end-title-buttons" bind-source="content_box" bind-property="folded" bind-flags="sync-create"/>

                        <child type="start">
                          <object class="GtkButton" id="add_button">
                            <property name="tooltip-text" translatable="yes">Create new contact</property>
                            <property name="icon-name">list-add-symbolic</property>
                            <property name="action-name">window.new-contact</property>
                          </object>
                        </child>

                        <child type="end">
                          <object class="GtkMenuButton" id="hamburger_menu_button">
                            <property name="menu-model">hamburger_menu_popover</property>
                            <property name="primary">True</property>
                            <property name="tooltip_text" translatable="yes">Menu</property>
                            <property name="icon-name">open-menu-symbolic</property>
                          </object>
                        </child>
                        <child type="end">
                          <object class="GtkButton" id="selection_button">
                            <property name="icon-name">selection-mode-symbolic</property>
                            <property name="tooltip-text" translatable="yes">Select Items</property>
                            <signal name="clicked" handler="on_selection_button_clicked"/>
                          </object>
                        </child>
                        <child type="end">
                          <object class="GtkButton" id="select_cancel_button">
                            <property name="visible">False</property>
                            <property name="label" translatable="yes">Cancel</property>
                            <property name="tooltip_text" translatable="yes">Cancel Selection</property>
                          </object>
                        </child>
                      </object>
                    </child>
                    <child>
                      <object class="GtkStack" id="list_pane_stack">
                        <property name="hexpand">False</property>
                        <child>
                          <object class="GtkBox">
                            <property name="orientation">vertical</property>
                            <property name="width_request">300</property>
                            <property name="homogeneous">True</property>
                            <property name="valign">center</property>
                            <property name="vexpand">True</property>
                            <child>
                              <object class="GtkSpinner">
                                <property name="spinning">True</property>
                                <property name="valign">end</property>
                                <property name="halign">center</property>
                              </object>
                            </child>
                            <child>
                              <object class="GtkLabel" id="label1">
                                <property name="valign">start</property>
                                <property name="halign">center</property>
                                <property name="label" translatable="yes">Loading</property>
                              </object>
                            </child>
                          </object>
                        </child>
                      </object>
                    </child>
                  </object>
                </property>
              </object>
            </child>

            <child>
              <object class="AdwLeafletPage">
                <property name="navigatable">False</property>
                <property name="child">
                  <object class="GtkSeparator">
                  </object>
                </property>
              </object>
            </child>

            <child>
              <object class="AdwLeafletPage">
                <property name="name">contact-pane</property>
                <property name="child">
                  <object class="GtkBox" id="contact_pane_page">
                    <property name="orientation">vertical</property>
                    <child>
                      <object class="AdwHeaderBar" id="right_header">
                        <property name="hexpand">True</property>
                        <child>
                          <object class="GtkRevealer" id="back_revealer">
                            <property name="transition-type">slide-right</property>
                            <child>
                              <object class="GtkButton" id="back">
                                <property name="valign">center</property>
                                <property name="icon-name">go-previous-symbolic</property>
                                <property name="tooltip_text">Back</property>
                                <signal name="clicked" handler="on_back_clicked"/>
                              </object>
                            </child>
                          </object>
                        </child>
                        <property name="title-widget">
                          <object class="AdwWindowTitle">
                            <property name="title"></property>
                          </object>
                        </property>
                        <child>
                          <object class="GtkButton" id="cancel_button">
                            <property name="visible">False</property>
                            <property name="label" translatable="yes">_Cancel</property>
                            <property name="use_underline">True</property>
                            <signal name="notify::visible" handler="on_cancel_visible" object="ContactsMainWindow" after="yes" swapped="no"/>
                          </object>
                        </child>
                        <child type="end">
                          <object class="GtkBox" id="contact_sheet_buttons">
                            <property name="visible">False</property>
                            <property name="orientation">horizontal</property>
                            <property name="spacing">6</property>
                            <property name="margin-end">6</property>
                            <child>
                              <object class="GtkToggleButton" id="favorite_button">
                                <property name="icon-name">starred-symbolic</property>
                                <signal name="toggled" handler="on_favorite_button_toggled"/>
                              </object>
                            </child>
                            <child>
                              <object class="GtkButton" id="edit_contact_button">
                                <property name="icon-name">document-edit-symbolic</property>
                                <property name="action-name">window.edit-contact</property>
                                <property name="tooltip-text" translatable="yes">Edit Contact</property>
                              </object>
                            </child>
                            <child>
                              <object class="GtkButton" id="delete_contact_button">
                                <property name="icon-name">user-trash-symbolic</property>
                                <property name="action-name">window.delete-contact</property>
                                <property name="tooltip-text" translatable="yes">Delete Contact</property>
                              </object>
                            </child>
                          </object>
                        </child>
                        <child type="end">
                          <object class="GtkButton" id="done_button">
                            <property name="visible">False</property>
                            <property name="use_underline">True</property>
                            <property name="label" translatable="yes">Done</property>
                            <property name="valign">center</property>
                            <style>
                              <class name="suggested-action"/>
                            </style>
                          </object>
                        </child>
                      </object>
                    </child>
                    <child>
                      <object class="GtkOverlay" id="contact_pane_container">
                        <property name="hexpand">True</property>
                      </object>
                    </child>
                  </object>
                </property>
              </object>
            </child>
          </object>
        </child>
      </object>
    </child>
  </template>
</interface>