Daniel Brötzmann pushed to branch mainwindow at gajim / gajim

Commits:

1 changed file:

Changes:

  • gajim/gtk/roster.py
    ... ... @@ -98,10 +98,10 @@ def __init__(self, account):
    98 98
     
    
    99 99
         def _add_actions(self):
    
    100 100
             actions = [
    
    101
    -            ('contact-info', self._contact_info),
    
    102
    -            ('execute-command', self._execute_command),
    
    103
    -            ('block-contact', self._block_contact),
    
    104
    -            ('remove-contact', self._remove_contact),
    
    101
    +            ('contact-info', self._on_contact_info),
    
    102
    +            ('execute-command', self._on_execute_command),
    
    103
    +            ('block-contact', self._on_block_contact),
    
    104
    +            ('remove-contact', self._on_remove_contact),
    
    105 105
             ]
    
    106 106
             for action in actions:
    
    107 107
                 action_name, func = action
    
    ... ... @@ -114,7 +114,7 @@ def _add_actions(self):
    114 114
                 f'show-offline-{self._account}',
    
    115 115
                 None,
    
    116 116
                 GLib.Variant.new_boolean(app.settings.get('showoffline')))
    
    117
    -        action.connect('change-state', self._show_offline)
    
    117
    +        action.connect('change-state', self._on_show_offline)
    
    118 118
             app.window.add_action(action)
    
    119 119
     
    
    120 120
         def update_actions(self):
    
    ... ... @@ -151,21 +151,21 @@ def _on_account_state(self, _event):
    151 151
         def _on_theme_update(self, _event):
    
    152 152
             self.redraw()
    
    153 153
     
    
    154
    -    def _show_offline(self, action, param):
    
    154
    +    def _on_show_offline(self, action, param):
    
    155 155
             action.set_state(param)
    
    156 156
             app.settings.set('showoffline', param.get_boolean())
    
    157 157
             self._draw_contacts()
    
    158 158
     
    
    159
    -    def _contact_info(self, _action, param):
    
    159
    +    def _on_contact_info(self, _action, param):
    
    160 160
             app.window.contact_info(self._account, param.get_string())
    
    161 161
     
    
    162
    -    def _execute_command(self, _action, param):
    
    162
    +    def _on_execute_command(self, _action, param):
    
    163 163
             app.window.execute_command(self._account, param.get_string())
    
    164 164
     
    
    165
    -    def _block_contact(self, _action, param):
    
    165
    +    def _on_block_contact(self, _action, param):
    
    166 166
             app.window.block_contact(self._account, param.get_string())
    
    167 167
     
    
    168
    -    def _remove_contact(self, _action, param):
    
    168
    +    def _on_remove_contact(self, _action, param):
    
    169 169
             app.window.remove_contact(self._account, param.get_string())
    
    170 170
     
    
    171 171
         def _on_roster_row_activated(self, _treeview, path, _column):
    
    ... ... @@ -289,7 +289,7 @@ def _on_avatar_update(self, contact, _signal_name):
    289 289
             self._draw_contact(contact)
    
    290 290
     
    
    291 291
         @event_filter(['account'])
    
    292
    -    def _on_roster_received(self, event):
    
    292
    +    def _on_roster_received(self, _event):
    
    293 293
             self._reset()
    
    294 294
     
    
    295 295
         @event_filter(['account'])
    
    ... ... @@ -404,6 +404,7 @@ def _draw_contacts(self):
    404 404
         def _draw_contact(self, contact):
    
    405 405
             for ref in self._contact_refs[contact.jid]:
    
    406 406
                 self._draw_contact_row(ref, contact)
    
    407
    +        self._roster.expand_all()
    
    407 408
     
    
    408 409
         def _draw_contact_row(self, ref, contact):
    
    409 410
             iter_ = self._get_iter_from_ref(ref)
    
    ... ... @@ -490,8 +491,7 @@ def clear(self):
    490 491
             self._group_refs = {}
    
    491 492
             self._store.clear()
    
    492 493
     
    
    493
    -    def _on_presence_received(self, event):
    
    494
    -        # TODO: self.draw_contacts() if contact changes status
    
    494
    +    def _on_presence_received(self, _event):
    
    495 495
             pass
    
    496 496
     
    
    497 497
         def process_event(self, event):