again fix logic after cut-paste

This commit is contained in:
Nikos Kouremenos 2006-03-27 23:10:41 +00:00
parent 27c59575cf
commit d1bb5cbc74
2 changed files with 4 additions and 3 deletions

View File

@ -724,7 +724,7 @@ def allow_showing_notification(account):
# check OUR status and if we allow notifications for that status # check OUR status and if we allow notifications for that status
if gajim.config.get('autopopupaway'): # always show notification if gajim.config.get('autopopupaway'): # always show notification
return True return True
if connections[account].connected in (2, 3): # we're online or chat if gajim.connections[account].connected in (2, 3): # we're online or chat
return True return True
return False return False
@ -732,6 +732,7 @@ def allow_popup_window(account):
'''is it allowed to popup windows?''' '''is it allowed to popup windows?'''
autopopup = gajim.config.get('autopopup') autopopup = gajim.config.get('autopopup')
autopopupaway = gajim.config.get('autopopupaway') autopopupaway = gajim.config.get('autopopupaway')
if autopopup and (autopopupaway or connections[account].connected in (2, 3)): if autopopup and (autopopupaway or \
gajim.connections[account].connected in (2, 3)): # we're online or chat
return True return True
return False return False

View File

@ -319,8 +319,8 @@ class Interface:
ji = jid.replace('@', '') ji = jid.replace('@', '')
else: else:
ji = jid ji = jid
# Update contact
# Update contact
jid_list = gajim.contacts.get_jid_list(account) jid_list = gajim.contacts.get_jid_list(account)
if ji in jid_list: if ji in jid_list:
lcontact = gajim.contacts.get_contacts_from_jid(account, ji) lcontact = gajim.contacts.get_contacts_from_jid(account, ji)