def __stop_response_cb(self, alert, response_id):
     if response_id == Gtk.ResponseType.APPLY:
         logging.debug('Start application with downloaded object')
         launch_bundle(object_id=self._object_id)
     if response_id == Gtk.ResponseType.ACCEPT:
         activity.show_object_in_journal(self._object_id)
     self._activity.remove_alert(alert)
 def __stop_response_cb(self, alert, response_id):
     if response_id == Gtk.ResponseType.APPLY:
         logging.debug('Start application with downloaded object')
         launch_bundle(object_id=self._object_id)
     if response_id == Gtk.ResponseType.ACCEPT:
         activity.show_object_in_journal(self._object_id)
     self._activity.remove_alert(alert)
Ejemplo n.º 3
0
    def _item_select_cb(self, selection):
        model, row = selection.get_selected()

        if row is not None:
            metadata = model[row][5]
            bundle_id = metadata.get('activity', '')
            launch_bundle(bundle_id, model[row][4])
Ejemplo n.º 4
0
 def create_journal_entry(self, path, URL):
     fd = open(path, "w+")
     fd.write(URL)
     fd.close()
     journal_entry = datastore.create()
     journal_entry.metadata['title'] = 'Browse Activity'
     journal_entry.metadata['title_set_by_user'] = '******'
     journal_entry.metadata['keep'] = '0'
     journal_entry.metadata['mime_type'] = 'text/uri-list'
     journal_entry.metadata['icon-color'] = profile.get_color().to_string()
     journal_entry.metadata[
         'description'] = "Opening {} from the Terminal".format(URL)
     journal_entry.file_path = path
     datastore.write(journal_entry)
     self._object_id = journal_entry.object_id
     launch_bundle(object_id=self._object_id)
Ejemplo n.º 5
0
 def __stop_response_cb(self, alert, response_id):
     if response_id == Gtk.ResponseType.APPLY:
         launch_bundle(object_id=self._object_id)
     if response_id == Gtk.ResponseType.ACCEPT:
         activity.show_object_in_journal(self._object_id)
     self._activity.remove_alert(alert)
 def __stop_response_cb(self, alert, response_id):
     if response_id is Gtk.ResponseType.APPLY:
         activity.show_object_in_journal(self._object_id)
     elif response_id is Gtk.ResponseType.ACCEPT:
         launch_bundle(object_id=self._object_id)
     self.remove_alert(alert)
Ejemplo n.º 7
0
 def __alert_response_cb(self, alert, response_id, object_id):
     if response_id is Gtk.ResponseType.ACCEPT:
         launch_bundle(object_id=object_id)
     if response_id is Gtk.ResponseType.APPLY:
         activity.show_object_in_journal(object_id)
     self.remove_alert(alert)
Ejemplo n.º 8
0
 def __launch_clicked_cb(self, button):
     launch_bundle(bundle_id='org.laptop.WebActivity',
                   object_id=self._jobject.object_id)
     self._try_again.show()