add_contact.ui 10.9 KB
Newer Older
Nico Alt's avatar
Nico Alt committed
1
<?xml version="1.0" encoding="UTF-8"?>
Nico Alt's avatar
Nico Alt committed
2 3 4 5
<!--
  Copyright (c) 2019 Nico Alt
  SPDX-License-Identifier: AGPL-3.0-only
  License-Filename: LICENSE.md
6 7 8

  Based on parts of GNOME Fractal
  https://gitlab.gnome.org/GNOME/fractal/blob/4.2.2/fractal-gtk/res/ui/login_flow.ui
Nico Alt's avatar
Nico Alt committed
9
-->
Nico Alt's avatar
Nico Alt committed
10
<interface>
11 12
  <requires lib="gtk+" version="3.22"/>
  <object class="GtkStack" id="add_contact_flow_stack">
Nico Alt's avatar
Nico Alt committed
13
    <property name="can_focus">False</property>
14 15
    <property name="hhomogeneous">True</property>
    <property name="transition_type">GTK_STACK_TRANSITION_TYPE_SLIDE_LEFT_RIGHT</property>
Nico Alt's avatar
Nico Alt committed
16
    <child>
17
      <object class="GtkGrid" id="links_page">
Nico Alt's avatar
Nico Alt committed
18 19
        <property name="visible">True</property>
        <property name="can_focus">False</property>
20 21
        <property name="halign">center</property>
        <property name="valign">center</property>
Nico Alt's avatar
Nico Alt committed
22
        <property name="column_spacing">12</property>
23
        <property name="row_spacing">24</property>
Nico Alt's avatar
Nico Alt committed
24
        <child>
25
          <object class="GtkLabel">
Nico Alt's avatar
Nico Alt committed
26
            <property name="visible">True</property>
27 28 29 30 31 32 33 34 35
            <property name="use_underline">True</property>
            <property name="can_focus">False</property>
            <property name="label" translatable="yes" context="add contact">Give this link to the contact you want to add</property>
            <property name="wrap">True</property>
            <property name="wrap_mode">PANGO_WRAP_WORD_CHAR</property>
            <property name="mnemonic_widget">own_link_entry</property>
            <style>
              <class name="dim-label"/>
            </style>
Nico Alt's avatar
Nico Alt committed
36 37
          </object>
          <packing>
38 39
            <property name="top-attach">1</property>
            <property name="left-attach">1</property>
Nico Alt's avatar
Nico Alt committed
40 41 42 43 44
          </packing>
        </child>
        <child>
          <object class="GtkEntry" id="own_link_entry">
            <property name="visible">True</property>
45 46 47
            <property name="max_width_chars">-1</property>
            <property name="width_request">232</property>
            <property name="can_focus">True</property>
48
            <property name="input_purpose">GTK_INPUT_PURPOSE_URL</property>
Nico Alt's avatar
Nico Alt committed
49 50
          </object>
          <packing>
51 52
            <property name="top-attach">2</property>
            <property name="left-attach">1</property>
Nico Alt's avatar
Nico Alt committed
53 54 55
          </packing>
        </child>
        <child>
56
          <object class="GtkLabel">
Nico Alt's avatar
Nico Alt committed
57
            <property name="visible">True</property>
58 59 60 61 62 63 64 65 66
            <property name="use_underline">True</property>
            <property name="can_focus">False</property>
            <property name="label" translatable="yes" context="add contact">Enter the link from your contact here</property>
            <property name="wrap">True</property>
            <property name="wrap_mode">PANGO_WRAP_WORD_CHAR</property>
            <property name="mnemonic_widget">their_link_entry</property>
            <style>
              <class name="dim-label"/>
            </style>
Nico Alt's avatar
Nico Alt committed
67 68
          </object>
          <packing>
69 70
            <property name="top-attach">3</property>
            <property name="left-attach">1</property>
Nico Alt's avatar
Nico Alt committed
71 72 73 74 75
          </packing>
        </child>
        <child>
          <object class="GtkEntry" id="their_link_entry">
            <property name="visible">True</property>
76 77 78 79
            <property name="max_width_chars">-1</property>
            <property name="width_request">232</property>
            <property name="can_focus">True</property>
            <property name="placeholder_text" translatable="yes" context="add contact">Contact's link</property>
80
            <property name="input_purpose">GTK_INPUT_PURPOSE_URL</property>
Nico Alt's avatar
Nico Alt committed
81 82
          </object>
          <packing>
83 84
            <property name="top-attach">4</property>
            <property name="left-attach">1</property>
Nico Alt's avatar
Nico Alt committed
85 86 87
          </packing>
        </child>
        <child>
88 89 90 91 92 93 94 95 96 97
          <object class="GtkLabel" id="link_error_label">
            <property name="visible">False</property>
            <property name="can_focus">False</property>
            <property name="no_show_all">True</property>
            <property name="label" translatable="yes" context="add contact">Please enter a link</property>
            <property name="wrap">True</property>
            <property name="wrap_mode">PANGO_WRAP_WORD_CHAR</property>
            <style>
              <class name="error-label"/>
            </style>
Nico Alt's avatar
Nico Alt committed
98 99
          </object>
          <packing>
100 101
            <property name="top-attach">5</property>
            <property name="left-attach">1</property>
Nico Alt's avatar
Nico Alt committed
102 103 104
          </packing>
        </child>
      </object>
105 106 107
      <packing>
        <property name="name">links</property>
      </packing>
Nico Alt's avatar
Nico Alt committed
108 109
    </child>
    <child>
110 111
      <object class="GtkGrid" id="alias_page">
        <property name="visible">True</property>
Nico Alt's avatar
Nico Alt committed
112
        <property name="can_focus">False</property>
