we can edit the account options in account's popup menu

This commit is contained in:
Yann Leboulanger 2004-05-02 16:25:04 +00:00
parent 2ab2f09e0e
commit 4e9f627a05
1 changed files with 15 additions and 0 deletions

View File

@ -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()