Beispiel #1
0
    def run(self, window, contact):
        self.contact = contact
        self.name = "Edit %s" % contact.name
        self.frame = self.view(window, back_button=True)

        vbox = gui.Box(self.frame, axis=1, expand=True)

        self.attr_list = tichy.ActorList()
        self.update()
        list_view = self.attr_list.view(vbox)

        yield tichy.Wait(self.frame, 'back')
Beispiel #2
0
    def run(self, window):
        frame = self.view(window, back_button=True)

        vbox = gui.Box(frame, axis=1, expand=True)

        # We create a list of the sub applications actors
        list = tichy.ActorList()
        for app in [New, Inbox, Outbox]:
            actor = app.create_actor()
            list.append(actor)

        list.view(vbox)

        yield tichy.Wait(frame, 'back')
Beispiel #3
0
    def run(self, window):
        frame = self.view(window, back_button=True)

        vbox = gui.Box(frame, axis=1, expand=True)
        styles = [s.create() for s in tichy.Style.subclasses]

        styles_list = tichy.ActorList()
        for s in styles:
            actor = tichy.Actor(s)
            use_action = actor.new_action('Use')
            use_action.connect('activated', self.on_use_style)
            styles_list.append(actor)
        styles_list.view(vbox)

        yield tichy.Wait(frame, 'back')
Beispiel #4
0
    def run(self, window):
        frame = self.view(window, back_button=True)
        vbox = gui.Box(frame, axis=1, expand=True)

        # We create a list of the sub applications actors
        list = tichy.ActorList()
        for app in [
                ProfilesConf, StyleConf, PhoneConf, ScreenLockConf, SoundConf
        ]:
            actor = app.create_actor()
            list.append(actor)

        list.view(vbox, expand=True)

        # Wait until the quit button is clicked
        yield tichy.Wait(frame, 'back')
Beispiel #5
0
 def _populate(self, frame):
     if self.list_view:
         self.list_view.destroy()
     list = tichy.ActorList()
     categories = set()
     # View all the enabled applications in this category
     for app in tichy.Application.subclasses:
         if not app.name or not app.category:
             continue
         if app.category == self.category:
             actor = app.create_actor()
         elif self._is_sub_category(app.category) and \
                 not app.category in categories:
             actor = Category(app.category).create_actor()
             categories.add(app.category)
         else:
             continue
         list.append(actor)
     self.list_view = list.view(frame)
Beispiel #6
0
    def run(self, window):
        self.srvc = tichy.Service('ScreenLock')
        frame = self.view(window, back_button=True)

        vbox = gui.Box(frame, axis=1, expand=True)

        self.current_text = tichy.Text("Current : %s" % self.srvc.pattern)
        self.current_text.view(vbox)

        patterns_list = tichy.ActorList()
        # We get all the patterns services
        for pattern_name in self.srvc.patterns:
            pattern = SettingItem(pattern_name)
            actor = tichy.Actor(pattern)
            use_action = actor.new_action('Use')
            use_action.connect('activated', self.on_use_pattern)
            patterns_list.append(actor)

        patterns_list.view(vbox)

        yield tichy.Wait(frame, 'back')
Beispiel #7
0
    def run(self, window):
        frame = self.view(window, back_button=True)

        vbox = gui.Box(frame, axis=1, expand=True)

        self.prefs = tichy.Service('Prefs')

        self.current_text = tichy.Text("current : %s" % \
                                           self.prefs.get_profile())
        self.current_text.view(vbox)

        # We create the list of all the profiles
        profiles_list = tichy.ActorList()
        for profile in self.prefs.get_profiles():
            profile_item = ProfileItem(profile)
            actor = tichy.Actor(profile_item)
            set_action = actor.new_action('Use')
            set_action.connect('activated', self.on_set_profile)
            profiles_list.append(actor)

        profiles_list.view(vbox)

        yield tichy.Wait(frame, 'back')