113 114
        <property name="halign">center</property>
        <property name="valign">center</property>
Nico Alt's avatar
Nico Alt committed
115
        <property name="column_spacing">12</property>
116
        <property name="row_spacing">24</property>
Nico Alt's avatar
Nico Alt committed
117
        <child>
118
          <object class="GtkLabel">
Nico Alt's avatar
Nico Alt committed
119
            <property name="visible">True</property>
120 121 122 123 124 125 126 127 128 129
            <property name="use_underline">True</property>
            <property name="can_focus">False</property>
            <property name="label" translatable="yes" context="add contact">Give your contact a nickname. Only you can see it.</property>
            <property name="halign">end</property>
            <property name="wrap">True</property>
            <property name="wrap_mode">PANGO_WRAP_WORD_CHAR</property>
            <property name="mnemonic_widget">own_link_entry</property>
            <style>
              <class name="dim-label"/>
            </style>
Nico Alt's avatar
Nico Alt committed
130 131
          </object>
          <packing>
132 133
            <property name="top-attach">1</property>
            <property name="left-attach">1</property>
Nico Alt's avatar
Nico Alt committed
134 135 136 137 138
          </packing>
        </child>
        <child>
          <object class="GtkEntry" id="alias_entry">
            <property name="visible">True</property>
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154
            <property name="max_width_chars">-1</property>
            <property name="width_request">232</property>
            <property name="can_focus">True</property>
            <property name="placeholder_text" translatable="yes" context="add contact">Enter a nickname</property>
          </object>
          <packing>
            <property name="top-attach">2</property>
            <property name="left-attach">1</property>
          </packing>
        </child>
        <child>
          <object class="GtkLabel" id="alias_error_label">
            <property name="visible">False</property>
            <property name="can_focus">False</property>
            <property name="no_show_all">True</property>
            <property name="xalign">0</property>
Nico Alt's avatar
Nico Alt committed
155
            <property name="label" translatable="yes" context="add contact">Please enter a nickname</property>
156 157 158 159 160
            <property name="wrap">True</property>
            <property name="wrap_mode">PANGO_WRAP_WORD_CHAR</property>
            <style>
              <class name="error-label"/>
            </style>
Nico Alt's avatar
Nico Alt committed
161 162
          </object>
          <packing>
163 164
            <property name="top-attach">3</property>
            <property name="left-attach">1</property>
Nico Alt's avatar
Nico Alt committed
165 166
          </packing>
        </child>
167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185
      </object>
      <packing>
        <property name="name">alias</property>
      </packing>
    </child>
  </object>
  <object class="GtkStack" id="add_contact_flow_headers">
    <property name="can_focus">False</property>
    <property name="hhomogeneous">True</property>
    <property name="visible_child_name" bind-source="add_contact_flow_stack" bind-property="visible-child-name" bind-flags="sync-create"/>
    <property name="transition_duration" bind-source="add_contact_flow_stack" bind-property="transition-duration" bind-flags="sync-create"/>
    <property name="transition_type" bind-source="add_contact_flow_stack" bind-property="transition-type" bind-flags="sync-create"/>
    <child>
      <object class="GtkHeaderBar">
        <property name="visible">True</property>
        <property name="can_focus">False</property>
        <property name="show_close_button">True</property>
        <property name="width_request">360</property>
        <property name="title">Add contact</property>
Nico Alt's avatar
Nico Alt committed
186
        <child>
187
          <object class="GtkButton">
Nico Alt's avatar
Nico Alt committed
188
            <property name="visible">True</property>
189 190 191 192 193 194 195 196
            <property name="can_focus">True</property>
            <signal name="clicked" handler="on_link_back_pressed"/>
            <child>
              <object class="GtkImage">
                <property name="visible">True</property>
                <property name="icon_name">go-previous-symbolic</property>
              </object>
            </child>
Nico Alt's avatar
Nico Alt committed
197 198
          </object>
          <packing>
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214
            <property name="pack_type">start</property>
          </packing>
        </child>
        <child>
          <object class="GtkButton">
            <property name="visible">True</property>
            <property name="use_underline">True</property>
            <property name="can_focus">True</property>
            <property name="label" translatable="yes">Next</property>
            <signal name="clicked" handler="on_links_next_pressed"/>
            <style>
              <class name="suggested-action"/>
            </style>
          </object>
          <packing>
            <property name="pack_type">end</property>
Nico Alt's avatar
Nico Alt committed
215 216 217
          </packing>
        </child>
      </object>
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
      <packing>
        <property name="name">links</property>
      </packing>
    </child>
    <child>
      <object class="GtkHeaderBar">
        <property name="visible">True</property>
        <property name="can_focus">False</property>
        <property name="show_close_button">True</property>
        <property name="title" translatable="yes">Add contact</property>
        <child>
          <object class="GtkButton">
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <signal name="clicked" handler="on_alias_back_pressed"/>
            <child>
              <object class="GtkImage">
                <property name="visible">True</property>
                <property name="icon_name">go-previous-symbolic</property>
              </object>
            </child>
          </object>
          <packing>
            <property name="pack_type">start</property>
          </packing>
        </child>
        <child>
          <object class="GtkButton">
            <property name="visible">True</property>
            <property name="use_underline">True</property>
            <property name="can_focus">True</property>
            <property name="label" translatable="yes">Add contact</property>
            <signal name="clicked" handler="on_add_contact_pressed"/>
            <style>
              <class name="suggested-action"/>
            </style>
          </object>
          <packing>
            <property name="pack_type">end</property>
          </packing>
        </child>
      </object>
      <packing>
        <property name="name">alias</property>
      </packing>
Nico Alt's avatar
Nico Alt committed
263 264 265 266
    </child>
  </object>
</interface>