primitivus: use of new keys modules from Urwid SàText
This commit is contained in:
parent
acb499098f
commit
c45ba71f2a
1 changed files with 93 additions and 27 deletions
|
|
@ -21,10 +21,12 @@ from sat.core.i18n import _
|
|||
import urwid
|
||||
from urwid_satext import sat_widgets
|
||||
from sat_frontends.quick_frontend.quick_contact_list import QuickContactList
|
||||
from sat_frontends.quick_frontend.quick_utils import escapePrivate, unescapePrivate
|
||||
from sat_frontends.quick_frontend.quick_utils import unescapePrivate
|
||||
from sat_frontends.tools.jid import JID
|
||||
from sat_frontends.primitivus.status import StatusBar
|
||||
from sat_frontends.primitivus.constants import Const
|
||||
from sat_frontends.primitivus.keys import action_key_map as a_key
|
||||
|
||||
|
||||
class ContactList(urwid.WidgetWrap, QuickContactList):
|
||||
signals = ['click','change']
|
||||
|
|
@ -63,10 +65,10 @@ class ContactList(urwid.WidgetWrap, QuickContactList):
|
|||
self.update()
|
||||
|
||||
def keypress(self, size, key):
|
||||
if key == "meta s": #user wants to (un)hide contacts' statuses
|
||||
if key == a_key['STATUS_HIDE']: #user wants to (un)hide contacts' statuses
|
||||
self.show_status = not self.show_status
|
||||
self.update()
|
||||
elif key == "meta d": #user wants to (un)hide disconnected contacts
|
||||
elif key == a_key['DISCONNECTED_HIDE']: #user wants to (un)hide disconnected contacts
|
||||
self.show_disconnected = not self.show_disconnected
|
||||
self.update()
|
||||
return super(ContactList, self).keypress(size, key)
|
||||
|
|
|
|||
Loading…
Reference in a new issue