From 935e57c18cb217631dbddf7349fc211c7be882e8 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Mon, 7 Mar 2005 21:03:48 +0000 Subject: [PATCH] on_edit_details_button_clicked is better like that --- plugins/gtkgui/config.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/plugins/gtkgui/config.py b/plugins/gtkgui/config.py index a02deb071..17a54754b 100644 --- a/plugins/gtkgui/config.py +++ b/plugins/gtkgui/config.py @@ -1128,14 +1128,17 @@ class Account_modification_window: 'GtkGui')) def on_edit_details_button_clicked(self, widget): - if not self.plugin.windows.has_key('vcard'): - jid = self.xml.get_widget('jid_entry').get_text() - if self.plugin.connected[self.account]: - self.plugin.windows[self.account]['infos'][jid] = \ - vcard_information_window(jid, self.plugin, self.account, True) - self.plugin.send('ASK_VCARD', self.account, jid) - else: - Warning_dialog(_('You must be connected to get your informations')) + if not self.plugin.windows.has_key(self.account): + Warning_dialog(_('You must first create your account before editing your information')) + return + jid = self.xml.get_widget('jid_entry').get_text() + if not self.plugin.connected[self.account]: + Warning_dialog(_('You must be connected to edit your information')) + return + if not self.plugin.windows[self.account]['infos'].has_key('vcard'): + self.plugin.windows[self.account]['infos'][jid] = \ + vcard_information_window(jid, self.plugin, self.account, True) + self.plugin.send('ASK_VCARD', self.account, jid) def on_gpg_choose_button_clicked(self, widget, data=None): w = choose_gpg_key_dialog()