From 49f7ebc67c094f043c7f91e62c6cde876afd6bf1 Mon Sep 17 00:00:00 2001 From: Goffi Date: Thu, 4 Sep 2014 19:05:57 +0200 Subject: [PATCH] primitivus: profile manager now handle APP_QUIT key --- frontends/src/primitivus/profile_manager.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontends/src/primitivus/profile_manager.py b/frontends/src/primitivus/profile_manager.py index 34b2428c..78351bad 100644 --- a/frontends/src/primitivus/profile_manager.py +++ b/frontends/src/primitivus/profile_manager.py @@ -21,7 +21,7 @@ from sat.core.i18n import _ 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 @@ class ProfileManager(urwid.WidgetWrap): 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()