From 4e9f627a053ea6463290dcc91573de356cd89314 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sun, 2 May 2004 16:25:04 +0000 Subject: [PATCH] we can edit the account options in account's popup menu --- plugins/gtkgui/gtkgui.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/plugins/gtkgui/gtkgui.py b/plugins/gtkgui/gtkgui.py index 61faa7bc8..5a9884aab 100644 --- a/plugins/gtkgui/gtkgui.py +++ b/plugins/gtkgui/gtkgui.py @@ -1517,6 +1517,17 @@ class roster_Window: menu.popup(None, None, None, event.button, event.time) menu.show_all() + def on_edit_account(self, widget, account): + if not self.plugin.windows.has_key('accountPreference'): + infos = {} + infos['name'] = account + infos['jid'] = self.plugin.accounts[account]["name"] + \ + '@' + self.plugin.accounts[account]["hostname"] + infos['password'] = self.plugin.accounts[account]["password"] + infos['ressource'] = self.plugin.accounts[account]["ressource"] + self.plugin.windows['accountPreference'] = \ + accountPreference_Window(self.plugin, infos) + def mk_menu_account(self, event, iter): """Make account's popup menu""" model = self.tree.get_model() @@ -1549,6 +1560,10 @@ class roster_Window: item = gtk.MenuItem() menu.append(item) + item = gtk.MenuItem("Edit account") + menu.append(item) + item.connect("activate", self.on_edit_account, account) + menu.popup(None, None, None, event.button, event.time) menu.show_all()