Beispiel #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))
Beispiel #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))
Beispiel #3
0
 def is_valid(self):
     if self._url.startswith("ftp://"):
         return True
     else:
         return ShowUrlAction.is_valid(self)
Beispiel #4
0
 def __init__(self, title, lang):
     ShowUrlAction.__init__(self, title,
                            WIKIPEDIA_ARTICLE_URL + '?' + urllib.urlencode({'l': lang, 'q': title}))
Beispiel #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
 def get_name(self, text=None):
     return ShowUrlAction.get_name(self, text=None)
 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)
Beispiel #9
0
 def __init__(self, term):
     url = self.BASE_URL % urllib.urlencode({'p': term})
     ShowUrlAction.__init__(self, term, url)
Beispiel #10
0
 def get_name(self, text=None):
     return ShowUrlAction.get_name(self, text=None)
 def __init__(self, name, url, item_type):
     ShowUrlAction.__init__(self, name, url)
     self._item_type = item_type
Beispiel #12
0
 def __init__(self, name, identifier, publisher=None, snippet=None):
     ShowUrlAction.__init__(self, name, identifier)
Beispiel #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()
Beispiel #14
0
 def __init__(self, name, url, item_type):
     ShowUrlAction.__init__(self, name, url)
     self._item_type = item_type
Beispiel #15
0
 def __init__(self, website, query, url):
     ShowUrlAction.__init__(self, website, url)
     self._query = query
Beispiel #16
0
 def __init__(self, website, title, url):
     ShowUrlAction.__init__(self, website, url)
     self._title = title
Beispiel #17
0
 def __init__(self, term):
     url = self.BASE_URL % urllib.urlencode({'q': term})
     ShowUrlAction.__init__(self, term, url)
 def __init__(self, website, query, url):
     ShowUrlAction.__init__(self, website, url)
     self._query = query
Beispiel #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)
 def __init__(self, website, title, url):
     ShowUrlAction.__init__(self, website, url)
     self._title = title
 def __init__(self, name, identifier, publisher=None, snippet=None):
     ShowUrlAction.__init__(self, name, identifier)
Beispiel #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)
 def __init__(self, name, uri, escaped_uri):
     ShowUrlAction.__init__(self, name, uri)
     self._display_uri = gio.File (uri=escaped_uri).get_parse_name()
Beispiel #25
0
 def __init__(self, name, url):
     ShowUrlAction.__init__(self, name, url)
Beispiel #26
0
 def __init__(self, title, lang):
     ShowUrlAction.__init__(self, title,
                            WIKIPEDIA_ARTICLE_URL + '?' + urllib.urlencode({'l': lang, 'q': title}))