From 5d8ea9d3bcb1a8b33412e3e546bb873d69529d6a Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 18 May 2005 08:47:38 +0000 Subject: [PATCH] we can now ask vcard when we recieve a subscription request --- src/dialogs.py | 18 ++++++++++- src/gtkgui.glade | 79 ++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 93 insertions(+), 4 deletions(-) diff --git a/src/dialogs.py b/src/dialogs.py index 8b9e57d7a..d838ddf99 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -451,7 +451,7 @@ class Subscription_request_window: self.plugin = plugin self.jid = jid self.account = account - xml.get_widget('from_label').set_text(\ + xml.get_widget('from_label').set_text( _('Subscription request from %s') % self.jid) xml.get_widget('message_textview').get_buffer().set_text(text) xml.signal_autoconnect(self) @@ -466,6 +466,22 @@ class Subscription_request_window: self.window.destroy() if not self.plugin.roster.contacts[self.account].has_key(self.jid): Add_new_contact_window(self.plugin, self.account, self.jid) + + def on_contact_info_button_clicked(self, widget): + '''ask vcard''' + if self.plugin.windows[self.account]['infos'].has_key(self.jid): + self.plugin.windows[self.account]['infos'][self.jid].window.present() + else: + self.plugin.windows[self.account]['infos'][self.jid] = \ + Vcard_window(self.jid, self.plugin, self.account, True) + #remove the publish / retrieve buttons + vcard_xml = self.plugin.windows[self.account]['infos'][self.jid].xml + hbuttonbox = vcard_xml.get_widget('information_hbuttonbox') + children = hbuttonbox.get_children() + hbuttonbox.remove(children[0]) + hbuttonbox.remove(children[1]) + vcard_xml.get_widget('nickname_label').set_text(self.jid) + gajim.connections[self.account].request_vcard(self.jid) def on_deny_button_clicked(self, widget): '''refuse the request''' diff --git a/src/gtkgui.glade b/src/gtkgui.glade index 8f2bdaebb..b71b631d2 100644 --- a/src/gtkgui.glade +++ b/src/gtkgui.glade @@ -2166,13 +2166,13 @@ 4 - 400 + 550 200 Subscription Request GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False - False + True False True False @@ -2249,7 +2249,7 @@ 5 True GTK_BUTTONBOX_END - 20 + 12 @@ -2267,6 +2267,7 @@ True + Deny authorization from contact so he cannot know when you're connected True True GTK_RELIEF_NORMAL @@ -2335,9 +2336,81 @@ + + + True + True + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + gtk-justify-fill + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + Contact _Info + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + True + Authorize contact so he can know when you're connected True True True