better varname and clearer logic
This commit is contained in:
parent
88ed7f5cfb
commit
57fad03435
|
@ -891,7 +891,7 @@ class Interface:
|
|||
# We received a bookmark item from the server (JEP48)
|
||||
# Auto join GC windows if neccessary
|
||||
|
||||
self.roster.menu_is_ready = False
|
||||
self.roster.actions_menu_needs_rebuild = True
|
||||
invisible_show = gajim.SHOW_LIST.index('invisible')
|
||||
# do not autojoin if we are invisible
|
||||
if gajim.connections[account].connected == invisible_show:
|
||||
|
@ -1149,7 +1149,7 @@ class Interface:
|
|||
def handle_event_signed_in(self, account, empty):
|
||||
'''SIGNED_IN event is emitted when we sign in, so handle it'''
|
||||
# join already open groupchats
|
||||
self.roster.menu_is_ready = False
|
||||
self.roster.actions_menu_needs_rebuild = True
|
||||
for gc_control in gajim.interface.msg_win_mgr.get_controls(message_control.TYPE_GC):
|
||||
if account != gc_control.account:
|
||||
continue
|
||||
|
|
|
@ -518,7 +518,7 @@ class RosterWindow:
|
|||
|
||||
def make_menu(self):
|
||||
'''create the main window's menus'''
|
||||
if self.menu_is_ready:
|
||||
if self.actions_menu_needs_rebuild:
|
||||
return
|
||||
new_message_menuitem = self.xml.get_widget('new_message_menuitem')
|
||||
join_gc_menuitem = self.xml.get_widget('join_gc_menuitem')
|
||||
|
@ -706,7 +706,7 @@ class RosterWindow:
|
|||
show_offline_contacts_menuitem.set_sensitive(False)
|
||||
profile_avatar_menuitem.set_sensitive(False)
|
||||
|
||||
self.menu_is_ready = True
|
||||
self.actions_menu_needs_rebuild = False
|
||||
|
||||
def _change_style(self, model, path, iter, option):
|
||||
if option is None:
|
||||
|
@ -1781,7 +1781,7 @@ _('If "%s" accepts this request you will know his or her status.') % jid)
|
|||
lcontact_copy.append(contact)
|
||||
for contact in lcontact_copy:
|
||||
self.chg_contact_status(contact, 'offline', '', account)
|
||||
self.menu_is_ready = False
|
||||
self.actions_menu_needs_rebuild = True
|
||||
self.update_status_combobox()
|
||||
|
||||
def new_chat(self, contact, account, private_chat = False):
|
||||
|
@ -2878,7 +2878,7 @@ _('If "%s" accepts this request you will know his or her status.') % jid)
|
|||
self.add_new_contact_handler_id = False
|
||||
self.service_disco_handler_id = False
|
||||
self.new_message_menuitem_handler_id = False
|
||||
self.menu_is_ready = False
|
||||
self.actions_menu_needs_rebuild = True
|
||||
self.regroup = gajim.config.get('mergeaccounts')
|
||||
if len(gajim.connections) < 2: # Do not merge accounts if only one exists
|
||||
self.regroup = False
|
||||
|
|
Loading…
Reference in New Issue