Fix a bug with notifs in systray.
This commit is contained in:
		
							parent
							
								
									0317b6af58
								
							
						
					
					
						commit
						1ee858e606
					
				
					 2 changed files with 14 additions and 9 deletions
				
			
		| 
						 | 
				
			
			@ -571,14 +571,18 @@ class ChatControlBase(MessageControl):
 | 
			
		|||
			gc_message = False
 | 
			
		||||
			if self.type_id  == message_control.TYPE_GC:
 | 
			
		||||
				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 \
 | 
			
		||||
			(gc_message and \
 | 
			
		||||
			gajim.interface.minimized_controls.has_key(self.account) and \
 | 
			
		||||
			jid in gajim.interface.minimized_controls[self.account]):
 | 
			
		||||
			# we want to have save this message in events list
 | 
			
		||||
			# other_tags_for_text == ['marked'] --> highlighted gc message
 | 
			
		||||
			jid in gajim.interface.minimized_controls[self.account]))) and \
 | 
			
		||||
			kind in ('incoming', 'incoming_queue'):
 | 
			
		||||
				# we want to have save this message in events list
 | 
			
		||||
				# other_tags_for_text == ['marked'] --> highlighted gc message
 | 
			
		||||
				type_ = 'printed_' + self.type_id
 | 
			
		||||
				event = 'message_received'
 | 
			
		||||
				if gc_message:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1080,11 +1080,12 @@ class Interface:
 | 
			
		|||
		room_jid in self.minimized_controls[account]:
 | 
			
		||||
			control = self.minimized_controls[account][room_jid]
 | 
			
		||||
 | 
			
		||||
		if control and control.type_id != message_control.TYPE_GC:
 | 
			
		||||
		if not control:
 | 
			
		||||
			return
 | 
			
		||||
		if control:
 | 
			
		||||
			control.chg_contact_status(nick, show, status, array[4], array[5],
 | 
			
		||||
				array[6], array[7], array[8], array[9], array[10])
 | 
			
		||||
		if control.type_id != message_control.TYPE_GC:
 | 
			
		||||
			return
 | 
			
		||||
		control.chg_contact_status(nick, show, status, array[4], array[5],
 | 
			
		||||
			array[6], array[7], array[8], array[9], array[10])
 | 
			
		||||
		if not control.parent_win:
 | 
			
		||||
			gajim.interface.roster.draw_contact(room_jid, account)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue