we can edit the account options in account's popup menu
This commit is contained in:
parent
2ab2f09e0e
commit
4e9f627a05
|
@ -1517,6 +1517,17 @@ class roster_Window:
|
||||||
menu.popup(None, None, None, event.button, event.time)
|
menu.popup(None, None, None, event.button, event.time)
|
||||||
menu.show_all()
|
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):
|
def mk_menu_account(self, event, iter):
|
||||||
"""Make account's popup menu"""
|
"""Make account's popup menu"""
|
||||||
model = self.tree.get_model()
|
model = self.tree.get_model()
|
||||||
|
@ -1549,6 +1560,10 @@ class roster_Window:
|
||||||
item = gtk.MenuItem()
|
item = gtk.MenuItem()
|
||||||
menu.append(item)
|
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.popup(None, None, None, event.button, event.time)
|
||||||
menu.show_all()
|
menu.show_all()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue