當前位置: 首頁>>代碼示例>>Python>>正文


Python InfoBarGenerics.InfoBarNotifications類代碼示例

本文整理匯總了Python中InfoBarGenerics.InfoBarNotifications的典型用法代碼示例。如果您正苦於以下問題:Python InfoBarNotifications類的具體用法?Python InfoBarNotifications怎麽用?Python InfoBarNotifications使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了InfoBarNotifications類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: checkNotifications

	def checkNotifications(self):
		InfoBarNotifications.checkNotifications(self)
		pending = Notifications.notificationQueue.getPending("JobMananger")
		if pending:
			print "[JobView] have pending JobMananger Notification(s):", pending
		elif self.settings.afterEvent.getValue() == "close" and self.job.status == self.job.FAILED:
			self.close(False)
開發者ID:st7TEAM,項目名稱:dreambox,代碼行數:7,代碼來源:TaskView.py

示例2: __init__

	def __init__(self, session, job, parent=None, cancelable = True, backgroundable = True, afterEventChangeable = True , afterEvent="nothing"):
		Screen.__init__(self, session, parent)
		Screen.setTitle(self, _("Job View"))
		InfoBarNotifications.__init__(self)
		ConfigListScreen.__init__(self, [])
		self.parent = parent
		self.job = job
		if afterEvent:
			self.job.afterEvent = afterEvent

		self["job_name"] = StaticText(job.name)
		self["job_progress"] = Progress()
		self["job_task"] = StaticText()
		self["summary_job_name"] = StaticText(job.name)
		self["summary_job_progress"] = Progress()
		self["summary_job_task"] = StaticText()
		self["job_status"] = StaticText()

		self.cancelable = cancelable
		self.backgroundable = backgroundable

		self["key_green"] = StaticText("")

		if self.cancelable:
			self["key_red"] = StaticText(_("Cancel"))
		else:
			self["key_red"] = StaticText("")

		if self.backgroundable:
			self["key_blue"] = StaticText(_("Background"))
		else:
			self["key_blue"] = StaticText("")

		self.onShow.append(self.windowShow)
		self.onHide.append(self.windowHide)

		self["setupActions"] = ActionMap(["ColorActions", "SetupActions"],
		{
			"green": self.ok,
			"red": self.abort,
			"blue": self.background,
			"cancel": self.abort,
			"ok": self.ok,
		}, -2)

		self.settings = ConfigSubsection()
		if SystemInfo["DeepstandbySupport"]:
			shutdownString = _("go to deep standby")
		else:
			shutdownString = _("shut down")
		self.settings.afterEvent = ConfigSelection(choices = [("nothing", _("do nothing")), ("close", _("Close")), ("standby", _("go to standby")), ("deepstandby", shutdownString)], default = self.job.afterEvent or "nothing")
		self.job.afterEvent = self.settings.afterEvent.value
		self.afterEventChangeable = afterEventChangeable
		self.setupList()
		self.state_changed()
開發者ID:OpenViX,項目名稱:enigma2,代碼行數:55,代碼來源:TaskView.py

示例3: __init__

    def __init__(self, session, job, parent=None, cancelable=True, backgroundable=True, afterEventChangeable=True):
        from Components.Sources.StaticText import StaticText
        from Components.Sources.Progress import Progress
        from Components.Sources.Boolean import Boolean
        from Components.ActionMap import ActionMap

        Screen.__init__(self, session, parent)
        InfoBarNotifications.__init__(self)
        ConfigListScreen.__init__(self, [])
        self.parent = parent
        self.job = job

        self["job_name"] = StaticText(job.name)
        self["job_progress"] = Progress()
        self["job_task"] = StaticText()
        self["summary_job_name"] = StaticText(job.name)
        self["summary_job_progress"] = Progress()
        self["summary_job_task"] = StaticText()
        self["job_status"] = StaticText()
        self["finished"] = Boolean()
        self["cancelable"] = Boolean(cancelable)
        self["backgroundable"] = Boolean(backgroundable)

        self["key_blue"] = StaticText(_("Background"))

        self.onShow.append(self.windowShow)
        self.onHide.append(self.windowHide)

        self["setupActions"] = ActionMap(
            ["ColorActions", "SetupActions"],
            {"green": self.ok, "red": self.abort, "blue": self.background, "cancel": self.ok, "ok": self.ok},
            -2,
        )

        self.settings = ConfigSubsection()
        if SystemInfo["DeepstandbySupport"]:
            shutdownString = _("go to deep standby")
        else:
            shutdownString = _("shut down")
        self.settings.afterEvent = ConfigSelection(
            choices=[
                ("nothing", _("do nothing")),
                ("close", _("Close")),
                ("standby", _("go to standby")),
                ("deepstandby", shutdownString),
            ],
            default=self.job.afterEvent or "nothing",
        )
        self.job.afterEvent = self.settings.afterEvent.getValue()
        self.afterEventChangeable = afterEventChangeable
        self.setupList()
        self.state_changed()
