Philipp Hörist pushed to branch master at gajim / gajim

Commits:

2 changed files:

Changes:

  • gajim/data/gui/server_info.ui
    1 1
     <?xml version="1.0" encoding="UTF-8"?>
    
    2
    -<!-- Generated with glade 3.36.0 -->
    
    2
    +<!-- Generated with glade 3.22.1 -->
    
    3 3
     <interface>
    
    4 4
       <requires lib="gtk+" version="3.22"/>
    
    5 5
       <object class="GtkNotebook" id="server_info_notebook">
    
    ... ... @@ -166,7 +166,7 @@
    166 166
               </object>
    
    167 167
               <packing>
    
    168 168
                 <property name="left_attach">1</property>
    
    169
    -            <property name="top_attach">0</property>
    
    169
    +            <property name="top_attach">4</property>
    
    170 170
               </packing>
    
    171 171
             </child>
    
    172 172
             <child>
    
    ... ... @@ -181,7 +181,7 @@
    181 181
               </object>
    
    182 182
               <packing>
    
    183 183
                 <property name="left_attach">0</property>
    
    184
    -            <property name="top_attach">2</property>
    
    184
    +            <property name="top_attach">5</property>
    
    185 185
               </packing>
    
    186 186
             </child>
    
    187 187
             <child>
    
    ... ... @@ -194,18 +194,7 @@
    194 194
               </object>
    
    195 195
               <packing>
    
    196 196
                 <property name="left_attach">1</property>
    
    197
    -            <property name="top_attach">2</property>
    
    198
    -          </packing>
    
    199
    -        </child>
    
    200
    -        <child>
    
    201
    -          <object class="GtkLabel" id="connection_protocol">
    
    202
    -            <property name="visible">True</property>
    
    203
    -            <property name="can_focus">False</property>
    
    204
    -            <property name="halign">start</property>
    
    205
    -          </object>
    
    206
    -          <packing>
    
    207
    -            <property name="left_attach">1</property>
    
    208
    -            <property name="top_attach">1</property>
    
    197
    +            <property name="top_attach">5</property>
    
    209 198
               </packing>
    
    210 199
             </child>
    
    211 200
             <child>
    
    ... ... @@ -221,7 +210,7 @@
    221 210
               </object>
    
    222 211
               <packing>
    
    223 212
                 <property name="left_attach">0</property>
    
    224
    -            <property name="top_attach">4</property>
    
    213
    +            <property name="top_attach">8</property>
    
    225 214
                 <property name="width">2</property>
    
    226 215
               </packing>
    
    227 216
             </child>
    
    ... ... @@ -237,7 +226,7 @@
    237 226
               </object>
    
    238 227
               <packing>
    
    239 228
                 <property name="left_attach">0</property>
    
    240
    -            <property name="top_attach">3</property>
    
    229
    +            <property name="top_attach">6</property>
    
    241 230
               </packing>
    
    242 231
             </child>
    
    243 232
             <child>
    
    ... ... @@ -250,7 +239,7 @@
    250 239
               </object>
    
    251 240
               <packing>
    
    252 241
                 <property name="left_attach">1</property>
    
    253
    -            <property name="top_attach">3</property>
    
    242
    +            <property name="top_attach">6</property>
    
    254 243
               </packing>
    
    255 244
             </child>
    
    256 245
             <child>
    
    ... ... @@ -265,15 +254,30 @@
    265 254
               </object>
    
    266 255
               <packing>
    
    267 256
                 <property name="left_attach">0</property>
    
    268
    -            <property name="top_attach">0</property>
    
    257
    +            <property name="top_attach">4</property>
    
    269 258
               </packing>
    
    270 259
             </child>
    
    271 260
             <child>
    
    272
    -          <object class="GtkLabel">
    
    261
    +          <object class="GtkLabel" id="domain_label">
    
    273 262
                 <property name="visible">True</property>
    
    274 263
                 <property name="can_focus">False</property>
    
    275 264
                 <property name="halign">end</property>
    
    276
    -            <property name="label" translatable="yes">Protocol</property>
    
    265
    +            <property name="label">Domain</property>
    
    266
    +            <style>
    
    267
    +              <class name="dim-label"/>
    
    268
    +            </style>
    
    269
    +          </object>
    
    270
    +          <packing>
    
    271
    +            <property name="left_attach">0</property>
    
    272
    +            <property name="top_attach">0</property>
    
    273
    +          </packing>
    
    274
    +        </child>
    
    275
    +        <child>
    
    276
    +          <object class="GtkLabel" id="dns_label">
    
    277
    +            <property name="can_focus">False</property>
    
    278
    +            <property name="no_show_all">True</property>
    
    279
    +            <property name="halign">end</property>
    
    280
    +            <property name="label">DNS</property>
    
    277 281
                 <style>
    
    278 282
                   <class name="dim-label"/>
    
    279 283
                 </style>
    
    ... ... @@ -283,6 +287,90 @@
    283 287
                 <property name="top_attach">1</property>
    
    284 288
               </packing>
    
    285 289
             </child>
    
    290
    +        <child>
    
    291
    +          <object class="GtkLabel" id="ip_port_label">
    
    292
    +            <property name="can_focus">False</property>
    
    293
    +            <property name="no_show_all">True</property>
    
    294
    +            <property name="halign">end</property>
    
    295
    +            <property name="label">IP / Port</property>
    
    296
    +            <style>
    
    297
    +              <class name="dim-label"/>
    
    298
    +            </style>
    
    299
    +          </object>
    
    300
    +          <packing>
    
    301
    +            <property name="left_attach">0</property>
    
    302
    +            <property name="top_attach">2</property>
    
    303
    +          </packing>
    
    304
    +        </child>
    
    305
    +        <child>
    
    306
    +          <object class="GtkLabel" id="websocket_label">
    
    307
    +            <property name="can_focus">False</property>
    
    308
    +            <property name="no_show_all">True</property>
    
    309
    +            <property name="halign">end</property>
    
    310
    +            <property name="label">WebSocket URL</property>
    
    311
    +            <style>
    
    312
    +              <class name="dim-label"/>
    
    313
    +            </style>
    
    314
    +          </object>
    
    315
    +          <packing>
    
    316
    +            <property name="left_attach">0</property>
    
    317
    +            <property name="top_attach">3</property>
    
    318
    +          </packing>
    
    319
    +        </child>
    
    320
    +        <child>
    
    321
    +          <object class="GtkLabel" id="domain">
    
    322
    +            <property name="visible">True</property>
    
    323
    +            <property name="can_focus">False</property>
    
    324
    +            <property name="halign">start</property>
    
    325
    +            <property name="xalign">0</property>
    
    326
    +          </object>
    
    327
    +          <packing>
    
    328
    +            <property name="left_attach">1</property>
    
    329
    +            <property name="top_attach">0</property>
    
    330
    +          </packing>
    
    331
    +        </child>
    
    332
    +        <child>
    
    333
    +          <object class="GtkLabel" id="dns">
    
    334
    +            <property name="can_focus">False</property>
    
    335
    +            <property name="no_show_all">True</property>
    
    336
    +            <property name="halign">start</property>
    
    337
    +            <property name="xalign">0</property>
    
    338
    +          </object>
    
    339
    +          <packing>
    
    340
    +            <property name="left_attach">1</property>
    
    341
    +            <property name="top_attach">1</property>
    
    342
    +          </packing>
    
    343
    +        </child>
    
    344
    +        <child>
    
    345
    +          <object class="GtkLabel" id="ip_port">
    
    346
    +            <property name="can_focus">False</property>
    
    347
    +            <property name="no_show_all">True</property>
    
    348
    +            <property name="halign">start</property>
    
    349
    +            <property name="xalign">0</property>
    
    350
    +          </object>
    
    351
    +          <packing>
    
    352
    +            <property name="left_attach">1</property>
    
    353
    +            <property name="top_attach">2</property>
    
    354
    +          </packing>
    
    355
    +        </child>
    
    356
    +        <child>
    
    357
    +          <object class="GtkLabel" id="websocket">
    
    358
    +            <property name="can_focus">False</property>
    
    359
    +            <property name="no_show_all">True</property>
    
    360
    +            <property name="halign">start</property>
    
    361
    +            <property name="xalign">0</property>
    
    362
    +          </object>
    
    363
    +          <packing>
    
    364
    +            <property name="left_attach">1</property>
    
    365
    +            <property name="top_attach">3</property>
    
    366
    +          </packing>
    
    367
    +        </child>
    
    368
    +        <child>
    
    369
    +          <placeholder/>
    
    370
    +        </child>
    
    371
    +        <child>
    
    372
    +          <placeholder/>
    
    373
    +        </child>
    
    286 374
             <style>
    
    287 375
               <class name="margin-18"/>
    
    288 376
             </style>
    

  • gajim/gtk/server_info.py
    ... ... @@ -91,25 +91,38 @@ class ServerInfo(Gtk.ApplicationWindow, EventHelper):
    91 91
     
    
    92 92
         def _add_connection_info(self):
    
    93 93
             # Connection type
    
    94
    -        client = app.connections[self.account].connection
    
    95
    -        con_type = client.current_connection_type
    
    96
    -        self._ui.connection_type.set_text(con_type.value)
    
    97
    -        if con_type.is_plain:
    
    98
    -            self._ui.conection_type.get_style_context().add_class(
    
    99
    -                'error-color')
    
    94
    +        nbxmpp_client = app.connections[self.account].connection
    
    95
    +        address = nbxmpp_client.current_address
    
    100 96
     
    
    101
    -        is_websocket = app.connections[self.account].connection.is_websocket
    
    102
    -        protocol = 'WebSocket' if is_websocket else 'TCP'
    
    103
    -        self._ui.connection_protocol.set_text(protocol)
    
    97
    +        self._ui.connection_type.set_text(address.type.value)
    
    98
    +        if address.type.is_plain:
    
    99
    +            self._ui.conection_type.get_style_context().add_class('error-color')
    
    104 100
     
    
    105 101
             # Connection proxy
    
    106
    -        proxy = client.proxy
    
    102
    +        proxy = address.proxy
    
    107 103
             if proxy is not None:
    
    108 104
                 self._ui.proxy_type.set_text(proxy.type)
    
    109 105
                 self._ui.proxy_host.set_text(proxy.host)
    
    110 106
     
    
    111 107
             self._ui.cert_button.set_sensitive(self.cert)
    
    112 108
     
    
    109
    +        self._ui.domain.set_text(address.domain)
    
    110
    +
    
    111
    +        visible = address.service is not None
    
    112
    +        self._ui.dns_label.set_visible(visible)
    
    113
    +        self._ui.dns.set_visible(visible)
    
    114
    +        self._ui.dns.set_text(address.service or '')
    
    115
    +
    
    116
    +        visible = nbxmpp_client.remote_address is not None
    
    117
    +        self._ui.ip_port_label.set_visible(visible)
    
    118
    +        self._ui.ip_port.set_visible(visible)
    
    119
    +        self._ui.ip_port.set_text(nbxmpp_client.remote_address or '')
    
    120
    +
    
    121
    +        visible = address.uri is not None
    
    122
    +        self._ui.websocket_label.set_visible(visible)
    
    123
    +        self._ui.websocket.set_visible(visible)
    
    124
    +        self._ui.websocket.set_text(address.uri or '')
    
    125
    +
    
    113 126
         def _on_cert_button_clicked(self, _button):
    
    114 127
             open_window('CertificateDialog',
    
    115 128
                         account=self.account,