Mercurial > libervia-backend
diff frontends/src/primitivus/profile_manager.py @ 1161:344bbe6fd1de
primitivus: profile manager now handle APP_QUIT key
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 04 Sep 2014 19:05:57 +0200 |
parents | 75025461141f |
children | 49d39b619e5d |
line wrap: on
line diff
--- a/frontends/src/primitivus/profile_manager.py Thu Sep 04 19:05:57 2014 +0200 +++ b/frontends/src/primitivus/profile_manager.py Thu Sep 04 19:05:57 2014 +0200 @@ -21,7 +21,7 @@ from sat_frontends.primitivus.constants import Const as C import urwid from urwid_satext.sat_widgets import AdvancedEdit, Password, List, InputDialog, ConfirmDialog, Alert -from sat_frontends.tools.jid import JID +from sat_frontends.primitivus.keys import action_key_map as a_key class ProfileManager(urwid.WidgetWrap): @@ -60,6 +60,12 @@ self.main_widget = urwid.LineBox(frame) urwid.WidgetWrap.__init__(self, self.main_widget) + def keypress(self, size, key): + if key == a_key['APP_QUIT']: + self.host.onExit() + raise urwid.ExitMainLoop() + return super(ProfileManager, self).keypress(size, key) + def __refillProfiles(self): """Update the list of profiles""" profiles = self.host.bridge.getProfilesList()