Mercurial > libervia-desktop-kivy
comparison src/cagou/core/cagou_main.py @ 78:46d962910801
chat: file upload first draft:
- added a icon to upload files
- only do a basic upload with list file browser for now
- use the new progressFinished and progressError listeners
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 22 Dec 2016 19:03:06 +0100 |
parents | bc170ccca744 |
children | c2a7234d13d2 |
comparison
equal
deleted
inserted
replaced
77:bc170ccca744 | 78:46d962910801 |
---|---|
168 main_screen.add_widget(main_widget) | 168 main_screen.add_widget(main_widget) |
169 self._manager.add_widget(main_screen) | 169 self._manager.add_widget(main_screen) |
170 # backend XMLUI (popups, forms, etc) | 170 # backend XMLUI (popups, forms, etc) |
171 xmlui_screen = Screen(name='xmlui') | 171 xmlui_screen = Screen(name='xmlui') |
172 self._manager.add_widget(xmlui_screen) | 172 self._manager.add_widget(xmlui_screen) |
173 # extra (file chooser, audio record, etc) | |
174 extra_screen = Screen(name='extra') | |
175 self._manager.add_widget(extra_screen) | |
173 self.add_widget(self._manager) | 176 self.add_widget(self._manager) |
174 | 177 |
175 def changeWidget(self, widget, screen_name="main"): | 178 def changeWidget(self, widget, screen_name="main"): |
176 """change main widget""" | 179 """change main widget""" |
177 if self._manager.transition.is_active: | 180 if self._manager.transition.is_active: |
551 @param ui(xmlui.XMLUIPanel): XMLUI instance to show when notification is selected | 554 @param ui(xmlui.XMLUIPanel): XMLUI instance to show when notification is selected |
552 """ | 555 """ |
553 self.app.root.addNotifUI(ui) | 556 self.app.root.addNotifUI(ui) |
554 | 557 |
555 def showUI(self, ui): | 558 def showUI(self, ui): |
559 """show a XMLUI""" | |
556 self.app.root.changeWidget(ui, "xmlui") | 560 self.app.root.changeWidget(ui, "xmlui") |
557 self.app.root.show("xmlui") | 561 self.app.root.show("xmlui") |
562 | |
563 def showExtraUI(self, widget): | |
564 """show any extra widget""" | |
565 self.app.root.changeWidget(widget, "extra") | |
566 self.app.root.show("extra") | |
558 | 567 |
559 def closeUI(self): | 568 def closeUI(self): |
560 self.app.root.show() | 569 self.app.root.show() |
561 | 570 |
562 def getDefaultAvatar(self, entity=None): | 571 def getDefaultAvatar(self, entity=None): |