For GC, draw banner AFTER we change status of control
This commit is contained in:
		
							parent
							
								
									7db9216442
								
							
						
					
					
						commit
						de3af10b75
					
				
					 1 changed files with 13 additions and 11 deletions
				
			
		
							
								
								
									
										24
									
								
								src/gajim.py
									
										
									
									
									
								
							
							
						
						
									
										24
									
								
								src/gajim.py
									
										
									
									
									
								
							| 
						 | 
					@ -831,17 +831,6 @@ class Interface:
 | 
				
			||||||
		fjid = room_jid + '/' + nick
 | 
							fjid = room_jid + '/' + nick
 | 
				
			||||||
		show = array[1]
 | 
							show = array[1]
 | 
				
			||||||
		status = array[2]
 | 
							status = array[2]
 | 
				
			||||||
		# print status in chat window and update status/GPG image
 | 
					 | 
				
			||||||
		if self.msg_win_mgr.has_window(fjid, account):
 | 
					 | 
				
			||||||
			ctrl = self.msg_win_mgr.get_control(fjid, account)
 | 
					 | 
				
			||||||
			contact = ctrl.contact
 | 
					 | 
				
			||||||
			contact.show = show
 | 
					 | 
				
			||||||
			contact.status = status
 | 
					 | 
				
			||||||
			ctrl.update_ui()
 | 
					 | 
				
			||||||
			uf_show = helpers.get_uf_show(show)
 | 
					 | 
				
			||||||
			ctrl.print_conversation(_('%s is now %s (%s)') % (nick, uf_show, status),
 | 
					 | 
				
			||||||
						'status')
 | 
					 | 
				
			||||||
			ctrl.draw_banner()
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
		# Get the window and control for the updated status, this may be a PrivateChatControl
 | 
							# Get the window and control for the updated status, this may be a PrivateChatControl
 | 
				
			||||||
		control = self.msg_win_mgr.get_control(room_jid, account)
 | 
							control = self.msg_win_mgr.get_control(room_jid, account)
 | 
				
			||||||
| 
						 | 
					@ -855,6 +844,19 @@ class Interface:
 | 
				
			||||||
			if self.remote_ctrl:
 | 
								if self.remote_ctrl:
 | 
				
			||||||
				self.remote_ctrl.raise_signal('GCPresence', (account, array))
 | 
									self.remote_ctrl.raise_signal('GCPresence', (account, array))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							# print status in chat window and update status/GPG image
 | 
				
			||||||
 | 
							if self.msg_win_mgr.has_window(fjid, account):
 | 
				
			||||||
 | 
								ctrl = self.msg_win_mgr.get_control(fjid, account)
 | 
				
			||||||
 | 
								contact = ctrl.contact
 | 
				
			||||||
 | 
								contact.show = show
 | 
				
			||||||
 | 
								contact.status = status
 | 
				
			||||||
 | 
								ctrl.update_ui()
 | 
				
			||||||
 | 
								uf_show = helpers.get_uf_show(show)
 | 
				
			||||||
 | 
								ctrl.print_conversation(_('%s is now %s (%s)') % (nick, uf_show, status),
 | 
				
			||||||
 | 
											'status')
 | 
				
			||||||
 | 
								ctrl.draw_banner()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	def handle_event_gc_msg(self, account, array):
 | 
						def handle_event_gc_msg(self, account, array):
 | 
				
			||||||
		# ('GC_MSG', account, (jid, msg, time))
 | 
							# ('GC_MSG', account, (jid, msg, time))
 | 
				
			||||||
		jids = array[0].split('/', 1)
 | 
							jids = array[0].split('/', 1)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue