we can add a contact only if the account is connected

This commit is contained in:
Yann Leboulanger 2005-02-07 22:23:27 +00:00
parent 54b781ef56
commit d6fb096e2e
1 changed files with 3 additions and 0 deletions

View File

@ -420,6 +420,9 @@ class addContact_Window:
self.old_login_value = self.xml.get_widget('entry_login').get_text()
def __init__(self, plugin, account, jid=None):
if not plugin.connected[account]:
warning_Window(_("You must be connected to add a contact"))
return
self.plugin = plugin
self.account = account
self.xml = gtk.glade.XML(GTKGUI_GLADE, 'Add', APP)