primitivus: profile manager now handle APP_QUIT key
This commit is contained in:
parent
747cc31583
commit
49f7ebc67c
1 changed files with 7 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue