Exemple #1
0
    def __init__(self,
                 session,
                 title="",
                 windowTitle=None,
                 useableChars=None,
                 overwrite=False,
                 firstpos_end=False,
                 allmarked=True,
                 **kwargs):
        InputBoxBase.__init__(
            self,
            session,
            title=title,
            windowTitle=windowTitle,
            useableChars=useableChars,
            maxSize=overwrite,
            currPos=firstpos_end and len(kwargs["text"].decode("utf-8")) or 0,
            allMarked=allmarked,
            **kwargs)

        # Add action in InputBoxBase on KEY_DOWN
        self["actions"].actions["down"] = self.keyTab
        self["seekbarActions"] = ActionMap(
            ["InfobarSeekActions"],
            {
                # Dummy actions for "seekBack" and "seekFwd"
                # They are already covered in InputBoxBase by actions
                # on "make", these actions are on "break"
                "seekBack": lambda: None,
                "seekFwd": lambda: None,
                # Toggle insert/overwrite action for remote
                "playpauseService": self.keyInsert,
            },
            -1)
Exemple #2
0
 def __init__(self, session):
     InputBox.__init__(self, session)
     self.numti = NumericalTextInput()
     self.configText = ConfigText("", False)
     self.configText.help_window = self.session.instantiateDialog(
         PopupInputHelpDialog, self.numti)
     self.setTitle(_("Search:"))
    def __init__(self,
                 session,
                 service="",
                 triesEntry=None,
                 pinList=[],
                 *args,
                 **kwargs):
        self.skin_path = mp_globals.pluginPath + mp_globals.skinsPath
        path = "%s/%s/MP_PinInput.xml" % (self.skin_path,
                                          mp_globals.currentskin)
        if not fileExists(path):
            path = self.skin_path + mp_globals.skinFallback + "/MP_PinInput.xml"
        with open(path, "r") as f:
            self.skin = f.read()
            f.close()

        InputBox.__init__(self,
                          session=session,
                          text="    ",
                          maxSize=True,
                          type=Input.PIN,
                          *args,
                          **kwargs)
        PinInput.__init__(self,
                          session=session,
                          service=service,
                          triesEntry=triesEntry,
                          pinList=pinList,
                          *args,
                          **kwargs)
        self["title"] = Label(kwargs.get('windowTitle', ''))

        self.onShow.append(self.__onShow)
Exemple #4
0
 def __init__(self,
              session,
              icon={},
              size=None,
              title="",
              windowTitle=_("Input"),
              useableChars=None,
              **kwargs):
     self.session = session
     InputBox.__init__(self, session, title, windowTitle, useableChars,
                       **kwargs)
     width = 300
     height = 260
     if None != size:
         width = size[0]
         height = size[1]
     if 'size' not in icon:
         icon['size'] = [width - 10, height - 70]
     skin = """
         <screen name="IPTVInputBoxWidget" position="center,center" title="Input" size="%d,%d">
         <widget name="text" position="center,10" size="%d,30" font="Regular;24" valign="center" halign="center" />
         <widget name="input" position="center,60" size="%d,50" font="Regular;40" valign="center" halign="center" />
         <widget name="cover" zPosition="4" position="center,%d" size="%d,%d" transparent="1" alphatest="on" />
         </screen>""" % (width, height, width - 20, width - 20, 85 +
                         (height - 85 - icon['size'][1]) / 2,
                         icon['size'][0], icon['size'][1])
     self.skin = skin
     self.icon = icon
     self["cover"] = Cover2()
     self.onShown.append(self.setIcon)
 def __init__(self, session, icon={}, size=None, title = "", windowTitle = _("Input"), useableChars = None, **kwargs):
     self.session = session
     InputBox.__init__(self, session, title, windowTitle, useableChars, **kwargs)
     width  = 300
     height = 260
     if None != size:
         width  = size[0]
         height = size[1]
     if 'size' not in icon:
         icon['size'] = [width - 10, height - 70]
     skin = """
         <screen name="IPTVInputBoxWidget" position="center,center" title="Input" size="%d,%d">
         <widget name="text" position="center,10" size="%d,30" font="Regular;24" valign="center" halign="center" />
         <widget name="input" position="center,60" size="%d,50" font="Regular;40" valign="center" halign="center" />
         <widget name="cover" zPosition="4" position="center,%d" size="%d,%d" transparent="1" alphatest="on" />
         </screen>""" % ( width,      height,
                          width - 20,
                          width - 20,
                          85 + (height - 85 - icon['size'][1]) / 2,
                          icon['size'][0],
                          icon['size'][1] )
     self.skin = skin
     self.icon = icon
     self["cover"] = Cover2()
     self.onShown.append(self.setIcon)
