Exemple #1
0
    def __init__(self):
        printl("", self, "S")

        NumericalTextInput.__init__(self)

        self["number_key_popup"] = Label()
        self["number_key_popup"].hide()

        self["filterActions"] = HelpableActionMap(
            self, "DP_FilterMenuActions", {
                "1": (self.onKey1, ""),
                "2": (self.onKey2, ""),
                "3": (self.onKey3, ""),
                "4": (self.onKey4, ""),
                "5": (self.onKey5, ""),
                "6": (self.onKey6, ""),
                "7": (self.onKey7, ""),
                "8": (self.onKey8, ""),
                "9": (self.onKey9, ""),
                "0": (self.onKey0, ""),
            }, -2)

        # for number key input
        self.setUseableChars(u' 1234567890abcdefghijklmnopqrstuvwxyz')

        printl("", self, "C")
	def __init__(self):
		printl("", self, "S")

		NumericalTextInput.__init__(self)

		self["number_key_popup"] = Label()
		self["number_key_popup"].hide()

		self["filterActions"] = HelpableActionMap(self, "DP_FilterMenuActions",
			{
			"1":			(self.onKey1, ""),
			"2":			(self.onKey2, ""),
			"3":			(self.onKey3, ""),
			"4":			(self.onKey4, ""),
			"5":			(self.onKey5, ""),
			"6":			(self.onKey6, ""),
			"7":			(self.onKey7, ""),
			"8":			(self.onKey8, ""),
			"9":			(self.onKey9, ""),
			"0":			(self.onKey0, ""),
			}, -2)

		# for number key input
		self.setUseableChars(u' 1234567890abcdefghijklmnopqrstuvwxyz')

		printl("", self, "C")
Exemple #3
0
	def timeout(self):
		printl("", self, "I")
		
		printl(self.onNumerKeyLastChar, self, "I")
		if self.onNumerKeyLastChar != ' ':
			self.activeFilter = ('Abc', ('Title', False, 1), self.onNumerKeyLastChar)
		else:
			self.activeFilter = ("All", (None, False), ("All", ))
		self.sort()
		self.filter()
		
		self.refresh()
		
		self.onNumberKeyPopup(self.onNumerKeyLastChar, False)
		NumericalTextInput.timeout(self)
Exemple #4
0
    def timeout(self):
        printl("", self, "I")

        printl(self.onNumerKeyLastChar, self, "I")
        if self.onNumerKeyLastChar != ' ':
            self.activeFilter = ('Abc', ('Title', False, 1),
                                 self.onNumerKeyLastChar)
        else:
            self.activeFilter = ("All", (None, False), ("All", ))
        self.sort()
        self.filter()

        self.refresh()

        self.onNumberKeyPopup(self.onNumerKeyLastChar, False)
        NumericalTextInput.timeout(self)
Exemple #5
0
    def timeout(self):
        """
		onNumberKeyTimeout
		"""
        printl("", self, "S")

        printl(self.onNumberKeyLastChar, self, "I")
        #		if self.onNumberKeyLastChar != ' ':
        #			pass
        # filter
        #		else:
        #			pass
        # reset filter

        self.filter()

        self.onNumberKeyPopup(self.onNumberKeyLastChar, False)
        NumericalTextInput.timeout(self)

        printl("", self, "C")
	def timeout(self):
		"""
		onNumberKeyTimeout
		"""
		printl("", self, "S")

		printl(self.onNumberKeyLastChar, self, "I")
		if self.onNumberKeyLastChar != ' ':
			pass
			# filter
		else:
			pass
			# reset filter

		self.filter()

		self.onNumberKeyPopup(self.onNumberKeyLastChar, False)
		NumericalTextInput.timeout(self)

		printl("", self, "C")
