コード例 #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))
コード例 #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))
コード例 #3
0
 def is_valid(self):
     if self._url.startswith("ftp://"):
         return True
     else:
         return ShowUrlAction.is_valid(self)
コード例 #4
0
ファイル: wikipedia-suggest.py プロジェクト: johnsonc/swarm
 def __init__(self, title, lang):
     ShowUrlAction.__init__(self, title,
                            WIKIPEDIA_ARTICLE_URL + '?' + urllib.urlencode({'l': lang, 'q': title}))
コード例 #5
0
 def __init__(self, name, url):
     ShowUrlAction.__init__(self, name, url)
コード例 #6
0
 def __init__(self, name, email):
     ShowUrlAction.__init__(self, name, "mailto: \"%s\" <%s>" % (name, email))
     self._email = email
コード例 #7
0
 def get_name(self, text=None):
     return ShowUrlAction.get_name(self, text=None)
コード例 #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)
コード例 #9
0
ファイル: yahoo.py プロジェクト: benpicco/mate-deskbar-applet
 def __init__(self, term):
     url = self.BASE_URL % urllib.urlencode({'p': term})
     ShowUrlAction.__init__(self, term, url)
コード例 #10
0
 def get_name(self, text=None):
     return ShowUrlAction.get_name(self, text=None)
コード例 #11
0
 def __init__(self, name, url, item_type):
     ShowUrlAction.__init__(self, name, url)
     self._item_type = item_type
コード例 #12
0
 def __init__(self, name, identifier, publisher=None, snippet=None):
     ShowUrlAction.__init__(self, name, identifier)
コード例 #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()
コード例 #14
0
 def __init__(self, name, url, item_type):
     ShowUrlAction.__init__(self, name, url)
     self._item_type = item_type
コード例 #15
0
 def __init__(self, website, query, url):
     ShowUrlAction.__init__(self, website, url)
     self._query = query
コード例 #16
0
 def __init__(self, website, title, url):
     ShowUrlAction.__init__(self, website, url)
     self._title = title
コード例 #17
0
 def __init__(self, term):
     url = self.BASE_URL % urllib.urlencode({'q': term})
     ShowUrlAction.__init__(self, term, url)
コード例 #18
0
 def __init__(self, website, query, url):
     ShowUrlAction.__init__(self, website, url)
     self._query = query
コード例 #19
0
 def __init__(self, name, email):
     ShowUrlAction.__init__(self, name,
                            "mailto: \"%s\" <%s>" % (name, email))
     self._email = email
コード例 #20
0
 def is_valid(self):
     if self._url.startswith("ftp://"):
         return True
     else:
         return ShowUrlAction.is_valid(self)
コード例 #21
0
 def __init__(self, website, title, url):
     ShowUrlAction.__init__(self, website, url)
     self._title = title
コード例 #22
0
 def __init__(self, name, identifier, publisher=None, snippet=None):
     ShowUrlAction.__init__(self, name, identifier)
コード例 #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)
コード例 #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()
コード例 #25
0
ファイル: yahoo.py プロジェクト: benpicco/mate-deskbar-applet
 def __init__(self, name, url):
     ShowUrlAction.__init__(self, name, url)
コード例 #26
0
 def __init__(self, title, lang):
     ShowUrlAction.__init__(self, title,
                            WIKIPEDIA_ARTICLE_URL + '?' + urllib.urlencode({'l': lang, 'q': title}))