Exemple #6
0
 def __init__(self,
              session,
              title="",
              windowTitle=_("Input"),
              useableChars=None,
              **kwargs):
     InputBox.__init__(self, session, title, windowTitle, useableChars,
                       **kwargs)
Exemple #7
0
    def __init__(self, session):
        self.session = session
        screen_size_w = int(getDesktop(0).size().width() * 0.9)
        screen_size_h = int(getDesktop(0).size().height() * 0.9)
        screen_pos_w = int((getDesktop(0).size().width() - screen_size_w) / 2)
        screen_pos_h = int((getDesktop(0).size().height() - screen_size_h) / 2)

        label_height = 30
        offset = 5

        list_h = int(screen_size_h - (label_height * 3) - (offset * 5))
        list_w = int((screen_size_w / 2) - offset)
        list_pos_x = offset
        list_pos_y = int((offset * 3) + (label_height * 2))

        font = "Regular;21"
        skindict = {

                'font': font,

                'screen.size': "%i,%i" % (screen_size_w, screen_size_h),
                'screen.position': "%i,%i" % (screen_pos_w, screen_pos_h),

                'text.position': "%i,%i" % (offset, offset),
                'text.size': "%i,%i" % (list_w - offset, label_height),

                'input.position': "%i,%i" % (offset, (offset * 2) + label_height),
                'input.size': "%i,%i" % (list_w - offset, label_height),

                'list.position': "%i,%i" % (list_pos_x, list_pos_y),
                'list.size': "%i,%i" % (list_w - offset, list_h),

                "infotext.position": "%i,%i" % (offset, list_pos_y + list_h + offset),
                "infotext.size": "%i,%i" % (int(screen_size_w - (offset * 2)), label_height),

                'preview.position': "%i,%i" % (offset + list_w, offset),
                'preview.size': "%i,%i" % (list_w - offset, screen_size_h - (offset * 3) - label_height),

                }

        self.skin = applySkinVars(GoogleMapsGeoSearchScreen.raw_skin, skindict)

        self["list"] = MenuList([])
        self["list"].onSelectionChanged.append(self.onListSelectionChanged)
        self["preview"] = WebPixmap(default=plugin_path + not_found_pic)
        self["previewo"] = WebPixmap(default=plugin_path + not_found_pic_overlay)
        self["infotext"] = Label("")

        InputBox.__init__(self, session, title="Please enter a City or Locationname:", windowTitle=_("GoogleMaps Search"), text=config.plugins.GoogleMaps.last_searchkey.value)
        self.onLayoutFinish.append(self.onLayoutFinished)

        self.do_preview_timer = eTimer()
        self.do_search_timer = eTimer()
