def __init__(self, name, url): """ @param url: URL including protocol (e.g. file://, http://, ftp://) """ OpenWithApplicationAction.__init__(self, name, "nautilus", [url]) self._url = url
def __init__(self, name, url): """ @param url: URL including protocol (e.g. file://, http://, ftp://) """ OpenWithApplicationAction.__init__(self, name, "caja", [url]) self._url = url
def __init__(self, name, term, verb, hit_type=None): """ @param hit_type: Beagle hit type to search for """ beagle_args = [term] if hit_type != None: beagle_args.append(hit_type) OpenWithApplicationAction.__init__(self, name, "beagle-search", beagle_args) self._verb = verb
def __init__(self, name, term, verb, hit_type=None): """ @param hit_type: Beagle hit type to search for """ beagle_args = [term] if hit_type != None: beagle_args.append(hit_type) OpenWithApplicationAction.__init__(self, name, "beagle-search", beagle_args) self._verb = verb
def __init__(self, name, uri, client, snippet=None): OpenWithApplicationAction.__init__(self, name, "beagle-imlogviewer", []) self._uri = gio.File(uri=uri).get_path () self._client = client
def __init__(self, name, uri, snippet=None): OpenWithApplicationAction.__init__(self, name, "tomboy", ["--open-note", uri])
def __init__(self, name, uri): OpenWithApplicationAction.__init__(self, name, "thunderbird", ["-viewbeagle", uri])
def __init__(self, name, uri): OpenWithApplicationAction.__init__(self, name, "evolution", [uri])
def __init__(self, name, program, args, verb): OpenWithApplicationAction.__init__(self, name, program, args) self._verb = verb
def __init__(self, name, uri, snippet=None): OpenWithApplicationAction.__init__(self, name, "tomboy", ["--open-note", uri])
def __init__(self, name, uri): OpenWithApplicationAction.__init__(self, name, "thunderbird", ["-viewbeagle", uri])
def __init__(self, name, uri): OpenWithApplicationAction.__init__(self, name, "evolution", [uri])
def __init__(self, name, email, uri): OpenWithApplicationAction.__init__(self, name, "evolution", [uri]) self._email = email self._uri = uri
def activate(self, text=None): self._arguments += [text] OpenWithApplicationAction.activate(self, text) # Restore old arguments del self._arguments[-1]
def __init__(self, name, program, args, verb): OpenWithApplicationAction.__init__(self, name, program, args) self._verb = verb
def activate(self, text=None): self._arguments = ["--client", self._client, "--highlight-search", text, self._uri] OpenWithApplicationAction.activate(self, text)
def __init__(self, name, uri, client, snippet=None): OpenWithApplicationAction.__init__(self, name, "beagle-imlogviewer", []) self._uri = gio.File(uri=uri).get_path() self._client = client
def activate(self, text=None): self._arguments = [ "--client", self._client, "--highlight-search", text, self._uri ] OpenWithApplicationAction.activate(self, text)
def activate(self, text=None): self._arguments += [text] OpenWithApplicationAction.activate(self, text) # Restore old arguments del self._arguments[-1]
return [] actions = [] default_appinfo = gio.app_info_get_default_for_type( fileinfo.get_content_type(), True) for appinfo in gio.app_info_get_all_for_type(fileinfo.get_content_type()): if default_appinfo == None \ or appinfo.get_executable() != default_appinfo.get_executable(): cmd = appinfo.get_executable() args = [gfile.get_path()] cmd_args = cmd.split(" ") if len(cmd_args) > 0: cmd = cmd_args[0] args = cmd_args[1:] + args actions.append( OpenWithApplicationAction( display_name, cmd, args, display_program_name=appinfo.get_name())) actions.append(GoToLocationAction(display_name, gfile.get_uri())) actions.append(SendFileViaEmailAction(display_name, gfile.get_uri())) actions.append( CopyToClipboardAction(_("URL of %s") % display_name, gfile.get_path())) return actions