開發者ID:bally12345,項目名稱:enigma2,代碼行數:52,代碼來源:TaskView.py

示例4: __init__

 def __init__(self, session, job, parent = None, cancelable = True, backgroundable = True, afterEventChangeable = True, afterEvent = 'nothing'):
     from Components.Sources.StaticText import StaticText
     from Components.Sources.Progress import Progress
     from Components.Sources.Boolean import Boolean
     from Components.ActionMap import ActionMap
     Screen.__init__(self, session, parent)
     Screen.setTitle(self, _('Job View'))
     InfoBarNotifications.__init__(self)
     ConfigListScreen.__init__(self, [])
     self.parent = parent
     self.job = job
     if afterEvent:
         self.job.afterEvent = afterEvent
     self['job_name'] = StaticText(job.name)
     self['job_progress'] = Progress()
     self['job_task'] = StaticText()
     self['summary_job_name'] = StaticText(job.name)
     self['summary_job_progress'] = Progress()
     self['summary_job_task'] = StaticText()
     self['job_status'] = StaticText()
     self['finished'] = Boolean()
     self['cancelable'] = Boolean(cancelable)
     self['backgroundable'] = Boolean(backgroundable)
     self['key_blue'] = StaticText(_('Background'))
     self.onShow.append(self.windowShow)
     self.onHide.append(self.windowHide)
     self['setupActions'] = ActionMap(['ColorActions', 'SetupActions'], {'green': self.ok,
      'red': self.abort,
      'blue': self.background,
      'cancel': self.ok,
      'ok': self.ok}, -2)
     self.settings = ConfigSubsection()
     if SystemInfo['DeepstandbySupport']:
         shutdownString = _('go to deep standby')
     else:
         shutdownString = _('shut down')
     self.settings.afterEvent = ConfigSelection(choices=[('nothing', _('do nothing')),
      ('close', _('Close')),
      ('standby', _('go to standby')),
      ('deepstandby', shutdownString)], default=self.job.afterEvent or 'nothing')
     self.job.afterEvent = self.settings.afterEvent.value
     self.afterEventChangeable = afterEventChangeable
     self.setupList()
     self.state_changed()
開發者ID:kingvuplus,項目名稱:eg-e2,代碼行數:44,代碼來源:TaskView.py

示例5: checkNotifications

	def checkNotifications(self):
		InfoBarNotifications.checkNotifications(self)
		if Notifications.notifications == []:
			if self.settings.afterEvent.getValue() == "close" and self.job.status == self.job.FAILED:
				self.close(False)
開發者ID:Anubisko,項目名稱:enigma2,代碼行數:5,代碼來源:TaskView.py

示例6: checkNotifications

 def checkNotifications(self):
     InfoBarNotifications.checkNotifications(self)
     if not Notifications.notifications:
         if self.settings.afterEvent.value == 'close' and self.job.status == self.job.FAILED:
             self.close(False)
開發者ID:kingvuplus,項目名稱:eg-e2,代碼行數:5,代碼來源:TaskView.py


注:本文中的InfoBarGenerics.InfoBarNotifications類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。