summaryrefslogtreecommitdiff
path: root/panels/user-accounts/cc-user-panel.ui
blob: 03eac75b1f6dd517779eece3564eadc981b538a2 (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
<interface>
  <object class="GtkListStore" id="shortname-model">
    <columns>
      <!-- column-name gchararray -->
      <column type="gchararray"/>
    </columns>
  </object>
  <object class="GtkListStore" id="language-model">
    <columns>
      <!-- column-name gchararray -->
      <column type="gchararray"/>
      <!-- column-name gchararray1 -->
      <column type="gchararray"/>
    </columns>
  </object>
  <template class="CcUserPanel" parent="CcPanel">
    <child type="titlebar">
      <object class="AdwHeaderBar">
        <property name="show-end-title-buttons">True</property>
        <property name="show-start-title-buttons" bind-source="CcUserPanel" bind-property="folded" bind-flags="default|sync-create" />
        <property name="title-widget">
          <object class="AdwWindowTitle">
            <property name="title" translatable="yes">Users</property>
          </object>
        </property>
        <child type="start">
          <object class="GtkButton" id="back_button">
            <property name="visible">False</property>
            <property name="icon-name">go-previous-symbolic</property>
            <accessibility>
              <property name="label" translatable="yes">Back</property>
            </accessibility>
            <signal name="clicked" handler="on_back_button_clicked_cb" object="CcUserPanel" swapped="yes"/>
          </object>
        </child>
      </object>
    </child>
    <child type="content">
      <object class="GtkBox">
        <property name="orientation">vertical</property>
        <child>
          <object class="CcPermissionInfobar" id="permission_infobar"/>
        </child>
        <child>
          <object class="GtkStack" id="stack">
            <property name="visible-child">no_users_box</property>
            <child>
              <object class="GtkOverlay" id="users_overlay">
                <child type="overlay">
                  <object class="GtkRevealer" id="notification_revealer">
                    <property name="halign">GTK_ALIGN_CENTER</property>
                    <property name="valign">GTK_ALIGN_START</property>
                    <child>
                      <object class="GtkBox">
                        <property name="spacing">6</property>
                        <style>
                          <class name="app-notification"/>
                        </style>
                        <child>
                          <object class="GtkLabel">
                            <property name="wrap">True</property>
                            <property name="max_width_chars">30</property>
                            <property name="label" translatable="yes">Your session needs to be restarted for changes to take effect</property>
                          </object>
                        </child>
                        <child>
                          <object class="GtkButton">
                            <property name="can_focus">True</property>
                            <property name="valign">GTK_ALIGN_CENTER</property>
                            <property name="label" translatable="yes">Restart Now</property>
                            <signal name="clicked" handler="restart_now" object="CcUserPanel" swapped="yes"/>
                          </object>
                        </child>
                        <child>
                          <object class="GtkButton" id="dismiss_button">
                            <property name="valign">GTK_ALIGN_CENTER</property>
                            <property name="icon_name">window-close-symbolic</property>
                            <accessibility>
                              <property name="label" translatable="yes">Close</property>
                            </accessibility>
                            <signal name="clicked" handler="dismiss_notification" object="CcUserPanel" swapped="yes"/>
                            <style>
                              <class name="flat"/>
                            </style>
                          </object>
                        </child>
                      </object>
                    </child>
                  </object>
                </child>
                <child>
                  <object class="AdwPreferencesPage">
                    <child>
                      <object class="AdwPreferencesGroup">
                        <child>
                          <object class="GtkOverlay">
                            <property name="halign">center</property>
                            <child>
                              <object class="AdwAvatar" id="user_avatar">
                                <property name="show-initials">True</property>
                                <property name="size">120</property>
                                <property name="halign">center</property>
                              </object>
                            </child>
                            <child type="overlay">
                              <object class="AdwBin">
                                <style>
                                  <class name="cutout-button"/>
                                </style>
                                <property name="halign">end</property>
                                <property name="valign">end</property>
                                <child>
                                  <object class="GtkMenuButton" id="user_avatar_edit_button">
                                    <property name="sensitive">False</property>
                                    <property name="icon-name">document-edit-symbolic</property>
                                    <property name="popover">
                                      <object class="CcAvatarChooser" id="avatar_chooser"/>
                                    </property>
                                    <accessibility>
                                      <property name="label" translatable="yes">Edit avatar</property>
                                    </accessibility>
                                    <style>
                                      <class name="circular"/>
                                    </style>
                                  </object>
                                </child>
                              </object>
                            </child>
                          </object>
                        </child>
                      </object>
                    </child>
                    <child>
                      <object class="AdwPreferencesGroup" id="authentication_and_login_box">
                        <child>
                          <object class="AdwActionRow">
                            <property name="title" translatable="yes">Name</property>
                            <child> 
                              <object class="GtkStack" id="full_name_stack">
                                <property name="hhomogeneous">False</property>
                                <child>
                                  <object class="GtkLabel" id="full_name_label">
                                  </object>
                                </child>
                                <child>
                                  <object class="GtkEntry" id="full_name_entry">
                                    <property name="max-length">255</property>
                                    <property name="width-chars">18</property>
                                    <property name="max-width-chars">30</property>
                                    <property name="valign">GTK_ALIGN_CENTER</property>
                                    <accessibility>
                                      <property name="label" translatable="yes">Full name</property>
                                    </accessibility>
                                    <signal name="activate" handler="full_name_entry_activate" object="CcUserPanel" swapped="yes"/>
                                    <child>
                                      <object class="GtkEventControllerKey">
                                        <property name="propagation-phase">capture</property>
                                        <signal name="key-pressed" handler="full_name_entry_key_press_cb" object="CcUserPanel" swapped="no"/>
                                      </object>
                                    </child>
                                  </object>
                                </child>
                              </object>
                            </child>
                            <child>
                              <object class="GtkToggleButton" id="full_name_edit_button">
                                <signal name="toggled" handler="full_name_edit_button_toggled" object="CcUserPanel" swapped="yes"/>
                                <property name="icon-name">document-edit-symbolic</property>
                                <property name="valign">GTK_ALIGN_CENTER</property>
                                <accessibility>
                                  <property name="label" translatable="yes">Edit</property>
                                </accessibility>
                                <style>
                                  <class name="flat"/>
                                </style>
                              </object>
                            </child>
                          </object>
                        </child>
                        <child>
                          <object class="CcListRow" id="password_row">
                            <property name="title" translatable="yes">_Password</property>
                            <property name="use_underline">True</property>
                            <property name="activatable">True</property>
                            <signal name="activated" handler="change_password" object="CcUserPanel" swapped="yes"/>
                            <child>
                              <object class="GtkLabel" id="password_button_label"/>
                            </child>
                            <child>
                              <object class="GtkImage">
                                <property name="icon-name">go-next-symbolic</property>
                                <style>
                                  <class name="dim-label"/>
                                </style>
                              </object>
                            </child>
                          </object>
                        </child>
                        <child>
                          <object class="CcListRow" id="fingerprint_row">
                            <property name="visible">True</property> <!-- FIXME -->
                            <property name="title" translatable="yes">_Fingerprint Login</property>
                            <property name="use_underline">True</property>
                            <property name="activatable">True</property>
                            <property name="show-arrow">True</property>
                            <signal name="activated" handler="change_fingerprint" object="CcUserPanel" swapped="yes"/>
                          </object>
                        </child>
                        <child>
                          <object class="AdwActionRow" id="autologin_row">
                            <property name="title" translatable="yes">A_utomatic Login</property>
                            <property name="use_underline">True</property>
                            <property name="activatable_widget">autologin_switch</property>
                            <child type="suffix">
                              <object class="CcListRowInfoButton">
                                <property name="valign">center</property>
                                <property name="text" translatable="yes">Automatic login opens the user account when the device starts, without requiring authentication. Authentication is still required at other times, such as when unlocking the screen.</property>
                              </object>
                            </child>
                            <child type="suffix">
                              <object class="GtkSwitch" id="autologin_switch">
                                <property name="valign">center</property>
                                <signal name="notify::active" handler="autologin_changed" object="CcUserPanel" swapped="yes"/>
                              </object>
                            </child>
                          </object>
                        </child>
                      </object>
                    </child>

                    <child>
                      <object class="AdwPreferencesGroup" id="account_settings_box">
                        <child>
                          <object class="AdwActionRow" id="account_type_row">
                            <property name="title" translatable="yes">_Administrator</property>
                            <property name="subtitle-lines">0</property>
                            <property name="use_underline">True</property>
                            <property name="activatable-widget">account_type_switch</property>
                            <child type="suffix">
                              <object class="CcListRowInfoButton">
                                <property name="valign">center</property>
                                <property name="text" translatable="yes">Administrators have extra abilities, including adding and removing users, changing login settings, and removing software. Parental controls cannot be applied to administrators.</property>
                              </object>
                            </child>
                            <child>
                              <object class="GtkSwitch" id="account_type_switch">
                                <property name="valign">center</property>
                                <signal name="notify::active" handler="account_type_changed" object="CcUserPanel" swapped="yes"/>
                              </object>
                            </child>
                          </object>
                        </child>

                        <child>
                          <object class="AdwActionRow" id="parental_controls_row">
                            <property name="visible">False</property>
                            <property name="title" translatable="yes">_Parental Controls</property>
                            <property name="subtitle" translatable="yes">Open the Parental Controls app.</property>
                            <property name="subtitle-lines">0</property>
                            <property name="use_underline">True</property>
                            <property name="activatable">True</property>
                            <child>
                              <object class="GtkLabel" id="parental_controls_button_label">
                                <property name="valign">0.5</property>
                              </object>
                            </child>
                            <child>
                              <object class="GtkImage" id="parental_control_go_next">
                                <property name="icon-name">go-next-symbolic</property>
                                <style>
                                  <class name="dim-label"/>
                                </style>
                              </object>
                            </child>
                          </object>
                        </child>

                        <child>
                          <object class="CcListRow" id="language_row">
                            <property name="title" translatable="yes">_Language</property>
                            <property name="use_underline">True</property>
                            <property name="activatable">True</property>
                            <property name="show-arrow">True</property>
                            <signal name="activated" handler="change_language" object="CcUserPanel" swapped="yes"/>
                          </object>
                        </child>
                      </object>
                    </child>

                    <child>
                      <object class="AdwPreferencesGroup">
                        <child>
                          <object class="GtkButton" id="remove_user_button">
                            <property name="visible">False</property>
                            <property name="label" translatable="yes">Remove User…</property>
                            <signal name="clicked" handler="delete_user" object="CcUserPanel" swapped="yes"/>
                            <style>
                              <class name="destructive-action"/>
                            </style>
                          </object>
                        </child>
                      </object>
                    </child>
                    <child>
                      <object class="AdwPreferencesGroup" id="other_users">
                        <property name="visible">False</property>
                        <property name="title" translatable="yes">Other Users</property>
                        <child>
                          <object class="GtkListBox" id="other_users_listbox">
                            <property name="selection-mode">none</property>
                            <signal name="row-activated" handler="set_selected_user" object="CcUserPanel" swapped="yes"/>
                            <style>
                              <class name="boxed-list"/>
                            </style>
                          </object>
                        </child>
                      </object>
                    </child>
                  </object>
                </child>
              </object>
            </child>
            <child>
              <object class="GtkBox" id="no_users_box">
                <property name="orientation">GTK_ORIENTATION_VERTICAL</property>
                <property name="valign">GTK_ALIGN_CENTER</property>
                <property name="spacing">12</property>
                <style>
                  <class name="dim-label"/>
                </style>
                <child>
                  <object class="GtkImage">
                    <property name="icon_name">avatar-default-symbolic</property>
                    <property name="pixel_size">192</property>
                  </object>
                </child>
                <child>
                  <object class="GtkLabel">
                    <property name="label" translatable="yes" comments="Translators: This is the empty state page label which states that there are no users to show in the panel.">No Users Found</property>
                    <attributes>
                      <attribute name="weight" value="bold"/>
                      <attribute name="scale" value="1.6"/>
                    </attributes>
                  </object>
                </child>
                <child>
                  <object class="GtkLabel">
                    <property name="label" translatable="yes">Unlock to add a user account.</property>
                  </object>
                </child>
              </object>
            </child>
          </object>
        </child>
      </object>
    </child>
  </template>
</interface>