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

Commits:

3 changed files:

Changes:

  • gajim/data/gui/preferences_window.ui
    1 1
     <?xml version="1.0" encoding="UTF-8"?>
    
    2
    -<!-- Generated with glade 3.22.1 -->
    
    2
    +<!-- Generated with glade 3.36.0 -->
    
    3 3
     <interface>
    
    4 4
       <requires lib="gtk+" version="3.22"/>
    
    5 5
       <object class="GtkAdjustment" id="adjustment_status_auto_away">
    
    ... ... @@ -16,32 +16,6 @@
    16 16
         <property name="step_increment">1</property>
    
    17 17
         <property name="page_increment">10</property>
    
    18 18
       </object>
    
    19
    -  <object class="GtkListStore" id="applications_liststore">
    
    20
    -    <columns>
    
    21
    -      <!-- column-name item -->
    
    22
    -      <column type="gchararray"/>
    
    23
    -    </columns>
    
    24
    -    <data>
    
    25
    -      <row>
    
    26
    -        <col id="0" translatable="yes">Use default applications</col>
    
    27
    -      </row>
    
    28
    -      <row>
    
    29
    -        <col id="0" translatable="yes">Custom</col>
    
    30
    -      </row>
    
    31
    -    </data>
    
    32
    -  </object>
    
    33
    -  <object class="GtkListStore" id="default_message_liststore">
    
    34
    -    <columns>
    
    35
    -      <!-- column-name status_ -->
    
    36
    -      <column type="gchararray"/>
    
    37
    -      <!-- column-name status -->
    
    38
    -      <column type="gchararray"/>
    
    39
    -      <!-- column-name defaultmsg -->
    
    40
    -      <column type="gchararray"/>
    
    41
    -      <!-- column-name enabled -->
    
    42
    -      <column type="gboolean"/>
    
    43
    -    </columns>
    
    44
    -  </object>
    
    45 19
       <object class="GtkListStore" id="on_event_received_liststore">
    
    46 20
         <columns>
    
    47 21
           <!-- column-name item -->
    
    ... ... @@ -139,24 +113,6 @@
    139 113
           </row>
    
    140 114
         </data>
    
    141 115
       </object>
    
    142
    -  <object class="GtkListStore" id="status_message_liststore">
    
    143
    -    <columns>
    
    144
    -      <!-- column-name name -->
    
    145
    -      <column type="gchararray"/>
    
    146
    -      <!-- column-name text -->
    
    147
    -      <column type="gchararray"/>
    
    148
    -      <!-- column-name activity -->
    
    149
    -      <column type="gchararray"/>
    
    150
    -      <!-- column-name sub_activity -->
    
    151
    -      <column type="gchararray"/>
    
    152
    -      <!-- column-name activity_text -->
    
    153
    -      <column type="gchararray"/>
    
    154
    -      <!-- column-name mood -->
    
    155
    -      <column type="gchararray"/>
    
    156
    -      <!-- column-name mood_text -->
    
    157
    -      <column type="gchararray"/>
    
    158
    -    </columns>
    
    159
    -  </object>
    
    160 116
       <object class="GtkListStore" id="sync_threshold_liststore">
    
    161 117
         <columns>
    
    162 118
           <!-- column-name days -->
    
    ... ... @@ -1276,57 +1232,6 @@
    1276 1232
                 <property name="border_width">18</property>
    
    1277 1233
                 <property name="orientation">vertical</property>
    
    1278 1234
                 <property name="spacing">6</property>
    
    1279
    -            <child>
    
    1280
    -              <object class="GtkFrame">
    
    1281
    -                <property name="visible">True</property>
    
    1282
    -                <property name="can_focus">False</property>
    
    1283
    -                <property name="valign">start</property>
    
    1284
    -                <property name="label_xalign">0</property>
    
    1285
    -                <property name="shadow_type">none</property>
    
    1286
    -                <child>
    
    1287
    -                  <object class="GtkGrid">
    
    1288
    -                    <property name="visible">True</property>
    
    1289
    -                    <property name="can_focus">False</property>
    
    1290
    -                    <property name="margin_top">6</property>
    
    1291
    -                    <property name="row_spacing">6</property>
    
    1292
    -                    <child>
    
    1293
    -                      <object class="GtkCheckButton" id="restore_last_status_checkbutton">
    
    1294
    -                        <property name="label" translatable="yes">_Remember last status</property>
    
    1295
    -                        <property name="visible">True</property>
    
    1296
    -                        <property name="can_focus">True</property>
    
    1297
    -                        <property name="receives_default">False</property>
    
    1298
    -                        <property name="tooltip_text" translatable="yes">If checked, the status and status message used in the last session will be restored</property>
    
    1299
    -                        <property name="halign">start</property>
    
    1300
    -                        <property name="use_underline">True</property>
    
    1301
    -                        <property name="draw_indicator">True</property>
    
    1302
    -                        <signal name="toggled" handler="on_restore_last_status_checkbutton_toggled" swapped="no"/>
    
    1303
    -                      </object>
    
    1304
    -                      <packing>
    
    1305
    -                        <property name="left_attach">0</property>
    
    1306
    -                        <property name="top_attach">0</property>
    
    1307
    -                      </packing>
    
    1308
    -                    </child>
    
    1309
    -                  </object>
    
    1310
    -                </child>
    
    1311
    -                <child type="label">
    
    1312
    -                  <object class="GtkLabel">
    
    1313
    -                    <property name="visible">True</property>
    
    1314
    -                    <property name="can_focus">False</property>
    
    1315
    -                    <property name="label" translatable="yes">General</property>
    
    1316
    -                    <property name="use_markup">True</property>
    
    1317
    -                    <style>
    
    1318
    -                      <class name="bold"/>
    
    1319
    -                      <class name="margin-top6"/>
    
    1320
    -                    </style>
    
    1321
    -                  </object>
    
    1322
    -                </child>
    
    1323
    -              </object>
    
    1324
    -              <packing>
    
    1325
    -                <property name="expand">True</property>
    
    1326
    -                <property name="fill">True</property>
    
    1327
    -                <property name="position">0</property>
    
    1328
    -              </packing>
    
    1329
    -            </child>
    
    1330 1235
                 <child>
    
    1331 1236
                   <object class="GtkFrame">
    
    1332 1237
                     <property name="visible">True</property>
    

  • gajim/gtk/accounts.py
    ... ... @@ -635,6 +635,11 @@ class GeneralPage(GenericSettingPage):
    635 635
                         SettingType.ACCOUNT_CONFIG, 'sync_with_global_status',
    
    636 636
                         desc=_('Synchronise the status of all accounts')),
    
    637 637
     
    
    638
    +            Setting(SettingKind.SWITCH, _('Remember Last Status'),
    
    639
    +                    SettingType.ACCOUNT_CONFIG, 'restore_last_status',
    
    640
    +                    desc=_('Restore status and status message of your '
    
    641
    +                           'last session')),
    
    642
    +
    
    638 643
                 Setting(SettingKind.SWITCH, _('Use file transfer proxies'),
    
    639 644
                         SettingType.ACCOUNT_CONFIG, 'use_ft_proxies'),
    
    640 645
             ]
    

  • gajim/gtk/preferences.py
    ... ... @@ -257,13 +257,6 @@ class Preferences(Gtk.ApplicationWindow):
    257 257
             if not idle.Monitor.is_available():
    
    258 258
                 self._ui.autoaway_table.set_sensitive(False)
    
    259 259
     
    
    260
    -        # Restore last status
    
    261
    -        st = self.get_per_account_option('restore_last_status')
    
    262
    -        if st == 'mixed':
    
    263
    -            self._ui.restore_last_status_checkbutton.set_inconsistent(True)
    
    264
    -        else:
    
    265
    -            self._ui.restore_last_status_checkbutton.set_active(st)
    
    266
    -
    
    267 260
             # Ask for status when online/offline
    
    268 261
             st = app.config.get('ask_online_status')
    
    269 262
             self._ui.sign_in_status_checkbutton.set_active(st)
    
    ... ... @@ -427,23 +420,6 @@ class Preferences(Gtk.ApplicationWindow):
    427 420
             if event.keyval == Gdk.KEY_Escape:
    
    428 421
                 self.destroy()
    
    429 422
     
    
    430
    -    def get_per_account_option(self, opt):
    
    431
    -        """
    
    432
    -        Return the value of the option opt if it's the same in all accounts else
    
    433
    -        returns "mixed"
    
    434
    -        """
    
    435
    -        if not app.connections:
    
    436
    -            # A non existent key return default value
    
    437
    -            return app.config.get_per('accounts', '__default__', opt)
    
    438
    -        val = None
    
    439
    -        for account in app.connections:
    
    440
    -            v = app.config.get_per('accounts', account, opt)
    
    441
    -            if val is None:
    
    442
    -                val = v
    
    443
    -            elif val != v:
    
    444
    -                return 'mixed'
    
    445
    -        return val
    
    446
    -
    
    447 423
         def on_checkbutton_toggled(self, widget, config_name,
    
    448 424
                                    change_sensitivity_widgets=None):
    
    449 425
             app.config.set(config_name, widget.get_active())
    
    ... ... @@ -451,15 +427,6 @@ class Preferences(Gtk.ApplicationWindow):
    451 427
                 for w in change_sensitivity_widgets:
    
    452 428
                     w.set_sensitive(widget.get_active())
    
    453 429
     
    
    454
    -    def on_per_account_checkbutton_toggled(self, widget, config_name,
    
    455
    -                                           change_sensitivity_widgets=None):
    
    456
    -        for account in app.connections:
    
    457
    -            app.config.set_per('accounts', account, config_name,
    
    458
    -                    widget.get_active())
    
    459
    -        if change_sensitivity_widgets:
    
    460
    -            for w in change_sensitivity_widgets:
    
    461
    -                w.set_sensitive(widget.get_active())
    
    462
    -
    
    463 430
         def _get_all_controls(self):
    
    464 431
             for ctrl in app.interface.msg_win_mgr.get_controls():
    
    465 432
                 yield ctrl
    
    ... ... @@ -663,10 +630,6 @@ class Preferences(Gtk.ApplicationWindow):
    663 630
         def on_auto_xa_message_entry_changed(self, widget):
    
    664 631
             app.config.set('autoxa_message', widget.get_text())
    
    665 632
     
    
    666
    -    def on_restore_last_status_checkbutton_toggled(self, widget):
    
    667
    -        widget.set_inconsistent(False)
    
    668
    -        self.on_per_account_checkbutton_toggled(widget, 'restore_last_status')
    
    669
    -
    
    670 633
         def on_sign_in_status_checkbutton_toggled(self, widget):
    
    671 634
             self.on_checkbutton_toggled(widget, 'ask_online_status')
    
    672 635