Ejemplo n.º 1
0
 def __init__(self, name, url):
     """
     @param url: URL including protocol
     (e.g. file://, http://, ftp://)
     """
     OpenWithApplicationAction.__init__(self, name, "nautilus", [url])
     self._url = url
Ejemplo n.º 2
0
 def __init__(self, name, url):
     """
     @param url: URL including protocol
     (e.g. file://, http://, ftp://)
     """
     OpenWithApplicationAction.__init__(self, name, "caja", [url])
     self._url = url
Ejemplo n.º 3
0
 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
Ejemplo n.º 4
0
    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
Ejemplo n.º 5
0
 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
Ejemplo n.º 6
0
 def __init__(self, name, uri, snippet=None):
     OpenWithApplicationAction.__init__(self, name, "tomboy", ["--open-note", uri])
Ejemplo n.º 7
0
 def __init__(self, name, uri):
     OpenWithApplicationAction.__init__(self, name, "thunderbird",
                                            ["-viewbeagle", uri])
Ejemplo n.º 8
0
 def __init__(self, name, uri):
     OpenWithApplicationAction.__init__(self, name, "evolution", [uri])
Ejemplo n.º 9
0
 def __init__(self, name, program, args, verb):
     OpenWithApplicationAction.__init__(self, name, program, args)
     self._verb = verb
Ejemplo n.º 10
0
 def __init__(self, name, uri, snippet=None):
     OpenWithApplicationAction.__init__(self, name, "tomboy",
                                        ["--open-note", uri])
Ejemplo n.º 11
0
 def __init__(self, name, uri):
     OpenWithApplicationAction.__init__(self, name, "thunderbird",
                                        ["-viewbeagle", uri])
Ejemplo n.º 12
0
 def __init__(self, name, uri):
     OpenWithApplicationAction.__init__(self, name, "evolution", [uri])
Ejemplo n.º 13
0
 def __init__(self, name, email, uri):
     OpenWithApplicationAction.__init__(self, name, "evolution", [uri])
     self._email = email
     self._uri = uri
Ejemplo n.º 14
0
 def activate(self, text=None):
     self._arguments += [text]
     OpenWithApplicationAction.activate(self, text)
     # Restore old arguments
     del self._arguments[-1]
Ejemplo n.º 15
0
 def __init__(self, name, program, args, verb):
     OpenWithApplicationAction.__init__(self, name, program, args)
     self._verb = verb
Ejemplo n.º 16
0
 def activate(self, text=None):
     self._arguments = ["--client", self._client, "--highlight-search", text, self._uri]
     OpenWithApplicationAction.activate(self, text)
Ejemplo n.º 17
0
 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
Ejemplo n.º 18
0
 def activate(self, text=None):
     self._arguments = [
         "--client", self._client, "--highlight-search", text, self._uri
     ]
     OpenWithApplicationAction.activate(self, text)
Ejemplo n.º 19
0
 def activate(self, text=None):
     self._arguments += [text]
     OpenWithApplicationAction.activate(self, text)
     # Restore old arguments
     del self._arguments[-1]
Ejemplo n.º 20
0
        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