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

Commits:

1 changed file:

Changes:

  • gajim/gtk/main.py
    ... ... @@ -68,7 +68,6 @@ def __init__(self):
    68 68
             self._ui.paned.set_position(app.settings.get('chat_handle_position'))
    
    69 69
             self._ui.paned.connect('button-release-event', self._on_button_release)
    
    70 70
     
    
    71
    -        # pylint: disable=line-too-long
    
    72 71
             self.register_events([
    
    73 72
                 ('presence-received', ged.GUI1, self._on_event),
    
    74 73
                 ('nickname-received', ged.GUI1, self._on_event),
    
    ... ... @@ -110,6 +109,8 @@ def __init__(self):
    110 109
                 ('muc-disco-update', ged.GUI1, self._on_event),
    
    111 110
                 ('muc-configuration-finished', ged.GUI1, self._on_event),
    
    112 111
                 ('muc-configuration-failed', ged.GUI1, self._on_event),
    
    112
    +            ('our-show', ged.GUI1, self._on_our_show),
    
    113
    +            ('signed-in', ged.GUI1, self._on_signed_in),
    
    113 114
             ])
    
    114 115
     
    
    115 116
             self.show_all()
    
    ... ... @@ -118,6 +119,17 @@ def __init__(self):
    118 119
             self._add_accounts()
    
    119 120
             self._add_actions()
    
    120 121
     
    
    122
    +    @staticmethod
    
    123
    +    def _on_our_show(event):
    
    124
    +        if event.show == 'offline':
    
    125
    +            app.app.set_account_actions_state(event.account)
    
    126
    +            app.app.update_app_actions_state()
    
    127
    +
    
    128
    +    @staticmethod
    
    129
    +    def _on_signed_in(event):
    
    130
    +        app.app.set_account_actions_state(event.account, True)
    
    131
    +        app.app.update_app_actions_state()
    
    132
    +
    
    121 133
         @staticmethod
    
    122 134
         def _on_button_release(paned, event):
    
    123 135
             if event.window != paned.get_handle_window():