anastasis-gtk

Demonstrator GUI for Anastasis
Log | Files | Refs | README | LICENSE

anastasis_gtk_edit_providers.ui (12025B)


      1 <?xml version="1.0" encoding="UTF-8"?>
      2 <!--
      3 Copyright (C) 2019-2021 Anastasis SARL
      4 
      5 This file is part of Anastasis-gtk.
      6 
      7 Anastasis-gtk is free software: you can redistribute it and/or modify
      8 it under the terms of the GNU Lesser General Public License as published by
      9 the Free Software Foundation, either version 3 of the License, or
     10 (at your option) any later version.
     11 
     12 Anastasis-gtk is distributed in the hope that it will be useful,
     13 but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 GNU Lesser General Public License for more details.
     16 
     17 You should have received a copy of the GNU Lesser General Public License
     18 along with Anastasis-gtk.  If not, see <http://www.gnu.org/licenses/>.
     19 
     20 Author: Christian Grothoff-->
     21 <interface>
     22   <requires lib="gtk" version="4.0"/>
     23   <object class="GListStore" id="provider_liststore">
     24     <property name="item-type">AGRow</property>
     25   </object>
     26   <object class="GtkSortListModel" id="provider_sorted">
     27     <property name="model">provider_liststore</property>
     28   </object>
     29   <object class="GtkSingleSelection" id="provider_selection">
     30     <property name="model">provider_sorted</property>
     31     <property name="autoselect">0</property>
     32     <property name="can-unselect">1</property>
     33   </object>
     34   <object class="GtkDialog" id="edit_provider_dialog">
     35     <property name="modal">1</property>
     36     <property name="focus-widget">url_entry</property>
     37     <property name="default-widget">add_button</property>
     38     <signal name="response" handler="edit_provider_dialog_response_cb" swapped="no"/>
     39     <child internal-child="content_area">
     40       <object class="GtkBox">
     41         <property name="orientation">vertical</property>
     42         <property name="spacing">2</property>
     43         <child>
     44           <object class="GtkBox">
     45             <property name="vexpand">1</property>
     46             <property name="focusable">1</property>
     47             <property name="orientation">vertical</property>
     48             <child>
     49               <object class="GtkBox">
     50                 <property name="valign">center</property>
     51                 <property name="focusable">1</property>
     52                 <property name="margin-top">5</property>
     53                 <property name="margin-bottom">5</property>
     54                 <property name="hexpand">0</property>
     55                 <child>
     56                   <object class="GtkLabel">
     57                     <property name="label" translatable="1">Provider URL:</property>
     58                     <property name="margin-start">5</property>
     59                     <property name="margin-end">5</property>
     60                   </object>
     61                 </child>
     62                 <child>
     63                   <object class="GtkEntry" id="url_entry">
     64                     <property name="hexpand">1</property>
     65                     <property name="focusable">1</property>
     66                     <property name="activates-default">1</property>
     67                     <property name="width-chars">54</property>
     68                     <property name="primary-icon-name">gtk-edit</property>
     69                     <property name="secondary-icon-activatable">0</property>
     70                     <property name="secondary-icon-sensitive">0</property>
     71                     <property name="placeholder-text" translatable="1">https://</property>
     72                     <signal name="changed" handler="url_entry_changed_cb" swapped="no"/>
     73                     <property name="margin-start">5</property>
     74                     <property name="margin-end">5</property>
     75                   </object>
     76                 </child>
     77                 <child>
     78                   <object class="GtkButton" id="add_button">
     79                     <property name="halign">center</property>
     80                     <property name="label" translatable="1">_Add</property>
     81                     <property name="sensitive">0</property>
     82                     <property name="receives-default">1</property>
     83                     <property name="use-underline">1</property>
     84                     <signal name="clicked" handler="url_add_button_clicked_cb" swapped="no"/>
     85                   </object>
     86                 </child>
     87               </object>
     88             </child>
     89             <child>
     90               <object class="GtkBox">
     91                 <property name="vexpand">1</property>
     92                 <property name="hexpand">0</property>
     93                 <child>
     94                   <object class="GtkFrame">
     95                     <property name="hexpand">1</property>
     96                     <property name="margin-top">10</property>
     97                     <property name="child">
     98                       <object class="GtkScrolledWindow">
     99                         <property name="height-request">300</property>
    100                         <property name="child">
    101                           <object class="GtkColumnView" id="provider_tree_view">
    102                             <property name="model">provider_selection</property>
    103                             <child>
    104                               <object class="GtkColumnViewColumn" id="enabled_column">
    105                                 <property name="title" translatable="1">Use</property>
    106                                 <property name="factory">
    107                                   <object class="GtkSignalListItemFactory">
    108                                     <signal name="setup" handler="AG_cell_setup_provider_use"/>
    109                                     <signal name="bind" handler="AG_cell_bind_provider_use"/>
    110                                     <signal name="unbind" handler="AG_cell_unbind"/>
    111                                   </object>
    112                                 </property>
    113                               </object>
    114                             </child>
    115                             <child>
    116                               <object class="GtkColumnViewColumn" id="url_column">
    117                                 <property name="title" translatable="1">Provider</property>
    118                                 <property name="factory">
    119                                   <object class="GtkSignalListItemFactory">
    120                                     <signal name="setup" handler="AG_cell_setup_text"/>
    121                                     <signal name="bind" handler="AG_cell_bind_provider_name"/>
    122                                     <signal name="unbind" handler="AG_cell_unbind"/>
    123                                   </object>
    124                                 </property>
    125                               </object>
    126                             </child>
    127                             <child>
    128                               <object class="GtkColumnViewColumn" id="liability_column">
    129                                 <property name="title" translatable="1">Liability limit</property>
    130                                 <property name="factory">
    131                                   <object class="GtkSignalListItemFactory">
    132                                     <signal name="setup" handler="AG_cell_setup_text"/>
    133                                     <signal name="bind" handler="AG_cell_bind_provider_liability"/>
    134                                     <signal name="unbind" handler="AG_cell_unbind"/>
    135                                   </object>
    136                                 </property>
    137                               </object>
    138                             </child>
    139                             <child>
    140                               <object class="GtkColumnViewColumn" id="status_column">
    141                                 <property name="expand">1</property>
    142                                 <property name="title" translatable="1">Status</property>
    143                                 <property name="factory">
    144                                   <object class="GtkSignalListItemFactory">
    145                                     <signal name="setup" handler="AG_cell_setup_text"/>
    146                                     <signal name="bind" handler="AG_cell_bind_provider_status"/>
    147                                     <signal name="unbind" handler="AG_cell_unbind"/>
    148                                   </object>
    149                                 </property>
    150                               </object>
    151                             </child>
    152                             <child>
    153                               <object class="GtkGestureClick">
    154                                 <property name="button">3</property>
    155                                 <signal name="pressed" handler="provider_tree_view_pressed_cb"/>
    156                               </object>
    157                             </child>
    158                           </object>
    159                         </property>
    160                         <property name="margin-start">12</property>
    161                       </object>
    162                     </property>
    163                     <child type="label">
    164                       <object class="GtkLabel">
    165                         <property name="label" translatable="1">Known providers</property>
    166                         <attributes>
    167                           <attribute name="weight" value="bold"></attribute>
    168                         </attributes>
    169                       </object>
    170                     </child>
    171                     <style>
    172                       <class name="flat"/>
    173                     </style>
    174                     <property name="margin-start">5</property>
    175                     <property name="margin-end">5</property>
    176                   </object>
    177                 </child>
    178               </object>
    179             </child>
    180           </object>
    181         </child>
    182       </object>
    183     </child>
    184     <action-widgets>
    185       <action-widget response="-6">cancel_button</action-widget>
    186       <action-widget response="-10">close_button</action-widget>
    187     </action-widgets>
    188     <child type="titlebar">
    189       <object class="GtkLabel">
    190         <property name="label" translatable="1">Add Anastasis provider</property>
    191       </object>
    192     </child>
    193     <action-widgets>
    194       <action-widget response="-6">cancel_button</action-widget>
    195       <action-widget response="-10">close_button</action-widget>
    196     </action-widgets>
    197     <child internal-child="action_area">
    198       <object class="GtkBox">
    199         <property name="can-focus">0</property>
    200         <property name="homogeneous">1</property>
    201         <property name="spacing">6</property>
    202         <property name="halign">end</property>
    203         <child>
    204           <object class="GtkButton" id="cancel_button">
    205             <property name="child">
    206               <object class="GtkBox">
    207                 <property name="spacing">2</property>
    208                 <property name="halign">center</property>
    209                 <child>
    210                   <object class="GtkImage">
    211                     <property name="icon-name">gtk-cancel</property>
    212                   </object>
    213                 </child>
    214                 <child>
    215                   <object class="GtkLabel">
    216                     <property name="label" translatable="1">_Cancel</property>
    217                     <property name="use-underline">1</property>
    218                     <property name="mnemonic-widget">cancel_button</property>
    219                   </object>
    220                 </child>
    221               </object>
    222             </property>
    223           </object>
    224         </child>
    225         <child>
    226           <object class="GtkButton" id="close_button">
    227             <property name="child">
    228               <object class="GtkBox">
    229                 <property name="spacing">2</property>
    230                 <property name="halign">center</property>
    231                 <child>
    232                   <object class="GtkImage">
    233                     <property name="icon-name">gtk-apply</property>
    234                   </object>
    235                 </child>
    236                 <child>
    237                   <object class="GtkLabel">
    238                     <property name="label" translatable="1">_Apply</property>
    239                     <property name="use-underline">1</property>
    240                     <property name="mnemonic-widget">close_button</property>
    241                   </object>
    242                 </child>
    243               </object>
    244             </property>
    245           </object>
    246         </child>
    247       </object>
    248     </child>
    249   </object>
    250 </interface>