Esempio n. 1
0
 def __on_more_popular(self, w):
     subquery = (self.__search and ("?q=" + urllib.quote(self.__search))) \
                 or self.__catname and ("?category=" + urllib.quote(self.__catname)) \
                 or ''
     libbig.show_url(urlparse.urljoin(globals.get_baseurl(),
                                      "applications%s" % (subquery,)))
     # more-info with None just means hide window
     self.emit("more-info", None)
Esempio n. 2
0
    def __on_action(self, *args):
        notification_id = args[0]
        action = args[1]

        if action == 'mail':
            if self.__latest_mail:
                libbig.show_url(self.__latest_mail.get_link())
        elif action == 'inbox-no-icon' or action == 'default':
            libbig.show_url("http://mail.google.com/mail")
        else:
            print "unknown action " + action
Esempio n. 3
0
 def _on_activated(self):
     """Action when user has activated the result"""
     if self.__person.is_contact:
         try:
             user = self.__person.resource.user
         except AttributeError:
             user = None
         if user:
             libbig.show_url(user.homeUrl)
     else:
         ### FIXME - what should we do here? open an IM conversation?
         ### or scroll to and pop out the user in the people stock?
         pass
Esempio n. 4
0
    def __on_action(self, *args):
        notification_id = args[0]
        action = args[1]

        if notification_id != self.__notify_id:
            return

        if action == 'mail':
            if self.__latest_mail:
                libbig.show_url(self.__latest_mail.get_link())
        elif action == 'inbox-no-icon':
            libbig.show_url(self.__google.get_mail_base_url())
        elif action == 'default':
            # 'dafault' corresponds to the notification being clicked in any place,
            # and we use to go to the site in that case; now clicking on the notification
            # just closes it    
            pass
        else:
            print "unknown action " + action
Esempio n. 5
0
 def __visit_person(self):
     self._logger.debug("visiting person for %s", self.__current_image)
     if not self.__current_image:
         return
     libbig.show_url(mugshot.get_mugshot().get_baseurl() + self.__current_image[0].get_home_url())    
Esempio n. 6
0
 def __visit_photo(self):
     self._logger.debug("visiting photo for %s", self.__current_image)
     if not self.__current_image:
         return
     libbig.show_url(self.__current_image[2].get_href())
Esempio n. 7
0
 def __on_message_link(self):
     libbig.show_url(self.__message_link_url)
Esempio n. 8
0
 def __visit_person(self):
     _logger.debug("visiting person for %s", self.__current_image)
     if not self.__current_image:
         return
     libbig.show_url(urlparse.urljoin(globals.get_baseurl(), self.__current_image[0].get_home_url()))
Esempio n. 9
0
 def __on_activate_web(self, canvas_item):
     self.emit("close", True)
     libbig.show_url(self.person.resource.user.homeUrl)
Esempio n. 10
0
 def __launch_browser(self):
     libbig.show_url(self.__acct.link)
Esempio n. 11
0
 def __on_browse_popular_apps(self):
     libbig.show_url(urlparse.urljoin(globals.get_baseurl(), "applications"))
     self.__hide_reset()
Esempio n. 12
0
 def __on_show_more_info(self, app):
     if app:
         _logger.debug("showing app: %s", app)
         libbig.show_url(urlparse.urljoin(globals.get_baseurl(), "application?id=" + app.get_id()))
     self.__hide_reset()
Esempio n. 13
0
 def __on_more_link(self):
     libbig.show_url('http://calendar.google.com')