from Screens.Wizard import Wizard, wizardManager import sys from VideoHardware import video_hw from Components.Pixmap import Pixmap, MovingPixmap from Components.config import config, ConfigBoolean, configfile class VideoWizard(Wizard): skin = """ """ def __init__(self, session): # FIXME anyone knows how to use relative paths from the plugin's directory? self.xmlfile = sys.path[0] + "/Plugins/SystemPlugins/Videomode/videowizard.xml" self.hw = video_hw Wizard.__init__(self, session, showSteps = False) self["wizard"] = Pixmap() self["rc"] = MovingPixmap() self["arrowdown"] = MovingPixmap() self["arrowup"] = MovingPixmap() self["arrowup2"] = MovingPixmap() self.port = None self.mode = None def createSummary(self): print "++++++++++++***++**** VideoWizard-createSummary" from Screens.Wizard import WizardSummary return WizardSummary def markDone(self): pass def listInputChannels(self): list = [] for port in self.hw.getPortList(): if self.hw.isPortUsed(port): list.append((port, port)) return list def inputSelectionMade(self, index): print "inputSelectionMade:", index self.port = index def inputSelectionMoved(self): print "selection moved:", self.selection def listModes(self): list = [] print "modes for port", self.port for mode in self.hw.getModeList(self.port): list.append((mode[0], mode[0])) return list def modeSelectionMade(self, index): print "modeSelectionMade:", index self.mode = index def modeSelectionMoved(self): print "selection moved:", self.selection def listRates(self): list = [] print "modes for port", self.port for mode in self.hw.getModeList(self.port): print mode if mode[0] == self.mode: for rate in mode[1]: list.append((rate, rate)) return list def rateSelectionMade(self, index): print "rateSelectionMade:", index def rateSelectionMoved(self): print "selection moved:", self.selection