Exemple #7
0
    def __init__(self, session, libraryName, loadLibrary, playEntry, viewName, select=None, sort=None, filter=None):
        '''
        '''
        printl("", self, "S")
        
        printl("viewName: "+ str(viewName), self, "I")
        self.skinName = viewName[2]
        Screen.__init__(self, session)
        NumericalTextInput.__init__(self)
        self.skinName = viewName[2]
        self.select = select
        self.onFirstExecSort = sort
        self.onFirstExecFilter = filter
        
        self.libraryName = libraryName
        self.loadLibrary = loadLibrary
        self.viewName = viewName
        self._playEntry = playEntry
        
        self.playerData = None
        
        self.oldService = self.session.nav.getCurrentlyPlayingServiceReference()
        self.session.nav.stopService()
        
        self.mediaPath = config.plugins.dreamplex.mediafolderpath.value
        
        # Initialise library list
        list = []
        self["listview"] = List(list, True)
        
        self["number_key_popup"] = Label("")
        self["number_key_popup"].hide()

        self.seenPng = None
        self.unseenPng = None
            
        self["actions"] = HelpableActionMap(self, "DP_View", 
        {
            "ok":         (self.onKeyOk, ""),
            "cancel":     (self.onKeyCancel, ""),
            "left":       (self.onKeyLeft, ""),
            "right":      (self.onKeyRight, ""),
            "left_quick": (self.onKeyLeftQuick, ""),
            "right_quick": (self.onKeyRightQuick, ""),
            "up":         (self.onKeyUp, ""),
            "down":       (self.onKeyDown, ""),
            "up_quick":   (self.onKeyUpQuick, ""),
            "down_quick": (self.onKeyDownQuick, ""),
            "info":       (self.onKeyInfo, ""),
            #"menu":       (self.onKeyMenu, ""),

            "red":        (self.onKeyRed, ""),
            #"green":      (self.onKeyGreen, ""),
            #"yellow":     (self.onKeyYellow, ""),
            "blue":       (self.onKeyBlue, ""),

            "red_long":        (self.onKeyRedLong, ""),
            #"green_long":      (self.onKeyGreenLong, ""),
            #"yellow_long":     (self.onKeyYellowLong, ""),
            #"blue_long":       (self.onKeyBlueLong, ""),
            
            "1":       (self.onKey1, ""),
            "2":       (self.onKey2, ""),
            "3":       (self.onKey3, ""),
            "4":       (self.onKey4, ""),
            "5":       (self.onKey5, ""),
            "6":       (self.onKey6, ""),
            "7":       (self.onKey7, ""),
            "8":       (self.onKey8, ""),
            "9":       (self.onKey9, ""),
            "0":       (self.onKey0, ""),

        }, -2)
        
        # For number key input
        self.setUseableChars(u' 1234567890abcdefghijklmnopqrstuvwxyz')
        
        self.onLayoutFinish.append(self.setCustomTitle)
        self.onFirstExecBegin.append(self.onFirstExec)
        
        printl("", self, "C")
Exemple #8
0
    def __init__(self,
                 session,
                 libraryName,
                 loadLibrary,
                 playEntry,
                 viewName,
                 select=None,
                 sort=None,
                 filter=None):
        print "viewName", viewName
        self.skinName = viewName[2]
        Screen.__init__(self, session)
        NumericalTextInput.__init__(self)
        self.skinName = viewName[2]
        self.select = select
        self.onFirstExecSort = sort
        self.onFirstExecFilter = filter

        self.libraryName = libraryName
        self.loadLibrary = loadLibrary
        self.viewName = viewName
        self._playEntry = playEntry

        self.playerData = None

        self.oldService = self.session.nav.getCurrentlyPlayingServiceReference(
        )
        self.session.nav.stopService()

        # Initialise API Level for this screen
        self.APILevel = 99
        printl("APILevel=" + str(self.APILevel))

        # Initialise library list
        list = []
        if self.APILevel == 1:
            self["listview"] = MenuList(list)
        elif self.APILevel >= 2:
            self["listview"] = List(list, True)

        if self.APILevel >= 6:
            self["number_key_popup"] = Label("")
            self["number_key_popup"].hide()

        self.seenPng = None
        self.unseenPng = None

        self["actions"] = HelpableActionMap(
            self, "DP_View", {
                "ok": (self.onKeyOk, ""),
                "cancel": (self.onKeyCancel, ""),
                "left": (self.onKeyLeft, ""),
                "right": (self.onKeyRight, ""),
                "left_quick": (self.onKeyLeftQuick, ""),
                "right_quick": (self.onKeyRightQuick, ""),
                "up": (self.onKeyUp, ""),
                "down": (self.onKeyDown, ""),
                "up_quick": (self.onKeyUpQuick, ""),
                "down_quick": (self.onKeyDownQuick, ""),
                "info": (self.onKeyInfo, ""),
                "menu": (self.onKeyMenu, ""),
                "red": (self.onKeyRed, ""),
                "green": (self.onKeyGreen, ""),
                "yellow": (self.onKeyYellow, ""),
                "blue": (self.onKeyBlue, ""),
                "red_long": (self.onKeyRedLong, ""),
                "green_long": (self.onKeyGreenLong, ""),
                "yellow_long": (self.onKeyYellowLong, ""),
                "blue_long": (self.onKeyBlueLong, ""),
                "1": (self.onKey1, ""),
                "2": (self.onKey2, ""),
                "3": (self.onKey3, ""),
                "4": (self.onKey4, ""),
                "5": (self.onKey5, ""),
                "6": (self.onKey6, ""),
                "7": (self.onKey7, ""),
                "8": (self.onKey8, ""),
                "9": (self.onKey9, ""),
                "0": (self.onKey0, ""),
            }, -2)

        # For number key input
        self.setUseableChars(u' 1234567890abcdefghijklmnopqrstuvwxyz')

        self.onLayoutFinish.append(self.setCustomTitle)
        self.onFirstExecBegin.append(self.onFirstExec)