gpg toggle button is now refreshed each time we get a presence
This commit is contained in:
		
							parent
							
								
									4097578005
								
							
						
					
					
						commit
						818590a0e8
					
				
					 2 changed files with 6 additions and 1 deletions
				
			
		| 
						 | 
					@ -406,7 +406,7 @@ class Roster_window:
 | 
				
			||||||
			if not self.get_user_iter(user.jid, account):
 | 
								if not self.get_user_iter(user.jid, account):
 | 
				
			||||||
				self.add_user_to_roster(user.jid, account)
 | 
									self.add_user_to_roster(user.jid, account)
 | 
				
			||||||
			self.draw_contact(user.jid, account)
 | 
								self.draw_contact(user.jid, account)
 | 
				
			||||||
		#print status in chat window and update status image
 | 
							#print status in chat window and update status/GPG image
 | 
				
			||||||
		if self.plugin.windows[account]['chats'].has_key(user.jid):
 | 
							if self.plugin.windows[account]['chats'].has_key(user.jid):
 | 
				
			||||||
			jid = user.jid
 | 
								jid = user.jid
 | 
				
			||||||
			self.plugin.windows[account]['chats'][jid].set_state_image(jid)
 | 
								self.plugin.windows[account]['chats'][jid].set_state_image(jid)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -97,12 +97,17 @@ class Tabbed_chat_window(chat.Chat):
 | 
				
			||||||
			if u.priority > prio:
 | 
								if u.priority > prio:
 | 
				
			||||||
				prio = u.priority
 | 
									prio = u.priority
 | 
				
			||||||
				show = u.show
 | 
									show = u.show
 | 
				
			||||||
 | 
									keyID = u.keyID
 | 
				
			||||||
		child = self.childs[jid]
 | 
							child = self.childs[jid]
 | 
				
			||||||
		status_image = self.notebook.get_tab_label(child).get_children()[0]
 | 
							status_image = self.notebook.get_tab_label(child).get_children()[0]
 | 
				
			||||||
		state_images = self.plugin.roster.get_appropriate_state_images(jid)
 | 
							state_images = self.plugin.roster.get_appropriate_state_images(jid)
 | 
				
			||||||
		image = state_images[show]
 | 
							image = state_images[show]
 | 
				
			||||||
		non_tabbed_status_image = self.xmls[jid].get_widget(
 | 
							non_tabbed_status_image = self.xmls[jid].get_widget(
 | 
				
			||||||
																	'nontabbed_status_image')
 | 
																						'nontabbed_status_image')
 | 
				
			||||||
 | 
							if keyID:
 | 
				
			||||||
 | 
								self.xmls[jid].get_widget('gpg_togglebutton').set_sensitive(True)
 | 
				
			||||||
 | 
							else:
 | 
				
			||||||
 | 
								self.xmls[jid].get_widget('gpg_togglebutton').set_sensitive(False)
 | 
				
			||||||
		if image.get_storage_type() == gtk.IMAGE_ANIMATION:
 | 
							if image.get_storage_type() == gtk.IMAGE_ANIMATION:
 | 
				
			||||||
			non_tabbed_status_image.set_from_animation(image.get_animation())
 | 
								non_tabbed_status_image.set_from_animation(image.get_animation())
 | 
				
			||||||
			status_image.set_from_animation(image.get_animation())
 | 
								status_image.set_from_animation(image.get_animation())
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue