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

Commits:

3 changed files:

Changes:

  • gajim/gtk/status_selector.py
    ... ... @@ -30,6 +30,7 @@ class StatusSelector(Gtk.MenuButton):
    30 30
             self.set_direction(Gtk.ArrowType.UP)
    
    31 31
             self._compact = compact
    
    32 32
             self._create_popover()
    
    33
    +        self.set_no_show_all(True)
    
    33 34
     
    
    34 35
             self._current_show_icon = Gtk.Image()
    
    35 36
             self._current_show_icon.set_from_icon_name(
    
    ... ... @@ -43,6 +44,7 @@ class StatusSelector(Gtk.MenuButton):
    43 44
                 self._current_show_label.set_halign(Gtk.Align.START)
    
    44 45
                 self._current_show_label.set_xalign(0)
    
    45 46
                 box.add(self._current_show_label)
    
    47
    +            box.show_all()
    
    46 48
             self.add(box)
    
    47 49
     
    
    48 50
         def _create_popover(self):
    
    ... ... @@ -106,6 +108,11 @@ class StatusSelector(Gtk.MenuButton):
    106 108
             app.interface.change_status(status=new_status)
    
    107 109
     
    
    108 110
         def update(self):
    
    111
    +        if not app.connections:
    
    112
    +            self.hide()
    
    113
    +            return
    
    114
    +
    
    115
    +        self.show()
    
    109 116
             show = get_global_show()
    
    110 117
             uf_show = get_uf_show(show)
    
    111 118
             self._current_show_icon.set_from_icon_name(
    

  • gajim/gui_interface.py
    ... ... @@ -1638,6 +1638,7 @@ class Interface:
    1638 1638
             app.config.set_per(
    
    1639 1639
                 'accounts', account, 'roster_version', '')
    
    1640 1640
             self.roster.setup_and_draw_roster()
    
    1641
    +        self.roster.update_status_selector()
    
    1641 1642
             gui_menu_builder.build_accounts_menu()
    
    1642 1643
             app.config.set_per('accounts', account, 'active', False)
    
    1643 1644
             app.app.update_app_actions_state()
    

  • gajim/roster_window.py
    ... ... @@ -1446,6 +1446,8 @@ class RosterWindow:
    1446 1446
             # Recalculate column width for ellipsizing
    
    1447 1447
             self.tree.columns_autosize()
    
    1448 1448
     
    
    1449
    +    def update_status_selector(self):
    
    1450
    +        self._status_selector.update()
    
    1449 1451
     
    
    1450 1452
         def select_contact(self, jid, account):
    
    1451 1453
             """