Mercurial > libervia-desktop-kivy
comparison src/cagou/core/cagou_main.py @ 48:028a98983e46
core: avoid kivy arguments hijacking so QuickApp arguments parsing can be used
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 10 Sep 2016 15:52:30 +0200 |
parents | 7819e9efa250 |
children | fd9cbf6ae663 |
comparison
equal
deleted
inserted
replaced
47:abb81efef3bb | 48:028a98983e46 |
---|---|
17 # You should have received a copy of the GNU Affero General Public License | 17 # You should have received a copy of the GNU Affero General Public License |
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 | 19 |
20 | 20 |
21 from sat.core.i18n import _ | 21 from sat.core.i18n import _ |
22 import logging_setter | 22 import kivy_hack |
23 logging_setter.set_logging() | 23 kivy_hack.do_hack() |
24 from constants import Const as C | 24 from constants import Const as C |
25 from sat.core import log as logging | 25 from sat.core import log as logging |
26 log = logging.getLogger(__name__) | 26 log = logging.getLogger(__name__) |
27 from sat.core import exceptions | 27 from sat.core import exceptions |
28 from sat_frontends.quick_frontend.quick_app import QuickApp | 28 from sat_frontends.quick_frontend.quick_app import QuickApp |
29 from sat_frontends.quick_frontend import quick_widgets | 29 from sat_frontends.quick_frontend import quick_widgets |
30 from sat_frontends.quick_frontend import quick_chat | 30 from sat_frontends.quick_frontend import quick_chat |
31 from sat_frontends.quick_frontend import quick_utils | |
31 from sat_frontends.bridge.DBus import DBusBridgeFrontend | 32 from sat_frontends.bridge.DBus import DBusBridgeFrontend |
32 import kivy | 33 import kivy |
33 kivy.require('1.9.1') | 34 kivy.require('1.9.1') |
34 import kivy.support | 35 import kivy.support |
35 kivy.support.install_gobject_iteration() | 36 kivy.support.install_gobject_iteration() |
198 | 199 |
199 class Cagou(QuickApp): | 200 class Cagou(QuickApp): |
200 MB_HANDLE = False | 201 MB_HANDLE = False |
201 | 202 |
202 def __init__(self): | 203 def __init__(self): |
203 super(Cagou, self).__init__(create_bridge=DBusBridgeFrontend, xmlui=xmlui) | 204 super(Cagou, self).__init__(create_bridge=DBusBridgeFrontend, xmlui=xmlui, check_options=quick_utils.check_options) |
204 self._import_kv() | 205 self._import_kv() |
205 self.app = CagouApp() | 206 self.app = CagouApp() |
206 self.app.host = self | 207 self.app.host = self |
207 self.media_dir = self.app.media_dir = self.bridge.getConfig("", "media_dir") | 208 self.media_dir = self.app.media_dir = self.bridge.getConfig("", "media_dir") |
208 self.app.default_avatar = os.path.join(self.media_dir, "misc/default_avatar.png") | 209 self.app.default_avatar = os.path.join(self.media_dir, "misc/default_avatar.png") |