Mercurial > libervia-backend
comparison frontends/primitivus/primitivus @ 113:e5ca22113280
Primitivus: profile manager
- new custom widgets: Password, List, GenericDialog, InputDialog, ConfirmationDialog
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 01 Jul 2010 15:35:56 +0800 |
parents | f551e44adb25 |
children | 7c482ecac0ff |
comparison
equal
deleted
inserted
replaced
112:f551e44adb25 | 113:e5ca22113280 |
---|---|
49 logging.basicConfig(level=logging.CRITICAL, #TODO: configure it to put messages in a log file | 49 logging.basicConfig(level=logging.CRITICAL, #TODO: configure it to put messages in a log file |
50 format='%(message)s') | 50 format='%(message)s') |
51 ### | 51 ### |
52 | 52 |
53 const_APP_NAME = "Primitivus" | 53 const_APP_NAME = "Primitivus" |
54 const_PALETTE = [('title', 'black', 'light gray', 'standout,underline'),] | 54 const_PALETTE = [('title', 'black', 'light gray', 'standout,underline'), |
55 ('selected', 'default', 'dark red'), | |
56 ('selected_focus', 'default,bold', 'dark red'), | |
57 ('default', 'default', 'default'), | |
58 ('default_focus', 'default,bold', 'default'), | |
59 ] | |
55 | 60 |
56 class PrimitivusApp(QuickApp): | 61 class PrimitivusApp(QuickApp): |
57 | 62 |
58 def __init__(self): | 63 def __init__(self): |
59 QuickApp.__init__(self) #XXX: yes it's an unusual place for the constructor of a parent class, but the init order is important | 64 QuickApp.__init__(self) #XXX: yes it's an unusual place for the constructor of a parent class, but the init order is important |
68 def key_handler(self, input): | 73 def key_handler(self, input): |
69 if input in ('q', 'Q') or input == 'ctrl x': | 74 if input in ('q', 'Q') or input == 'ctrl x': |
70 raise urwid.ExitMainLoop() | 75 raise urwid.ExitMainLoop() |
71 | 76 |
72 def __buildMainWidget(self): | 77 def __buildMainWidget(self): |
78 #main_widget = urwid.Filler(ProfileManager(self)) | |
73 main_widget = ProfileManager(self) | 79 main_widget = ProfileManager(self) |
74 return main_widget | 80 return main_widget |
75 | 81 |
76 | 82 |
77 sat = PrimitivusApp() | 83 sat = PrimitivusApp() |