Ejemplo n.º 1
0
 def __init__(self, name=None, absname=None, **args):
     deskbar.interfaces.Match.__init__(self,
                                       name=name,
                                       icon=absname,
                                       category="places",
                                       **args)
     self.absname = absname
     self.add_action(ShowUrlAction(name, absname))
     self.add_all_actions(get_actions_for_uri(absname))
Ejemplo n.º 2
0
    def __init__(self, name=None, url=None, has_method=True, **args):
        deskbar.interfaces.Match.__init__(self,
                                          name=name,
                                          icon="stock_internet",
                                          category="web",
                                          **args)
        self.url = url

        if not has_method and not self.url.startswith("http://"):
            self.url = "http://" + url

        if self.url.startswith("http"):
            self.add_action(ShowUrlAction(name, self.url))
        else:
            self.add_action(OpenWithCajaAction(name, self.url))
Ejemplo n.º 3
0
 def is_valid(self):
     if self._url.startswith("ftp://"):
         return True
     else:
         return ShowUrlAction.is_valid(self)
Ejemplo n.º 4
0
 def __init__(self, title, lang):
     ShowUrlAction.__init__(self, title,
                            WIKIPEDIA_ARTICLE_URL + '?' + urllib.urlencode({'l': lang, 'q': title}))
Ejemplo n.º 5
0
 def __init__(self, name, url):
     ShowUrlAction.__init__(self, name, url)
 def __init__(self, name, email):
     ShowUrlAction.__init__(self, name, "mailto: \"%s\" <%s>" % (name, email))
     self._email = email
Ejemplo n.º 7
0
 def get_name(self, text=None):
     return ShowUrlAction.get_name(self, text=None)
Ejemplo n.º 8
0
 def __init__(self, name, url, tags=None):
     """
     @param tags: Is ignored since 2.23.1,
     just there for backwards compatibility 
     """
     ShowUrlAction.__init__(self, name, url)
Ejemplo n.º 9
0
 def __init__(self, term):
     url = self.BASE_URL % urllib.urlencode({'p': term})
     ShowUrlAction.__init__(self, term, url)
Ejemplo n.º 10
0
 def get_name(self, text=None):
     return ShowUrlAction.get_name(self, text=None)
Ejemplo n.º 11
0
 def __init__(self, name, url, item_type):
     ShowUrlAction.__init__(self, name, url)
     self._item_type = item_type
Ejemplo n.º 12
0
 def __init__(self, name, identifier, publisher=None, snippet=None):
     ShowUrlAction.__init__(self, name, identifier)
Ejemplo n.º 13
0
 def __init__(self, name, uri, escaped_uri):
     ShowUrlAction.__init__(self, name, uri)
     self._display_uri = gio.File(uri=escaped_uri).get_parse_name()
Ejemplo n.º 14
0
 def __init__(self, name, url, item_type):
     ShowUrlAction.__init__(self, name, url)
     self._item_type = item_type
Ejemplo n.º 15
0
 def __init__(self, website, query, url):
     ShowUrlAction.__init__(self, website, url)
     self._query = query
Ejemplo n.º 16
0
 def __init__(self, website, title, url):
     ShowUrlAction.__init__(self, website, url)
     self._title = title
Ejemplo n.º 17
0
 def __init__(self, term):
     url = self.BASE_URL % urllib.urlencode({'q': term})
     ShowUrlAction.__init__(self, term, url)
Ejemplo n.º 18
0
 def __init__(self, website, query, url):
     ShowUrlAction.__init__(self, website, url)
     self._query = query
Ejemplo n.º 19
0
 def __init__(self, name, email):
     ShowUrlAction.__init__(self, name,
                            "mailto: \"%s\" <%s>" % (name, email))
     self._email = email
 def is_valid(self):
     if self._url.startswith("ftp://"):
         return True
     else:
         return ShowUrlAction.is_valid(self)
Ejemplo n.º 21
0
 def __init__(self, website, title, url):
     ShowUrlAction.__init__(self, website, url)
     self._title = title
Ejemplo n.º 22
0
 def __init__(self, name, identifier, publisher=None, snippet=None):
     ShowUrlAction.__init__(self, name, identifier)
Ejemplo n.º 23
0
 def __init__(self, name, url, tags=None):
     """
     @param tags: Is ignored since 2.23.1,
     just there for backwards compatibility 
     """
     ShowUrlAction.__init__(self, name, url)
Ejemplo n.º 24
0
 def __init__(self, name, uri, escaped_uri):
     ShowUrlAction.__init__(self, name, uri)
     self._display_uri = gio.File (uri=escaped_uri).get_parse_name()
Ejemplo n.º 25
0
 def __init__(self, name, url):
     ShowUrlAction.__init__(self, name, url)
Ejemplo n.º 26
0
 def __init__(self, title, lang):
     ShowUrlAction.__init__(self, title,
                            WIKIPEDIA_ARTICLE_URL + '?' + urllib.urlencode({'l': lang, 'q': title}))