Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions lcd4linux/src/myFileList.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand All @@ -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):
Expand Down
42 changes: 23 additions & 19 deletions lcd4linux/src/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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":
Expand Down Expand Up @@ -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])
Expand Down
Loading