gpg toggle button is now refreshed each time we get a presence

This commit is contained in:
Yann Leboulanger 2005-05-27 15:12:58 +00:00
parent 4097578005
commit 818590a0e8
2 changed files with 6 additions and 1 deletions

View File

@ -406,7 +406,7 @@ class Roster_window:
if not self.get_user_iter(user.jid, account):
self.add_user_to_roster(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):
jid = user.jid
self.plugin.windows[account]['chats'][jid].set_state_image(jid)

View File

@ -97,12 +97,17 @@ class Tabbed_chat_window(chat.Chat):
if u.priority > prio:
prio = u.priority
show = u.show
keyID = u.keyID
child = self.childs[jid]
status_image = self.notebook.get_tab_label(child).get_children()[0]
state_images = self.plugin.roster.get_appropriate_state_images(jid)
image = state_images[show]
non_tabbed_status_image = self.xmls[jid].get_widget(
'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:
non_tabbed_status_image.set_from_animation(image.get_animation())
status_image.set_from_animation(image.get_animation())