Fix a bug with notifs in systray.

This commit is contained in:
Julien Pivotto 2007-05-08 15:38:23 +00:00
parent 0317b6af58
commit 1ee858e606
2 changed files with 14 additions and 9 deletions

View File

@ -571,12 +571,16 @@ class ChatControlBase(MessageControl):
gc_message = False gc_message = False
if self.type_id == message_control.TYPE_GC: if self.type_id == message_control.TYPE_GC:
gc_message = True gc_message = True
if not gc_message or \
(gc_message and (other_tags_for_text == ['marked'] or \ if ((self.parent_win and (not self.parent_win.get_active_jid() or \
full_jid != self.parent_win.get_active_jid() or \
not self.parent_win.is_active() or not end)) or \
((gc_message and (other_tags_for_text == ['marked'] or \
gajim.config.get('notify_on_all_muc_messages'))) or \ gajim.config.get('notify_on_all_muc_messages'))) or \
(gc_message and \ (gc_message and \
gajim.interface.minimized_controls.has_key(self.account) and \ gajim.interface.minimized_controls.has_key(self.account) and \
jid in gajim.interface.minimized_controls[self.account]): jid in gajim.interface.minimized_controls[self.account]))) and \
kind in ('incoming', 'incoming_queue'):
# we want to have save this message in events list # we want to have save this message in events list
# other_tags_for_text == ['marked'] --> highlighted gc message # other_tags_for_text == ['marked'] --> highlighted gc message
type_ = 'printed_' + self.type_id type_ = 'printed_' + self.type_id

View File

@ -1080,9 +1080,10 @@ class Interface:
room_jid in self.minimized_controls[account]: room_jid in self.minimized_controls[account]:
control = self.minimized_controls[account][room_jid] control = self.minimized_controls[account][room_jid]
if control and control.type_id != message_control.TYPE_GC: if not control:
return
if control.type_id != message_control.TYPE_GC:
return return
if control:
control.chg_contact_status(nick, show, status, array[4], array[5], control.chg_contact_status(nick, show, status, array[4], array[5],
array[6], array[7], array[8], array[9], array[10]) array[6], array[7], array[8], array[9], array[10])
if not control.parent_win: if not control.parent_win: