comparison src/cagou.py @ 0:160cc95ad7ea

initial commit: - basic SàT/QuickApp integration - basic XMLUI - profile manager first draft
author Goffi <goffi@goffi.org>
date Sat, 26 Mar 2016 16:20:52 +0100
parents
children 85649eca9f9b
comparison
equal deleted inserted replaced
-1:000000000000 0:160cc95ad7ea
1 #!/usr/bin/python
2 # -*- coding: utf-8 -*-
3
4 # Cagou: desktop/mobile frontend for Salut à Toi XMPP client
5 # Copyright (C) 2016 Jérôme Poisson (goffi@goffi.org)
6
7 # This program is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU Affero General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
11
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU Affero General Public License for more details.
16
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/>.
19
20
21 from sat_frontends.primitivus.constants import Const as C
22 from sat.core import log_config
23 log_config.satConfigure(C.LOG_BACKEND_STANDARD, C)
24 from sat.core import log as logging
25 log = logging.getLogger(__name__)
26 from sat_frontends.quick_frontend.quick_app import QuickApp
27 from sat_frontends.bridge.DBus import DBusBridgeFrontend
28 # from sat_frontends.quick_frontend import quick_utils
29 import kivy
30 kivy.require('1.9.1')
31 import kivy.support
32 kivy.support.install_gobject_iteration()
33 from kivy.app import App
34 import xmlui
35 from profile_manager import ProfileManager
36
37
38 class CagouApp(App):
39 """Kivy App for Cagou"""
40
41 def build(self):
42 return ProfileManager(self.host)
43
44
45 class Cagou(QuickApp):
46 MB_HANDLE = False
47
48 def __init__(self):
49 super(Cagou, self).__init__(create_bridge=DBusBridgeFrontend, xmlui=xmlui)
50 self.app = CagouApp()
51 self.app.host = self
52
53 def run(self):
54 self.app.run()
55
56
57 if __name__ == '__main__':
58 Cagou().run()