Пример #1
0
	def __init__(self, session, url=None, app_info=None):
		vbcfg.g_position = vbcfg.getPosition()
		fbClass.getInstance().lock()
		eRCInput.getInstance().lock()

		Screen.__init__(self, session)

		self._url = url
		self._info = app_info

		self.onLayoutFinish.append(self.start_hbbtv_application)

		self._close_timer = eTimer()
		self._close_timer.callback.append(self.stop_hbbtv_application)

		try:
			if self._cb_set_title not in vbcfg.g_main.vbhandler.onSetTitleCB:
				vbcfg.g_main.vbhandler.onSetTitleCB.append(self._cb_set_title)
		except Exception:
			pass

		try:
			if self._cb_close_window not in vbcfg.g_main.vbhandler.onCloseCB:
				vbcfg.g_main.vbhandler.onCloseCB.append(self._cb_close_window)
		except Exception:
			pass
Пример #2
0
    def __init__(self, session):
        w, h = session.desktop.size().width(), session.desktop.size().height()
        cw, ch = w / 2, h / 2
        #                             btn_red        btn_green     lb_red         lb_green      config
        self.skin = self.skin % (w, h, cw - 190, ch - 110, cw + 50, ch - 110,
                                 cw - 190, ch - 110, cw + 50, ch - 110,
                                 cw - 250, ch - 50)

        Screen.__init__(self, session)
        self.session = session
        self["shortcuts"] = ActionMap(
            ["ShortcutActions", "SetupActions"], {
                "ok": self.keyOk,
                "cancel": self.keyCancel,
                "red": self.keyCancel,
                "green": self.keyOk,
            }, -2)
        self.list = []
        ConfigListScreen.__init__(self, self.list, session=self.session)

        self["key_red"] = StaticText(_("Cancel"))
        self["key_green"] = StaticText(_("Save"))
        self["current"] = StaticText(_(" "))
        vbcfg.g_position = vbcfg.getPosition()
        self.createSetup()
    def __init__(self, session, url=None, app_info=None):
        from enigma import getDesktop
        self.width = getDesktop(0).size().width()
        self.height = getDesktop(0).size().height()

        if (self.width > 1920):
            self.width = 1920
        elif (self.width < 720):
            self.width = 720

        if (self.height > 1080):
            self.height = 1080
        elif (self.height < 576):
            self.height = 576

        vbcfg.g_vmpegposition = vbcfg.getvmpegPosition()
        vbcfg.g_position = vbcfg.getPosition()
        vbcfg.osd_lock()

        Screen.__init__(self, session)

        self._url = url
        self._info = app_info

        if getMachineBuild() in ('dags7252'):
            self.servicelist = self.session.instantiateDialog(ChannelSelection)

        self.onLayoutFinish.append(self.start_hbbtv_application)

        self._close_timer = eTimer()
        self._close_timer.callback.append(self.stop_hbbtv_application)

        try:
            if self._cb_set_title not in vbcfg.g_main.vbhandler.onSetTitleCB:
                vbcfg.g_main.vbhandler.onSetTitleCB.append(self._cb_set_title)
        except Exception:
            pass

        try:
            if self._cb_close_window not in vbcfg.g_main.vbhandler.onCloseCB:
                vbcfg.g_main.vbhandler.onCloseCB.append(self._cb_close_window)
        except Exception:
            pass
Пример #4
0
	def __init__(self, session):
		w,h   = session.desktop.size().width(), session.desktop.size().height()
		cw,ch = w/2, h/2
		#                             btn_red        btn_green     lb_red         lb_green      config
		self.skin = self.skin % (w,h, cw-190,ch-110, cw+50,ch-110, cw-190,ch-110, cw+50,ch-110, cw-250,ch-50)

		Screen.__init__(self,session)
		self.session = session
		self["shortcuts"] = ActionMap(["ShortcutActions", "SetupActions" ],
		{
			"ok": self.keyOk,
			"cancel": self.keyCancel,
			"red": self.keyCancel,
			"green": self.keyOk,
		}, -2)
		self.list = []
		ConfigListScreen.__init__(self, self.list, session = self.session)

		self["key_red"] = StaticText(_("Cancel"))
		self["key_green"] = StaticText(_("Save"))
		self["current"] = StaticText(_(" "))
		vbcfg.g_position = vbcfg.getPosition()
		self.createSetup()
Пример #5
0
	def _cb_start_browser(self, data=None, mode=0, opcode='BROWSER_OPENURL'):
		if not vbcfg.g_main.check_browser():
			if self.m_url is not None:
				if vbcfg.g_service:
					self.session.nav.playService(vbcfg.g_service)
			return
		vbcfg.LOG("open url: %s %d" % (data, mode))
		if strIsEmpty(data):
			return

		try:
			if self._cb_set_title not in vbcfg.g_main.vbhandler.onSetTitleCB:
				vbcfg.g_main.vbhandler.onSetTitleCB.append(self._cb_set_title)
		except Exception:
			pass

		try:
			if self._cb_close_window not in vbcfg.g_main.vbhandler.onCloseCB:
				vbcfg.g_main.vbhandler.onCloseCB.append(self._cb_close_window)
		except Exception:
			pass

		vbcfg.g_position = vbcfg.getPosition()
		fbClass.getInstance().lock()
		eRCInput.getInstance().lock()

		self.toggle_top()
		ret = VBController.command(opcode, data)
		self._current_url = data
		if ret:
			self.is_browser_opened = True
		else:
			self.is_browser_opened = False
			vbcfg.ERR("Failed to open url: %s" % data)

		vbcfg.g_main.vbhandler.soft_volume = -1