Mercurial > libervia-web
comparison browser_side/menu.py @ 391:c86d7a8d2c1e
browser_side: added a dialog in Settings/Account to update/delete the XMPP account
author | souliane <souliane@mailoo.org> |
---|---|
date | Mon, 03 Mar 2014 15:44:54 +0100 |
parents | 933bce4cb816 |
children | f539f6f8ee9c |
comparison
equal
deleted
inserted
replaced
390:76583fab7ea0 | 391:c86d7a8d2c1e |
---|---|
138 | 138 |
139 menus_order.append(None) # we add separator | 139 menus_order.append(None) # we add separator |
140 | 140 |
141 addMenu("Help", _("Help"), _("Social contract"), 'help', MenuCmd(self, "onSocialContract")) | 141 addMenu("Help", _("Help"), _("Social contract"), 'help', MenuCmd(self, "onSocialContract")) |
142 addMenu("Help", _("Help"), _("About"), 'help', MenuCmd(self, "onAbout")) | 142 addMenu("Help", _("Help"), _("About"), 'help', MenuCmd(self, "onAbout")) |
143 addMenu("Settings", _("Settings"), _("Account"), 'settings', MenuCmd(self, "onAccount")) | |
143 addMenu("Settings", _("Settings"), _("Parameters"), 'settings', MenuCmd(self, "onParameters")) | 144 addMenu("Settings", _("Settings"), _("Parameters"), 'settings', MenuCmd(self, "onParameters")) |
144 | 145 |
145 # XXX: temporary, will change when a full profile will be managed in SàT | 146 # XXX: temporary, will change when a full profile will be managed in SàT |
146 addMenu("Settings", _("Settings"), _("Upload avatar"), 'settings', MenuCmd(self, "onAvatarUpload")) | 147 addMenu("Settings", _("Settings"), _("Upload avatar"), 'settings', MenuCmd(self, "onAvatarUpload")) |
147 | 148 |
299 def onXiangqiGame(self): | 300 def onXiangqiGame(self): |
300 Window.alert("A Xiangqi game is planed, but not available yet") | 301 Window.alert("A Xiangqi game is planed, but not available yet") |
301 | 302 |
302 #Settings menu | 303 #Settings menu |
303 | 304 |
305 def onAccount(self): | |
306 def gotUI(xmlui): | |
307 if not xmlui: | |
308 return | |
309 body = XMLUI(self.host, xmlui) | |
310 _dialog = dialog.GenericDialog("Manage your XMPP account", body, options=['NO_CLOSE']) | |
311 body.setCloseCb(_dialog.close) | |
312 _dialog.show() | |
313 self.host.bridge.call('getAccountDialogUI', gotUI) | |
314 | |
304 def onParameters(self): | 315 def onParameters(self): |
305 def gotParams(xmlui): | 316 def gotParams(xmlui): |
306 if not xmlui: | 317 if not xmlui: |
307 return | 318 return |
308 body = XMLUI(self.host, xmlui) | 319 body = XMLUI(self.host, xmlui) |