Exemple #8
0
    def __init__(self,session):
        self.session = session
        screen_size_w = int(getDesktop(0).size().width()*0.9)
        screen_size_h = int(getDesktop(0).size().height()*0.9)
        screen_pos_w = int((getDesktop(0).size().width()-screen_size_w)/2)
        screen_pos_h = int((getDesktop(0).size().height()-screen_size_h)/2)

        label_height = 30
        offset = 5

        list_h = int(screen_size_h-(label_height*3)-(offset*5))
        list_w = int((screen_size_w/2)-offset)
        list_pos_x = offset
        list_pos_y = int((offset*3)+(label_height*2))

        font = "Regular;21"
        skindict = {

                'font': font,

                'screen.size': "%i,%i"%(screen_size_w,screen_size_h),
                'screen.position': "%i,%i"%(screen_pos_w,screen_pos_h),

                'text.position': "%i,%i"%(offset,offset),
                'text.size': "%i,%i"%(list_w-offset,label_height),

                'input.position': "%i,%i"%(offset,(offset*2)+label_height),
                'input.size': "%i,%i"%(list_w-offset,label_height),

                'list.position': "%i,%i"%(list_pos_x,list_pos_y),
                'list.size': "%i,%i"%(list_w-offset,list_h),

                "infotext.position": "%i,%i"%(offset,list_pos_y+list_h+offset),
                "infotext.size": "%i,%i"%(int(screen_size_w-(offset*2)),label_height),

                'preview.position': "%i,%i"%(offset+list_w,offset),
                'preview.size': "%i,%i"%(list_w-offset,screen_size_h-(offset*3)-label_height),

                }

        self.skin = applySkinVars(GoogleMapsGeoSearchScreen.raw_skin,skindict)

        self["list"] = MenuList([])
        self["list"].onSelectionChanged.append(self.onListSelectionChanged)
        self["preview"] = WebPixmap(default=plugin_path+not_found_pic)
        self["previewo"] = WebPixmap(default=plugin_path+not_found_pic_overlay)
        self["infotext"] = Label("")

        InputBox.__init__(self,session, title = "Please enter a City or Locationname:", windowTitle = _("GoogleMaps Search"),text=config.plugins.GoogleMaps.last_searchkey.value)
        self.onLayoutFinish.append(self.onLayoutFinished)

        self.do_preview_timer = eTimer()
        self.do_search_timer = eTimer()
Exemple #9
0
    def __init__(self, session, *args, **kwargs):
        Screen.__init__(self, session)
        InputBox.__init__(self, session, **kwargs)
        DPH_ScreenHelper.__init__(self)
        self.entryData = args

        self.initScreen("input_box")

        printl("entryData: " + str(self.entryData), self, "D")

        self.setTitle(_("Search ..."))

        self.onLayoutFinish.append(self.finishLayout)
	def __init__(self, session, *args, **kwargs):
		Screen.__init__(self, session)
		InputBox.__init__(self, session, **kwargs)
		DPH_ScreenHelper.__init__(self)
		self.entryData = args

		self.setMenuType("input_box")

		printl("entryData: " + str(self.entryData), self, "D")

		self.setTitle(_("Search ..."))

		self.onLayoutFinish.append(self.finishLayout)
	def __init__(self, session, service = "", triesEntry = None, pinList = [], *args, **kwargs):
		self.plugin_path = mp_globals.pluginPath
		self.skin_path = mp_globals.pluginPath + mp_globals.skinsPath
		path = "%s/%s/PinInput.xml" % (self.skin_path, config.mediaportal.skin.value)
		if not fileExists(path):
			path = self.skin_path + mp_globals.skinFallback + "/PinInput.xml"
		with open(path, "r") as f:
			self.skin = f.read()
			f.close()

		InputBox.__init__(self, session = session, text="    ", maxSize=True, type=Input.PIN, *args, **kwargs)
		PinInput.__init__(self, session = session, service = service, triesEntry = triesEntry, pinList = pinList, *args, **kwargs)
		self["title"] = Label(kwargs.get('windowTitle', ''))

		self.onShow.append(self.__onShow)
Exemple #12
0
	def __init__(self, session, title = "", windowTitle = _("Input"), useableChars = None, **kwargs):
		InputBox.__init__(self, session, title, windowTitle, useableChars, **kwargs)
 def __init__(self, session, windowTitle, description, service, triesEntry = None, pinList = [0, 0, 0, 0], *args, **kwargs):
     InputBox.__init__(self, session = session, windowTitle = windowTitle, maxSize=True, type=Input.PIN, *args, **kwargs)
     PinInput.__init__(self, session = session, service = service, triesEntry = triesEntry, pinList = pinList, *args, **kwargs)
     self.onShown.append(boundFunction(self.setTitle, windowTitle))
     self["description"] = Label(description)
 def __init__(self, session):
     InputBox.__init__(self, session)
     self.numti = NumericalTextInput()
     self.configText = ConfigText("", False)
     self.configText.help_window = self.session.instantiateDialog(PopupInputHelpDialog, self.numti)
     self.setTitle(_("Search:"))