Mercurial > libervia-backend
comparison frontends/src/primitivus/primitivus @ 679:59c9a7ff903d
wix, misc: use picture of dimension 32x32 for tray icon + better PEP-8 compliance
author | souliane <souliane@mailoo.org> |
---|---|
date | Tue, 22 Oct 2013 09:41:27 +0200 |
parents | 903c4749de15 |
children | af0d08a84cc6 |
comparison
equal
deleted
inserted
replaced
678:a630b94280d5 | 679:59c9a7ff903d |
---|---|
152 ## main loop setup ## | 152 ## main loop setup ## |
153 self.main_widget = ProfileManager(self) | 153 self.main_widget = ProfileManager(self) |
154 self.loop = urwid.MainLoop(self.main_widget, const_PALETTE, event_loop=urwid.GLibEventLoop(), input_filter=self.inputFilter, unhandled_input=self.keyHandler) | 154 self.loop = urwid.MainLoop(self.main_widget, const_PALETTE, event_loop=urwid.GLibEventLoop(), input_filter=self.inputFilter, unhandled_input=self.keyHandler) |
155 | 155 |
156 ##misc setup## | 156 ##misc setup## |
157 self.chat_wins=ChatList(self) | 157 self.chat_wins = ChatList(self) |
158 self.notBar = sat_widgets.NotificationBar() | 158 self.notBar = sat_widgets.NotificationBar() |
159 urwid.connect_signal(self.notBar,'change',self.onNotification) | 159 urwid.connect_signal(self.notBar, 'change', self.onNotification) |
160 self.progress_wid = Progress(self) | 160 self.progress_wid = Progress(self) |
161 urwid.connect_signal(self.notBar.progress,'click',lambda x:self.addWindow(self.progress_wid)) | 161 urwid.connect_signal(self.notBar.progress, 'click', lambda x: self.addWindow(self.progress_wid)) |
162 self.__saved_overlay = None | 162 self.__saved_overlay = None |
163 | 163 |
164 self.x_notify = Notify() | 164 self.x_notify = Notify() |
165 | 165 |
166 @property | 166 @property |
297 | 297 |
298 menu_roller = sat_widgets.MenuRoller([(_('Main menu'),menu)]) | 298 menu_roller = sat_widgets.MenuRoller([(_('Main menu'),menu)]) |
299 return menu_roller | 299 return menu_roller |
300 | 300 |
301 def __buildMainWidget(self): | 301 def __buildMainWidget(self): |
302 self.contact_list = ContactList(self, on_click = self.contactSelected, on_change=lambda w: self.redraw()) | 302 self.contact_list = ContactList(self, on_click=self.contactSelected, on_change=lambda w: self.redraw()) |
303 #self.center_part = urwid.Columns([('weight',2,self.contact_list),('weight',8,Chat('',self))]) | 303 #self.center_part = urwid.Columns([('weight',2,self.contact_list),('weight',8,Chat('',self))]) |
304 self.center_part = urwid.Columns([('weight',2,self.contact_list), ('weight',8,urwid.Filler(urwid.Text('')))]) | 304 self.center_part = urwid.Columns([('weight', 2, self.contact_list), ('weight', 8, urwid.Filler(urwid.Text('')))]) |
305 | 305 |
306 self.editBar = EditBar(self) | 306 self.editBar = EditBar(self) |
307 self.menu_roller = self.__buildMenuRoller() | 307 self.menu_roller = self.__buildMenuRoller() |
308 self.main_widget = sat_widgets.FocusFrame(self.center_part, header=self.menu_roller, footer=self.editBar, focus_part='footer') | 308 self.main_widget = sat_widgets.FocusFrame(self.center_part, header=self.menu_roller, footer=self.editBar, focus_part='footer') |
309 return self.main_widget | 309 return self.main_widget |