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)
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
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
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
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())
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())
def __on_message_link(self): libbig.show_url(self.__message_link_url)
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()))
def __on_activate_web(self, canvas_item): self.emit("close", True) libbig.show_url(self.person.resource.user.homeUrl)
def __launch_browser(self): libbig.show_url(self.__acct.link)
def __on_browse_popular_apps(self): libbig.show_url(urlparse.urljoin(globals.get_baseurl(), "applications")) self.__hide_reset()
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()
def __on_more_link(self): libbig.show_url('http://calendar.google.com')