From 818590a0e8310328420b64629e03c583d15a632f Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Fri, 27 May 2005 15:12:58 +0000 Subject: [PATCH] gpg toggle button is now refreshed each time we get a presence --- src/roster_window.py | 2 +- src/tabbed_chat_window.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/roster_window.py b/src/roster_window.py index eafbc88d8..f2e04e030 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -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) diff --git a/src/tabbed_chat_window.py b/src/tabbed_chat_window.py index 830b86e7e..1ac36df97 100644 --- a/src/tabbed_chat_window.py +++ b/src/tabbed_chat_window.py @@ -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())