def notify (self, retcode, **kwargs): if retcode is None: helper.warning("NOTIFY :: %s", _("Notify called while process is still running!")) else: icon = APP_ICON if retcode == 0: text = _("Emerge finished!") descr = "" urgency = pynotify.URGENCY_NORMAL else: text = _("Emerge failed!") descr = _("Error Code: %d") % retcode urgency = pynotify.URGENCY_CRITICAL get_listener().send_notify(base = text, descr = descr, icon = icon, urgency = urgency)
def notify(self, retcode, **kwargs): if retcode is None: helper.warning("NOTIFY :: %s", _("Notify called while process is still running!")) else: icon = APP_ICON if retcode == 0: text = _("Emerge finished!") descr = "" urgency = pynotify.URGENCY_NORMAL else: text = _("Emerge failed!") descr = _("Error Code: %d") % retcode urgency = pynotify.URGENCY_CRITICAL get_listener().send_notify(base=text, descr=descr, icon=icon, urgency=urgency)
def callback(): get_listener().send_notify( base = "New Portato Live Version Found", descr = "The most recent revision is %s." % rev, icon = APP_ICON) return False
def callback(): get_listener().send_notify( base="New Portato Live Version Found", descr="The most recent revision is %s." % rev, icon=APP_ICON) return False