def __init__(self,session): ScrollLabel.__init__(self,text="") self.timer=eTimer() self.timer_conn = self.timer.timeout.connect(self.updateChatWindow) self.timer.start(250) self.pipe=MessagePipe() self.oldText=""
def __init__(self, session, args=None): Screen.__init__(self, session) self.setTitle(_('OE Changes')) if path.exists('/tmp/info.txt'): remove('/tmp/info.txt') self.logtype = 'oe' self['text'] = ScrollLabel() self['title_summary'] = StaticText() self['text_summary'] = StaticText() self['key_red'] = Button(_('Close')) self['key_green'] = Button(_('Update')) self['key_yellow'] = Button(_('Show E2 Log')) self['myactions'] = ActionMap( ['ColorActions', 'OkCancelActions', 'DirectionActions'], { 'cancel': self.closeRecursive, 'red': self.closeRecursive, 'green': self.unattendedupdate, 'yellow': self.changelogtype, 'left': self.pageUp, 'right': self.pageDown, 'down': self.pageDown, 'up': self.pageUp }, -1) self.onLayoutFinish.append(self.getlog)
def __init__(self, session, cfile=None, type=None): global crushlog_bottomline global crushfile global crushlog_lines global crushlog_topline Screen.__init__(self, session) self.skin = ShowCrushLog.skin crushlog_topline = 0 crushfile = cfile f = open(crushfile, 'r') crushlog_bottomline = 1 line = f.readline() print line while line: if len(line) > 1: crushlog_bottomline = crushlog_bottomline + 1 line = f.readline() print line f.close() if crushlog_bottomline < crushlog_lines: crushlog_topline = 0 crushlog_bottomline = crushlog_lines self['showcrushlog'] = ScrollLabel('\n') self.showCrushLogPage() self.pagebackward self['setupActions'] = ActionMap( ['ColorActions', 'SetupActions', 'InfobarMovieListActions'], { 'red': self.cancel, 'cancel': self.cancel, 'ok': self.cancel, 'left': self.pagebackward, 'right': self.pageforward, 'up': self.backward, 'down': self.forward })
def __init__(self, session): Screen.__init__(self, session) Screen.setTitle(self, _("Samba Log")) self.skinName = "NetworkLog" self['infotext'] = ScrollLabel('') self.Console = Console() self['actions'] = ActionMap(['WizardActions', 'ColorActions'], {'ok': self.close, 'back': self.close, 'up': self['infotext'].pageUp, 'down': self['infotext'].pageDown}) smbdview = '' nmbdview = '' if fileExists('/var/volatile/log/log.smbd'): self.Console.ePopen('tail -n20 /var/volatile/log/log.smbd > /tmp/tmp.smbd.log') time.sleep(1) f = open('/tmp/tmp.smbd.log', 'r') for line in f.readlines(): smbdview += line f.close() if smbdview =="": smbdview = _("no log entrys") + "\n\n\n\n\n" remove('/tmp/tmp.smbd.log') else: smbdview = _("no") + " log.smbd " + _("found") if fileExists('/var/volatile/log/log.nmbd'): self.Console.ePopen('tail -n20 /var/volatile/log/log.nmbd > /tmp/tmp.nmbd.log') time.sleep(1) f = open('/tmp/tmp.nmbd.log', 'r') for line in f.readlines(): nmbdview += line f.close() if nmbdview =="": nmbdview = _("no log entrys") remove('/tmp/tmp.nmbd.log') else: nmbdview = _("no") +" log.nmbd " + _("found") sambaview = "--/var/volatile/log/log.smbd:\n" + smbdview + "\n--/var/volatile/log/log.nmbd:\n" + nmbdview self['infotext'].setText(sambaview)
def __init__(self, session, title="Console", cmdlist=None, finishedCallback=None, closeOnSuccess=False): Screen.__init__(self, session) self.finishedCallback = finishedCallback self.closeOnSuccess = closeOnSuccess self.errorOcurred = False self["text"] = ScrollLabel("") self["actions"] = ActionMap( ["WizardActions", "DirectionActions", "OkCancelActions"], { #"ok": self.cancel, #"back": self.cancel, "ok": self.close, "cancel": self.close, "up": self["text"].pageUp, "down": self["text"].pageDown }, -1) self.cmdlist = cmdlist self.newtitle = title == "Console" and _("Console") or title self.onShown.append(self.updateTitle) self.container = eConsoleAppContainer() self.run = 0 self.container.appClosed.append(self.runFinished) self.container.dataAvail.append(self.dataAvail) self.onLayoutFinish.append( self.startRun) # dont start before gui is finished
def __init__(self, session): Screen.__init__(self, session) self.skinName = SkinTools.appendResolution("AdvancedMovieSelectionAboutDetails_") self["aboutActions"] = ActionMap(["ShortcutActions", "WizardActions", "InfobarEPGActions", "EPGSelectActions"], { "red": self.close, "back": self.close, "nextBouquet": self.pageUp, "nextBouquet": self.pageUp, "prevBouquet": self.pageDown, "prevBouquet": self.pageDown, }, -1) self["key_red"] = StaticText() self["red"] = Pixmap() self["red"].hide() self["bouquet+"] = Pixmap() self["bouquet+"].hide() self["bouquet-"] = Pixmap() self["bouquet-"].hide() self["version_list"] = VersionList() self["version_list"].hide() self["details"] = ScrollLabel() self["details"].hide() self.onShown.append(self.setWindowTitle)
def __init__(self, session): Screen.__init__(self, session) self.setTitle(_("Latest Commits")) self.skinName = ["CommitInfo", "About"] self["AboutScrollLabel"] = ScrollLabel(_("Please wait")) self["actions"] = ActionMap( ["SetupActions", "DirectionActions"], { "cancel": self.close, "ok": self.close, "up": self["AboutScrollLabel"].pageUp, "down": self["AboutScrollLabel"].pageDown, "left": self.left, "right": self.right, "deleteBackward": self.left, "deleteForward": self.right }) self["key_red"] = Button(_("Cancel")) self.project = 0 self.projects = [ #("organisation", "repository", "readable name", "branch", "github/gitlab"), ("teamblue", "enigma2", "teamBlue Enigma2", "6.1", "github"), ("teamblue", "skin", "teamBlue Skin GigaBlue Pax", "master", "github"), ("oe-alliance", "oe-alliance-core", "OE Alliance Core", "4.1", "github"), ("oe-alliance", "oe-alliance-plugins", "OE Alliance Plugins", "2.3", "github"), ("oe-alliance", "enigma2-plugins", "OE Alliance Enigma2 Plugins", "services-removed", "github") ] self.cachedProjects = {} self.Timer = eTimer() self.Timer.callback.append(self.readGithubCommitLogs) self.Timer.start(50, True)
def __init__(self, session, menu_path=""): Screen.__init__(self, session) self.menu_path = menu_path self.screentitle = _("OE Changes") self.logtype = 'oe' self["menu_path_compressed"] = StaticText("") self["text"] = ScrollLabel() self['title_summary'] = StaticText() self['text_summary'] = StaticText() self["key_red"] = Button(_("Close")) self["key_green"] = Button(_("Update")) self["key_yellow"] = Button(_("Show E2 Log")) self["myactions"] = ActionMap(['ColorActions', 'OkCancelActions', 'DirectionActions'], { 'cancel': self.closeRecursive, "red": self.closeRecursive, "green": self.unattendedupdate, "yellow": self.changelogtype, "left": self.pageUp, "right": self.pageDown, "down": self.pageDown, "up": self.pageUp },-1) self.onLayoutFinish.append(self.getlog)
def __init__(self, session): Screen.__init__(self, session) self["lab1"] = Label() self["lab2"] = Label(_("Set Default CAM")) self["lab3"] = Label() self["Ilab1"] = Label() self["Ilab2"] = Label() self["Ilab3"] = Label() self["Ilab4"] = Label() self["key_red"] = Label(_("Epg Panel")) self["key_yellow"] = Label(_("Sys Info")) self["key_blue"] = Label(_("Extra Settings")) self["activecam"] = Label() self["Ecmtext"] = ScrollLabel() self["actions"] = ActionMap(["ColorActions", "OkCancelActions", "DirectionActions"], { "ok": self.keyOk, "cancel": self.close, "green": self.keyGreen, "red": self.keyRed, "yellow": self.keyYellow, "blue": self.keyBlue, "up": self["Ecmtext"].pageUp, "down": self["Ecmtext"].pageDown }, -1) # if not fileExists("/usr/lib/libcrypto.so.0.9.7"): # system("ln -s /lib/libcrypto.so.0.9.8 /usr/lib/libcrypto.so.0.9.7") # system("ln -s /lib/libcrypto.so.0.9.8 /lib/libcrypto.so.0.9.7") self.emlist = [] self.populate_List() self["list"] = MenuList(self.emlist) self["lab1"].setText(_("%d CAMs Installed") % (len(self.emlist))) self.onShow.append(self.updateBP)
def __init__(self, session): self.session = session Screen.__init__(self, session) self["key_red"] = Button(_("Clear")) self["key_green"] = Button() self["key_yellow"] = Button() self["key_blue"] = Button(_("Save")) self["list"] = ScrollLabel(log.value) self["actions"] = ActionMap(["DirectionActions", "OkCancelActions", "ColorActions"], { "red": self.clear, "green": self.cancel, "yellow": self.cancel, "save": self.save, "blue": self.save, "cancel": self.cancel, "ok": self.cancel, "left": self["list"].pageUp, "right": self["list"].pageDown, "up": self["list"].pageUp, "down": self["list"].pageDown, "pageUp": self["list"].pageUp, "pageDown": self["list"].pageDown }, -2)
def __init__(self, session, title): Screen.__init__(self, session) self.session = session self.title = title self["list"] = charts([]) self["info"] = Label("") self.backinfo = "main" self.key_mode = "list" self["lyric_info"] = ScrollLabel() self["lyric_info"].hide() self["actions"] = ActionMap( [ "WizardActions", "MoviePlayerActions", "EPGSelectActions", "MediaPlayerSeekActions", "ColorActions" ], { "cancel": self.exit, "back": self.exit, "ok": self.ok, "up": self.up, "down": self.down, }, -1) self.onLayoutFinish.append(self.search_title)
def __init__(self, session, url, title, args=0): self.url = url self.skin = '\n <screen name="FMenusimple" position="center,center" size="580,450" title="%s" flags="wfNoBorder" >\n <ePixmap pixmap="~/images/frametop.png" position="0,0" size="580,450"/>\t\n <ePixmap pixmap="~/images/frameleft.png" position="0,7" size="6,435"/>\t\n <ePixmap pixmap="~/images/frameright.png" position="573,7" size="6,435"/>\t\n <ePixmap pixmap="~/images/framebottom.png" position="0,442" size="580,7"/>\n\t\t\t\t <widget name="titel" position="10,10" zPosition="1" size="500,130" font="Regular;23" transparent="1" backgroundColor="#00000000" foregroundColor="yellow" />\n\t\t\t\t \n\t\t\t\t <ePixmap position="15,88" size="550,12" pixmap="~/images/slider.png" alphatest="blend" transparent="1" backgroundColor="transparent"/>\n\t\t\t\t\t<widget name="text" position="19,100" size="560,340" font="Regular;24" />\n\t\t\t\t \n </screen>' % title Screen.__init__(self, session) self.skin_path = resolveFilename(SCOPE_PLUGINS, "Extensions/PurePrestige") self['titel'] = Label(title) self['text'] = ScrollLabel('') self['actions'] = ActionMap( ['WizardActions'], { 'ok': self.close, 'back': self.close, 'up': self['text'].pageUp, 'down': self['text'].pageDown }, -1) try: self['titel'].setText(title) self.labeltext = '' fp = urllib2.urlopen(self.url) htmlSource = fp.read() fp.close() a = [] a = htmlSource.split('post_message') count = 0 for item in a: b = [] b = item.split('!-- / message') s = b[0] if count > 0: self.labeltext += str(s) count = count + 1 if self.labeltext: self['text'].setText(convertHTMLTags(self.labeltext)) except urllib2.HTTPError as e: self['text'].setText('No more data')
def __init__(self, session): ''' ''' printl("", self, "S") Screen.__init__(self, session) self._session = session self["help"] = ScrollLabel() self["key_red"] = StaticText(_("Close")) self["setupActions"] = HelpableActionMap( self, "DP_View", { "red": self.keyCancel, "cancel": self.keyCancel, "bouquet_up": (self.bouquetUp, ""), "bouquet_down": (self.bouquetDown, ""), }, -2) self.onLayoutFinish.append(self.setContent) printl("", self, "C")
def __init__(self, session, title="Console", cmdlist=None, finishedCallback=None, closeOnSuccess=False, showStartStopText=True): Screen.__init__(self, session) self.finishedCallback = finishedCallback self.closeOnSuccess = closeOnSuccess self.showStartStopText = showStartStopText self.errorOcurred = False self.Shown = True self["text"] = ScrollLabel("") self["actions"] = ActionMap( ["ColorActions", "WizardActions", "DirectionActions"], { "ok": self.cancel, "back": self.cancel, "up": self["text"].pageUp, "down": self["text"].pageDown, "yellow": self.yellow, }, -2) self.cmdlist = isinstance(cmdlist, list) and cmdlist or [cmdlist] self.newtitle = title == "Console" and _("Console") or title self.onShown.append(self.updateTitle) self.container = eConsoleAppContainer() self.run = 0 self.container.appClosed.append(self.runFinished) self.container.dataAvail.append(self.dataAvail) self.onLayoutFinish.append( self.startRun) # dont start before gui is finished
def __init__(self, session): Screen.__init__(self, session) self["key_red"] = Button(_("Close")) self["key_green"] = Button(_("All")) self["key_yellow"] = Button(_("Mode II")) self["key_blue"] = Button(_("Mode III")) self["HelpText"] = ScrollLabel() self["Actions"] = ActionMap( ["WizardActions", "ColorActions"], { "back": self.close, "red": self.close, "green": self.all, "yellow": self.mode2, "blue": self.mode3, "ok": self.close, "up": self["HelpText"].pageUp, "down": self["HelpText"].pageDown, }, -1) self.setTitle(_("Help")) self.all()
def __init__(self, session, title="Console", cmdlist=None, finishedCallback=None, closeOnSuccess=False, endstr=''): Screen.__init__(self, session) self.color = '#800080' self.finishedCallback = finishedCallback self.closeOnSuccess = closeOnSuccess self.endstr = endstr self["text"] = ScrollLabel("") self["actions"] = ActionMap( ["WizardActions", "DirectionActions", 'ColorActions'], { "ok": self.cancel, "back": self.cancel, "blue": self.restartenigma, "up": self["text"].pageUp, "down": self["text"].pageDown }, -1) self.cmdlist = cmdlist self.newtitle = title self.onShown.append(self.updateTitle) self.container = eConsoleAppContainer() self.run = 0 try: self.container.appClosed.append(self.runFinished) self.container.dataAvail.append(self.dataAvail) except: self.appClosed_conn = self.container.appClosed.connect( self.runFinished) self.dataAvail_conn = self.container.dataAvail.connect( self.dataAvail) self.onLayoutFinish.append( self.startRun) # dont start before gui is finished
def __init__(self, session, args = None): self.session = session path = "/usr/lib/enigma2/python/Plugins/Extensions/IPTV-List-Updater/skins/original/FAQ.xml" print path with open(path, "r") as f: self.skin = f.read() f.close() Screen.__init__(self, session) self["text"] = ScrollLabel() self["actions"] = NumberActionMap(["WizardActions", "OkCancelActions", "ColorActions"], { "back": self.close, "red": self.close, "up": self["text"].pageUp, "down": self["text"].pageDown, }, -1) self["key_red"] = Label(_("Close")) change = self.Ausgabe() self["text"].setText(change)
def __init__(self, session, logFile, titleText, firstLineText, lastLineText): Screen.__init__(self, session) self.skinName = ["TestBox", "Console"] title = "" text = "" self.logFile = logFile self.titleText = titleText self.firstLineText = firstLineText self.lastLineText = lastLineText self["text"] = ScrollLabel("") self["actions"] = ActionMap( ["WizardActions", "DirectionActions", "ChannelSelectBaseActions"], { "ok": self.cancel, "back": self.cancel, "up": self["text"].pageUp, "down": self["text"].pageDown, "left": self["text"].pageUp, "right": self["text"].pageDown, "nextBouquet": self["text"].lastPage, "prevBouquet": self.firstPage, }, -1) self.onLayoutFinish.append(self.readLog)
def __init__(self, session, args=None): Screen.__init__(self, session) self.skinName = "SoftwareUpdateChanges" self.setTitle(_("OpenHDF E2 Changes")) self.logtype = 'e2' self["text"] = ScrollLabel() self['title_summary'] = StaticText() self['text_summary'] = StaticText() self["key_red"] = Button(_("Close")) self["key_green"] = Button(_("OK")) self["key_yellow"] = Button(_("Last Image Updates")) self["myactions"] = ActionMap(['ColorActions', 'OkCancelActions', 'DirectionActions'], { 'cancel': self.closeRecursive, 'green': self.closeRecursive, "red": self.closeRecursive, "blue": self.showMemoryInfo, "yellow": self.changelogtype, "left": self.pageUp, "right": self.pageDown, "down": self.pageDown, "up": self.pageUp },-1) self.onLayoutFinish.append(self.getlog)
def __init__(self, session): Screen.__init__(self, session) Screen.setTitle(self, _("Device Information")) self["TunerHeader"] = StaticText(_("Detected NIMs:")) self["HDDHeader"] = StaticText(_("Detected Devices:")) self["MountsHeader"] = StaticText(_("Network Servers:")) self["nims"] = StaticText() self["hdd"] = StaticText() self["mounts"] = StaticText() self["allinonedevices"] = ScrollLabel() self.list = [] self.activityTimer = eTimer() self.activityTimer.timeout.get().append(self.populate2) self["key_red"] = Button(_("Close")) self["actions"] = ActionMap( ["SetupActions", "ColorActions", "TimerEditActions"], { "up": self["allinonedevices"].pageUp, "down": self["allinonedevices"].pageDown, "cancel": self.close, "ok": self.close, }) self.onLayoutFinish.append(self.populate)
def __init__(self, session, title="Console", cmdlist=None, finishedCallback=None, closeOnSuccess=False): Screen.__init__(self, session) self.finishedCallback = finishedCallback self.closeOnSuccess = closeOnSuccess self.errorOcurred = False self.hideflag = True self.Shown = True self["text"] = ScrollLabel("") self["summary_description"] = StaticText("") self["actions"] = ActionMap( ["ColorActions", "WizardActions", "DirectionActions"], { "ok": self.cancel, "back": self.cancel, "up": self["text"].pageUp, "down": self["text"].pageDown, "yellow": self.yellow }, -2) self.cmdlist = cmdlist self.newtitle = title self.onShown.append(self.updateTitle) self.container = eConsoleAppContainer() self.run = 0 self.container.appClosed.append(self.runFinished) self.container.dataAvail.append(self.dataAvail) self.onLayoutFinish.append( self.startRun) # dont start before gui is finished
def __init__(self, session): Screen.__init__(self, session) self.session = session self.skinName = "PU_History" self.setup_title = _("Programmlisten History") self.setTitle(self.setup_title) self["key_red"] = StaticText(_("Exit")) self["History"] = ScrollLabel() self["Actions"] = ActionMap( [ 'OkCancelActions', 'ShortcutActions', "ColorActions", "DirectionActions" ], { "red": self.keyOk, "cancel": self.keyOk, "ok": self.keyOk, "up": self["History"].pageUp, "down": self["History"].pageDown, "left": self["History"].pageUp, "right": self["History"].pageDown, }) self['History'].setText(DownloadInfo(URL))
def __init__(self, session): Screen.__init__(self, session) self.Console = Console() self["key_red"] = Label(_("Stop", "enigma2")) self["key_green"] = Label(_("Start", "enigma2")) self["key_yellow"] = Label(_("Restart", "enigma2")) self["key_blue"] = Label(_("Setup", "enigma2")) self["actions"] = ActionMap( ["OkCancelActions", "ColorActions"], { "cancel": self.cancel, "ok": self.ok, "green": self.start, "red": self.stop, "yellow": self.restart, "blue": self.setup }, -1) self["status"] = ScrollLabel() self["list"] = List([]) self.actcam = config.plugins.AltSoftcam.actcam.value self.camstartcmd = "" self.CreateInfo() self.Timer = eTimer() self.Timer.callback.append(self.listecminfo) self.Timer.start(1000 * 4, False)
def __init__(self, session): Screen.__init__(self, session) self['infotext'] = ScrollLabel() self['lab1'] = Label(_('Status:')) self['labstop'] = Label(_('Standby')) self['labrun'] = Label(_('Running')) self['key_red'] = Label(_('Standby Now')) self['key_green'] = Label(_('Set Acoustic')) self['key_yellow'] = Label(_('Set Standby')) self.cur_state = False self['actions'] = ActionMap( ['WizardActions', 'ColorActions', 'DirectionActions'], { 'back': self.close, 'up': self['infotext'].pageUp, 'left': self['infotext'].pageUp, 'down': self['infotext'].pageDown, 'right': self['infotext'].pageDown, 'red': self.setStand, 'green': self.setAcu, 'yellow': self.setSsec }) self.hdd_dev = BhU_find_hdd() self.hddloc = '/dev/' + self.hdd_dev self.onLayoutFinish.append(self.updateHdd)
def __init__(self, session): Screen.__init__(self, session) Screen.setTitle(self, _("Hard disk format required!")) system("showiframe /usr/share/enigma2/black.mvi") # Let showiframe's actions complete... import time time.sleep(1) self.internalHdd = getInternalHDD() if not self.internalHdd: self.close() msg = "The internal hard disk is not formatted correctly. In order for your %s %s to function at its best, it is recommended that you format the hard disk." % ( getMachineBrand(), getMachineName()) msg += "\n\nWARNING: Formatting will erase all data on the hard disk." msg += "\n\nPress OK to format your %s's hard disk." % getMachineName() msg += "\nOtherwise, press POWER to power down, or EXIT to skip the HDD format." self["text"] = Label(msg) self["errors"] = ScrollLabel() self["errors"].hide() self["actions"] = ActionMap( ["SetupActions", "DirectionActions"], { "ok": self.doFormat, "cancel": self.askCancel, "up": self["errors"].pageUp, "down": self["errors"].pageDown, "left": self["errors"].pageUp, "right": self["errors"].pageDown, }, -2) self["poweractions"] = ActionMap(["PowerKeyActions"], { "powerdown": self.tryShutdown, }, -2) self.reset()
def __init__(self, session): Screen.__init__(self, session) Screen.setTitle(self, _("Device Information")) self.skinName = ["SystemDevicesInfo", "About"] OpenNFRVersion = _("OpenNFR %s") % about.getImageVersionString() self["OpenNFRVersion"] = Label(OpenNFRVersion) self.AboutText = "" self["AboutScrollLabel"] = ScrollLabel(self.AboutText) self.activityTimer = eTimer() self.activityTimer.timeout.get().append(self.populate2) self.populate() self["actions"] = ActionMap( [ "SetupActions", "ColorActions", "TimerEditActions", "DirectionActions" ], { "cancel": self.close, "ok": self.close, "up": self["AboutScrollLabel"].pageUp, "down": self["AboutScrollLabel"].pageDown })
def __init__( self, session, title="j00zekBouquetsConsole", cmdlist=None, finishedCallback=None, closeOnSuccess=False, endText="\nUżyj strzałek góra/dół do przewinięcia tekstu. OK zamyka okno" ): Screen.__init__(self, session) self.finishedCallback = finishedCallback self.closeOnSuccess = closeOnSuccess self.errorOcurred = False self["text"] = ScrollLabel("") self["actions"] = ActionMap( ["WizardActions", "DirectionActions"], { "ok": self.cancel, "back": self.cancel, "up": self["text"].pageUp, "down": self["text"].pageDown }, -1) self.cmdlist = cmdlist self.newtitle = title self.endText = endText self.onShown.append(self.updateTitle) self.container = eConsoleAppContainer() self.run = 0 self.container.appClosed.append(self.runFinished) self.container.dataAvail.append(self.dataAvail) self.onLayoutFinish.append( self.startRun) # dont start before gui is finished
def __init__(self, Event, Ref, callback=None, similarEPGCB=None): self.similarEPGCB = similarEPGCB self.cbFunc = callback self.currentService = Ref self.isRecording = (not Ref.ref.flags & eServiceReference.isGroup) and Ref.ref.getPath() self.event = Event self["epg_description"] = ScrollLabel() self["datetime"] = Label() self["channel"] = Label() self["duration"] = Label() self["key_red"] = Button("") if similarEPGCB is not None: self.SimilarBroadcastTimer = eTimer() self.SimilarBroadcastTimer.callback.append(self.getSimilarEvents) else: self.SimilarBroadcastTimer = None self.key_green_choice = self.ADD_TIMER if self.isRecording: self["key_green"] = Button("") else: self["key_green"] = Button(_("Add timer")) self["key_yellow"] = Button("") self["key_blue"] = Button("") self["actions"] = ActionMap( ["OkCancelActions", "EventViewActions"], { "cancel": self.close, "ok": self.close, "pageUp": self.pageUp, "pageDown": self.pageDown, "prevEvent": self.prevEvent, "nextEvent": self.nextEvent, "timerAdd": self.timerAdd, "openSimilarList": self.openSimilarList }) self.onShown.append(self.onCreate)
def __init__(self, session, menu_path=""): Screen.__init__(self, session) self["infotext"] = ScrollLabel("") self["actions"] = ActionMap(["WizardActions", "ColorActions"], { "ok": self.close, "back": self.close, "up": self["infotext"].pageUp, "down": self["infotext"].pageDown }) strview = "" rc = system("tail /etc/openvpn/openvpn.log > /etc/openvpn/tmp.log") #tail /etc/openvpn/openvpn.log if fileExists("/etc/openvpn/tmp.log"): f = open("/etc/openvpn/tmp.log", 'r') for line in f.readlines(): strview += line f.close() os_remove("/etc/openvpn/tmp.log") self["infotext"].setText(strview)
def __init__(self, session, title=_("Console"), cmdlist=None, finishedCallback=None, closeOnSuccess=False): Screen.__init__(self, session) self.finishedCallback = finishedCallback self.closeOnSuccess = closeOnSuccess self.errorOcurred = False self["key_red"] = Label(_("Cancel")) self["key_green"] = Label(_("Hide")) self["text"] = ScrollLabel("") self["summary_description"] = StaticText("") self["actions"] = ActionMap(["WizardActions", "DirectionActions", "ColorActions"], { "ok": self.cancel, "back": self.cancel, "up": self.key_up, "down": self.key_down, "green": self.key_green, "red": self.key_red }, -1) self.cmdlist = cmdlist self.newtitle = title self.screen_hide = False self.cancel_msg = None self.output_file = '' self.onShown.append(self.updateTitle) self.container = eConsoleAppContainer() self.run = 0 self.container.appClosed.append(self.runFinished) self.container.dataAvail.append(self.dataAvail) self.onLayoutFinish.append(self.startRun) # dont start before gui is finished
def __init__(self, session): Screen.__init__(self, session) self.setTitle(_("Troubleshoot")) self["AboutScrollLabel"] = ScrollLabel(_("Please wait")) self["key_red"] = Button() self["key_green"] = Button() self["actions"] = ActionMap(["OkCancelActions", "DirectionActions", "ColorActions"], { "cancel": self.close, "up": self["AboutScrollLabel"].pageUp, "down": self["AboutScrollLabel"].pageDown, "left": self.left, "right": self.right, "red": self.red, "green": self.green, }) self.container = eConsoleAppContainer() self.container.appClosed.append(self.appClosed) self.container.dataAvail.append(self.dataAvail) self.commandIndex = 0 self.updateOptions() self.onLayoutFinish.append(self.run_console)
def __init__(self, text=""): ScrollLabel.__init__(self, text)
def __init__(self, text = ''): ScrollLabel.__init__(self)
def __init__(self,session): ScrollLabel.__init__(self,text="") self.timer=eTimer() self.timer.timeout.get().append(self.updateBuddyWindow) self.timer.start(500) self.oldlist=""
def __init__(self,session): ScrollLabel.__init__(self,text="") self.timer=eTimer() self.timer_conn = self.timer.timeout.connect(self.updateBuddyWindow) self.timer.start(500) self.oldlist=""