示例#1
0
    def __icon_clicked_cb(self, cell, path):
        row = self.get_model()[path]

        registry = bundleregistry.get_registry()
        bundle = registry.get_bundle(row[ListModel.COLUMN_BUNDLE_ID])

        misc.launch(bundle)
示例#2
0
 def __get_last_activity_reply_handler_cb(self, entries, total_count):
     registry = bundleregistry.get_registry()
     if entries:
         misc.resume(entries[0], entries[0]['activity'])
     else:
         bundle = registry.get_bundle(self._activity_selected)
         misc.launch(bundle)
示例#3
0
    def _start_activity(self, path):
        row = self.get_model()[path]

        registry = bundleregistry.get_registry()
        bundle = registry.get_bundle(row[ListModel.COLUMN_BUNDLE_ID])

        misc.launch(bundle)
示例#4
0
    def __icon_clicked_cb(self, cell, path):
        row = self.get_model()[path]

        registry = bundleregistry.get_registry()
        bundle = registry.get_bundle(row[ListModel.COLUMN_BUNDLE_ID])

        misc.launch(bundle)
示例#5
0
    def _start_activity(self, path):
        row = self.get_model()[path]

        registry = bundleregistry.get_registry()
        bundle = registry.get_bundle(row[ListModel.COLUMN_BUNDLE_ID])

        misc.launch(bundle)
示例#6
0
    def _start_activity(self, path):
        model = self.get_model()
        row = model[path]

        registry = bundleregistry.get_registry()
        bundle = registry.get_bundle(row[self._model.column_bundle_id])

        misc.launch(bundle)
示例#7
0
    def _activate(self):
        if self.palette is not None:
            self.palette.popdown(immediate=True)

        if self._resume_mode and self._journal_entries:
            self._resume(self._journal_entries[0])
        else:
            misc.launch(self._activity_info)
示例#8
0
    def _activate(self):
        if self.palette is not None:
            self.palette.popdown(immediate=True)

        if self._resume_mode and self._journal_entries:
            self._resume(self._journal_entries[0])
        else:
            misc.launch(self._activity_info)
示例#9
0
    def join(self):
        logging.error("PrivateInvite.join handler %r", self._handler)
        registry = bundleregistry.get_registry()
        bundle_id = self.get_bundle_id()
        bundle = registry.get_bundle(bundle_id)

        bus = dbus.SessionBus()
        bus.add_signal_receiver(
            self._name_owner_changed_cb, "NameOwnerChanged", "org.freedesktop.DBus", arg0=self._handler
        )
        misc.launch(bundle, color=self.get_color(), invited=True, uri=self._private_channel)
示例#10
0
    def join(self):
        logging.error('PrivateInvite.join handler %r', self._handler)
        registry = bundleregistry.get_registry()
        bundle_id = self.get_bundle_id()
        bundle = registry.get_bundle(bundle_id)

        bus = dbus.SessionBus()
        bus.add_signal_receiver(self._name_owner_changed_cb,
                                'NameOwnerChanged',
                                'org.freedesktop.DBus',
                                arg0=self._handler)
        misc.launch(bundle, color=self.get_color(), invited=True,
                    uri=self._private_channel)
示例#11
0
    def run_activity(self, bundle_id, resume_mode):
        if not resume_mode:
            registry = bundleregistry.get_registry()
            bundle = registry.get_bundle(bundle_id)
            misc.launch(bundle)
            return

        self._activity_selected = bundle_id
        query = {'activity': bundle_id}
        properties = ['uid', 'title', 'icon-color', 'activity', 'activity_id',
                      'mime_type', 'mountpoint']
        datastore.find(query, sorting=['+timestamp'],
                       limit=1, properties=properties,
                       reply_handler=self.__get_last_activity_reply_handler_cb,
                       error_handler=self.__get_last_activity_error_handler_cb)
示例#12
0
    def join(self):
        logging.error("ActivityInvite.join handler %r", self._handler)

        registry = bundleregistry.get_registry()
        bundle_id = self.get_bundle_id()
        bundle = registry.get_bundle(bundle_id)
        if bundle is None:
            self._call_handle_with()
            return

        bus = dbus.SessionBus()
        bus.add_signal_receiver(
            self._name_owner_changed_cb, "NameOwnerChanged", "org.freedesktop.DBus", arg0=self._handler
        )

        model = neighborhood.get_model()
        activity_id = model.get_activity_by_room(self._handle).activity_id
        misc.launch(bundle, color=self.get_color(), invited=True, activity_id=activity_id)
示例#13
0
    def join(self):
        logging.debug('ActivityInvite.join handler %r', self._handler)

        registry = bundleregistry.get_registry()
        bundle_id = self.get_bundle_id()
        bundle = registry.get_bundle(bundle_id)
        if bundle is None:
            self._call_handle_with()
            return

        bus = dbus.SessionBus()
        bus.add_signal_receiver(self._name_owner_changed_cb,
                                'NameOwnerChanged',
                                'org.freedesktop.DBus',
                                arg0=self._handler)

        model = neighborhood.get_model()
        activity_id = model.get_activity_by_room(self._handle).activity_id
        misc.launch(bundle, color=self.get_color(), invited=True,
                    activity_id=activity_id)
示例#14
0
 def __start_activate_cb(self, menu_item):
     misc.launch(self._activity_info)
示例#15
0
 def __start_activate_cb(self, menu_item):
     self.popdown(immediate=True)
     misc.launch(self._activity_info)
示例#16
0
 def __palette_item_clicked_cb(self, item):
     bundle = self._model.get_bundle()
     misc.launch(bundle, activity_id=self._model.activity_id,
                 color=self._model.get_color())
示例#17
0
 def __start_activate_cb(self, menu_item):
     self.popdown(immediate=True)
     misc.launch(self._activity_info)
示例#18
0
 def _start_activity(self, text, pattern, name):
     logging.warning('Voice command: %s' % text)
     registry = bundleregistry.get_registry()
     activity_info = registry.get_bundle(_NAME_TO_ID.get(_(name)))
     misc.launch(activity_info)