From 70b1d3a582b8e21ea7bf62fa14f6d0bffeb5b3b2 Mon Sep 17 00:00:00 2001 From: "Mr.Servo" Date: Thu, 2 Oct 2025 11:59:10 +0200 Subject: [PATCH] [LCD4linux] V5.0-r34 tiny improvements - LCD2 and LCD3 are no longer displayed in mode 'MP' and 'Standby' when they are deactivated THX to User **KenTucky @ OpenA.TV** details see: https://www.opena.tv/viewtopic.php?t=73&start=3580#p590664 HINT: **LCD4linux** is still working under Python2 and Python3 --- lcd4linux/src/myFileList.py | 12 ++++++----- lcd4linux/src/plugin.py | 42 ++++++++++++++++++++----------------- 2 files changed, 30 insertions(+), 24 deletions(-) diff --git a/lcd4linux/src/myFileList.py b/lcd4linux/src/myFileList.py index 6937561..ba9546c 100644 --- a/lcd4linux/src/myFileList.py +++ b/lcd4linux/src/myFileList.py @@ -22,17 +22,18 @@ from os import path as os_path, listdir, stat as os_stat from Components.MenuList import MenuList from Components.Harddisk import harddiskmanager -from enigma import RT_HALIGN_LEFT, eListboxPythonMultiContent, eServiceReference, eServiceCenter, gFont, iServiceInformation +from enigma import RT_HALIGN_LEFT, eListboxPythonMultiContent, eServiceReference, eServiceCenter, gFont, iServiceInformation, getDesktop from Tools.LoadPixmap import LoadPixmap from Tools.Directories import SCOPE_PLUGINS, resolveFilename def FileEntryComponent(name, absolute=None, isDir=False): res = [(absolute, isDir)] - res.append((eListboxPythonMultiContent.TYPE_TEXT, 40, 2, 1000, 22, 0, RT_HALIGN_LEFT, name)) + (x, y, w, h, y2) = (44, 2, 1000, 35, 8) if getDesktop(0).size().height() > 720 else (40, 2, 1000, 26, 3) + res.append((eListboxPythonMultiContent.TYPE_TEXT, x, y, w, h, 0, RT_HALIGN_LEFT, name)) png = LoadPixmap(resolveFilename(SCOPE_PLUGINS, "Extensions/LCD4linux/data/dir.png")) if isDir else None if png is not None: - res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, 12, 3, 20, 20, png)) + res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, 12, y2, 22, 22, png)) return res @@ -59,8 +60,9 @@ def __init__(self, directory, showDirectories=True, showFiles=True, showMountpoi se = os_path.basename(directory) direct = "%s/" % directory self.changeDir(direct, se) - self.l.setFont(0, gFont("Regular", 18)) - self.l.setItemHeight(26) + (s, h) = (27, 35) if getDesktop(0).size().height() > 720 else (18, 26) + self.l.setFont(0, gFont("Regular", s)) + self.l.setItemHeight(h) self.serviceHandler = eServiceCenter.getInstance() def refreshMountpoints(self): diff --git a/lcd4linux/src/plugin.py b/lcd4linux/src/plugin.py index 43d0d4f..df2dcc2 100644 --- a/lcd4linux/src/plugin.py +++ b/lcd4linux/src/plugin.py @@ -172,7 +172,7 @@ if find_library("usb-0.1") is not None or find_library("usb-1.0") is not None: print("[LCD4linux] libusb found :-)", getEnigmaVersionString()) USBok = True -Version = "V5.0-r33" +Version = "V5.0-r34" L4LElist = L4Lelement() L4LdoThread = True LCD4enigma2config = resolveFilename(SCOPE_CONFIG) # /etc/enigma2/ @@ -5516,7 +5516,7 @@ def __init__(self, session, args=0): self.PicTimer = eTimer() self.PicTimer.callback.append(self.showpic) self["introduction"] = StaticText() - self["Version"] = StaticText((Version if L4LElist.getVersion() == True else Version + "") + " (" + _("Mode") + ": Py" + ("3" if PY3 else "2") + ")") + self["Version"] = StaticText(Version if L4LElist.getVersion() is True else Version + " (" + _("Mode") + ": Py" + ("3" if PY3 else "2") + ")") self["LibUSB"] = StaticText() self["About"] = StaticText() self["LCD1"] = Pixmap() @@ -6693,14 +6693,16 @@ def SetList(self): self.list3.append(getConfigListEntry(_("- LCD 1 Background-Picture [ok]>"), LCD4linux.MPLCDBild1)) self.list3.append(getConfigListEntry(_("- LCD 1 Brightness"), LCD4linux.MPHelligkeit)) self.list3.append(getConfigListEntry(_("- LCD 1 Night Reduction"), LCD4linux.MPNight)) - self.list3.append(getConfigListEntry(_("- LCD 2 Background Color"), LCD4linux.MPLCDColor2)) - self.list3.append(getConfigListEntry(_("- LCD 2 Background-Picture [ok]>"), LCD4linux.MPLCDBild2)) - self.list3.append(getConfigListEntry(_("- LCD 2 Brightness"), LCD4linux.MPHelligkeit2)) - self.list3.append(getConfigListEntry(_("- LCD 2 Night Reduction"), LCD4linux.MPNight2)) - self.list3.append(getConfigListEntry(_("- LCD 3 Background Color"), LCD4linux.MPLCDColor3)) - self.list3.append(getConfigListEntry(_("- LCD 3 Background-Picture [ok]>"), LCD4linux.MPLCDBild3)) - self.list3.append(getConfigListEntry(_("- LCD 3 Brightness"), LCD4linux.MPHelligkeit3)) - self.list3.append(getConfigListEntry(_("- LCD 3 Night Reduction"), LCD4linux.MPNight3)) + if LCD4linux.LCDType2.value != "00": + self.list3.append(getConfigListEntry(_("- LCD 2 Background Color"), LCD4linux.MPLCDColor2)) + self.list3.append(getConfigListEntry(_("- LCD 2 Background-Picture [ok]>"), LCD4linux.MPLCDBild2)) + self.list3.append(getConfigListEntry(_("- LCD 2 Brightness"), LCD4linux.MPHelligkeit2)) + self.list3.append(getConfigListEntry(_("- LCD 2 Night Reduction"), LCD4linux.MPNight2)) + if LCD4linux.LCDType3.value != "00": + self.list3.append(getConfigListEntry(_("- LCD 3 Background Color"), LCD4linux.MPLCDColor3)) + self.list3.append(getConfigListEntry(_("- LCD 3 Background-Picture [ok]>"), LCD4linux.MPLCDBild3)) + self.list3.append(getConfigListEntry(_("- LCD 3 Brightness"), LCD4linux.MPHelligkeit3)) + self.list3.append(getConfigListEntry(_("- LCD 3 Night Reduction"), LCD4linux.MPNight3)) self.list3.append(getConfigListEntry(_("- LCD Auto-OFF"), LCD4linux.MPAutoOFF)) self.list3.append(getConfigListEntry(_("- Screens used for Changing"), LCD4linux.MPScreenMax)) self.list3.append(getConfigListEntry(_("Background"), LCD4linux.MPBackground1)) @@ -7323,14 +7325,16 @@ def SetList(self): self.list4.append(getConfigListEntry(_("- LCD 1 Background-Picture [ok]>"), LCD4linux.StandbyLCDBild1)) self.list4.append(getConfigListEntry(_("- LCD 1 Brightness"), LCD4linux.StandbyHelligkeit)) self.list4.append(getConfigListEntry(_("- LCD 1 Night Reduction"), LCD4linux.StandbyNight)) - self.list4.append(getConfigListEntry(_("- LCD 2 Background Color"), LCD4linux.StandbyLCDColor2)) - self.list4.append(getConfigListEntry(_("- LCD 2 Background-Picture [ok]>"), LCD4linux.StandbyLCDBild2)) - self.list4.append(getConfigListEntry(_("- LCD 2 Brightness"), LCD4linux.StandbyHelligkeit2)) - self.list4.append(getConfigListEntry(_("- LCD 2 Night Reduction"), LCD4linux.StandbyNight2)) - self.list4.append(getConfigListEntry(_("- LCD 3 Background Color"), LCD4linux.StandbyLCDColor3)) - self.list4.append(getConfigListEntry(_("- LCD 3 Background-Picture [ok]>"), LCD4linux.StandbyLCDBild3)) - self.list4.append(getConfigListEntry(_("- LCD 3 Brightness"), LCD4linux.StandbyHelligkeit3)) - self.list4.append(getConfigListEntry(_("- LCD 3 Night Reduction"), LCD4linux.StandbyNight3)) + if LCD4linux.LCDType2.value != "00": + self.list4.append(getConfigListEntry(_("- LCD 2 Background Color"), LCD4linux.StandbyLCDColor2)) + self.list4.append(getConfigListEntry(_("- LCD 2 Background-Picture [ok]>"), LCD4linux.StandbyLCDBild2)) + self.list4.append(getConfigListEntry(_("- LCD 2 Brightness"), LCD4linux.StandbyHelligkeit2)) + self.list4.append(getConfigListEntry(_("- LCD 2 Night Reduction"), LCD4linux.StandbyNight2)) + if LCD4linux.LCDType3.value != "00": + self.list4.append(getConfigListEntry(_("- LCD 3 Background Color"), LCD4linux.StandbyLCDColor3)) + self.list4.append(getConfigListEntry(_("- LCD 3 Background-Picture [ok]>"), LCD4linux.StandbyLCDBild3)) + self.list4.append(getConfigListEntry(_("- LCD 3 Brightness"), LCD4linux.StandbyHelligkeit3)) + self.list4.append(getConfigListEntry(_("- LCD 3 Night Reduction"), LCD4linux.StandbyNight3)) self.list4.append(getConfigListEntry(_("- Screens used for Changing"), LCD4linux.StandbyScreenMax)) self.list4.append(getConfigListEntry(_("Background"), LCD4linux.StandbyBackground1)) if LCD4linux.StandbyBackground1.value != "0": @@ -9829,7 +9833,7 @@ def downloadWetter(self, ort, wetter): feedurl = "http://api.weatherunlocked.com/api/current/%s,%s" % (self.Long[wetter], self.Lat[wetter]) L4logE("WU-getcurrentweather%s: %s" % (wetter, feedurl)) callInThread(boundFunction(getPage, feedurl, params=params), boundFunction(self.downloadWUcallback, wetter), self.downloadListError) - if "." in ort: # e.g. 'de.ZIPcode' + if "." in ort: # e.g. 'de.ZIPcode' feedurl = "http://api.weatherunlocked.com/api/forecast/%s" % city else: feedurl = "http://api.weatherunlocked.com/api/forecast/%s,%s" % (self.Long[wetter], self.Lat[wetter])