comparison src/cagou.py @ 12:30f6586f904b

widget selector: this widget will be the default one and display the different activities a user can do (chat, blog, file sharing, games, etc).
author Goffi <goffi@goffi.org>
date Fri, 08 Jul 2016 20:18:36 +0200
parents 49d30fc15884
children 12a189fbb9ba
comparison
equal deleted inserted replaced
11:49d30fc15884 12:30f6586f904b
31 import kivy.support 31 import kivy.support
32 kivy.support.install_gobject_iteration() 32 kivy.support.install_gobject_iteration()
33 from kivy.app import App 33 from kivy.app import App
34 import xmlui 34 import xmlui
35 from profile_manager import ProfileManager 35 from profile_manager import ProfileManager
36 from contact_list import ContactList
37 from kivy.uix.boxlayout import BoxLayout 36 from kivy.uix.boxlayout import BoxLayout
37 from widget_selector import WidgetSelector
38 from cagou_widget import CagouWidget 38 from cagou_widget import CagouWidget
39 import os.path 39 import os.path
40 40
41 41
42 class CagouRootWidget(BoxLayout): 42 class CagouRootWidget(BoxLayout):
71 71
72 def run(self): 72 def run(self):
73 self.app.run() 73 self.app.run()
74 74
75 def plugging_profiles(self): 75 def plugging_profiles(self):
76 contact_list = self.widgets.getOrCreateWidget(ContactList, None, on_new_widget=None) 76 widget_selector = WidgetSelector(self)
77 self.app.root.change_widgets([contact_list]) 77 self.app.root.change_widgets([widget_selector])
78 78
79 def setPresenceStatus(self, show='', status=None, profile=C.PROF_KEY_NONE): 79 def setPresenceStatus(self, show='', status=None, profile=C.PROF_KEY_NONE):
80 log.info(u"Profile presence status set to {show}/{status}".format(show=show, status=status)) 80 log.info(u"Profile presence status set to {show}/{status}".format(show=show, status=status))
81 81
82 def switchWidget(self, old, new): 82 def switchWidget(self, old, new):