Skip to content

Commit

Permalink
Merge branch 'Developer' into Python3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
Ev0-BH committed Jan 27, 2024
2 parents 95a80d2 + 0219d00 commit 0bb477a
Show file tree
Hide file tree
Showing 20 changed files with 124 additions and 277 deletions.
9 changes: 8 additions & 1 deletion data/display480/skin_display.xml
Original file line number Diff line number Diff line change
Expand Up @@ -564,10 +564,17 @@
<widget name="Service" position="20,100" size="440,100" font="FdLcD;35" transparent="1" />
</screen>

<!-- NUMBERZAP -->
<!-- NUMBERZAP -->
<screen name="NumberZap_summary" position="0,0" size="480,320">
<widget source="parent.servicename_summary" render="Label" position="0,5" size="480,70" font="FdLcD;55" halign="center" valign="center" foregroundColor="white" />
<widget source="parent.number_summary" render="Label" position="10,100" size="480,80" foregroundColor="white" font="FdLcD;75" halign="center" valign="center" />
</screen>

<!-- Package manager -->
<screen name="PackageManagerSummary" position="fill">
<widget source="Title" render="Label" position="top" size="*,100" font="FdLcD;40" halign="center" valign="center" foregroundColor="yellow"/>
<widget source="parent.list" render="Label" position="fill" font="FdLcD;35" halign="center" valign="center">
<convert type="StringListSelection" />
</widget>
</screen>
</skin>
8 changes: 5 additions & 3 deletions lib/base/eerror.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,16 +144,18 @@ int formatTime(char *buf, int bufferSize, int flags)
if (!(flags & _DBGFLG_NOTIME)) {
if (debugTime & 1) {
clock_gettime(CLOCK_MONOTONIC, &tp);
pos += snprintf(buf, bufferSize, "<%6lu.%04lu> ", tp.tv_sec, tp.tv_nsec/100000);
/* Cast to (long long) is to cater for older 32-bit time fields */
pos += snprintf(buf, bufferSize, "<%6lld.%04lld> ", (long long)tp.tv_sec, (long long)tp.tv_nsec/100000);
}

if (debugTime & 2) {
struct tm loctime;
struct timeval tim;
gettimeofday(&tim, NULL);
localtime_r(&tim.tv_sec, &loctime);
pos += snprintf(buf + pos, bufferSize - pos, "%02d:%02d:%02d.%04lu ",
loctime.tm_hour, loctime.tm_min, loctime.tm_sec, tim.tv_usec / 100L);
/* Cast to (long long) is to cater for older 32-bit time fields */
pos += snprintf(buf + pos, bufferSize - pos, "%02d:%02d:%02d.%04lld ",
loctime.tm_hour, loctime.tm_min, loctime.tm_sec, (long long)tim.tv_usec / 100L);
}
}

Expand Down
10 changes: 5 additions & 5 deletions lib/python/Components/Addons/Pager.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ def __init__(self):
def onContainerShown(self):
# disable listboxes default scrollbars
if hasattr(self.source, "instance") and hasattr(self.source.instance, "setScrollbarMode"):
self.source.instance.setScrollbarMode(2)
self.source.instance.setScrollbarMode(eListbox.showNever)

if hasattr(self.source, "onSelectionChanged") and self.initPager not in self.source.onSelectionChanged:
self.source.onSelectionChanged.append(self.initPager)
if hasattr(self.source, "onSelChanged") and self.initPager not in self.source.onSelChanged:
self.source.onSelChanged.append(self.initPager)
onSelectionChanged = x if (x := getattr(self.source, "onSelectionChanged", None)) else getattr(self.source, "onSelChanged", None)

if isinstance(onSelectionChanged, list) and self.initPager not in onSelectionChanged:
onSelectionChanged.append(self.initPager)

self.initPager()

Expand Down
19 changes: 15 additions & 4 deletions lib/python/Components/EpgListGrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ def __init__(self, session, isInfobar, selChangedCB=None):
self.eventBorderWidth = 1
self.eventNamePadding = 3
self.serviceNumberWidth = 0
self.eventTextSidesMargin = 0

self.l.setBuildFunc(self.buildEntry)
self.loadConfig()
Expand Down Expand Up @@ -146,6 +147,9 @@ def applySkin(self, desktop, screen):
elif attrib == "EntryForegroundColorNowSelected":
self.foreColorNowSelected = parseColor(value).argb()

elif attrib == "EventTextSidesMargin":
self.eventTextSidesMargin = parseScale(value)

elif attrib == "ServiceBorderColor":
self.borderColorService = parseColor(value).argb()
elif attrib == "ServiceBorderWidth":
Expand Down Expand Up @@ -615,6 +619,10 @@ def buildEntry(self, service, serviceName, events, picon, channel):
pos=(left + xpos + self.eventBorderWidth, evY), size=(ewidth - 2 * self.eventBorderWidth, evH),
png=infoPix, flags=BT_ALIGN_CENTER))
else:
evW -= self.eventTextSidesMargin * 2
evX += self.eventTextSidesMargin
if evW < 0:
evW = 0
res.append(MultiContentEntryText(
pos=(evX, evY), size=(evW, evH),
font=1, flags=int(config.epgselection.grid.event_alignment.value),
Expand Down Expand Up @@ -655,16 +663,19 @@ def buildEntry(self, service, serviceName, events, picon, channel):
pix_size = timerIcon.size()
pix_width = pix_size.width()
pix_height = pix_size.height()
isTimerIconAdded = False
if config.epgselection.grid.rec_icon_height.value == "middle":
recIconHeight = top + (height - pix_height) // 2
elif config.epgselection.grid.rec_icon_height.value == "top":
recIconHeight = top + 3
else:
recIconHeight = top + height - pix_height - applySkinFactor(5)
recIconHeight = top + height - pix_height - 10
if matchType == 0:
pos = (left + xpos + ewidth - pix_width - applySkinFactor(5), recIconHeight)
pos = (left + xpos + ewidth - pix_width - 10, recIconHeight)
isTimerIconAdded = True
else:
pos = (left + xpos + ewidth - pix_width - applySkinFactor(5), recIconHeight)
pos = (left + xpos + ewidth - pix_width - 10, recIconHeight)
isTimerIconAdded = True
res.append(MultiContentEntryPixmapAlphaBlend(
pos=pos, size=(pix_width, pix_height),
png=timerIcon))
Expand All @@ -673,7 +684,7 @@ def buildEntry(self, service, serviceName, events, picon, channel):
pix_width = pix_size.width()
pix_height = pix_size.height()
res.append(MultiContentEntryPixmapAlphaBlend(
pos=(pos[0] - pix_width - applySkinFactor(5), pos[1]), size=(pix_width, pix_height),
pos=(pos[0] - pix_width - (5 if isTimerIconAdded else 10), pos[1]), size=(pix_width, pix_height),
png=autoTimerIcon))
return res

Expand Down
7 changes: 4 additions & 3 deletions lib/python/Components/EpgListSingle.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,14 @@ def buildEntry(self, service, eventId, beginTime, duration, eventName):
pix_width = pix_size.width()
pix_height = pix_size.height()
eventW -= pix_width
res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHABLEND, r3.left() + r3.width() - pix_width, (r3.height() - pix_height) // 2, pix_width, pix_height, timerIcon))
posX = r3.left() + r3.width() - pix_width
res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHABLEND, posX, (r3.height() - pix_height) // 2, pix_width, pix_height, timerIcon))
if autoTimerIcon:
pix_size = autoTimerIcon.size()
pix_width = pix_size.width()
pix_height = pix_size.height()
eventW -= pix_width
res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHABLEND, r3.left() + r3.width() - pix_width * 2 - 10, (r3.height() - pix_height) // 2, pix_width, pix_height, autoTimerIcon))
eventW -= pix_width + 6
res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHABLEND, posX - pix_width - 6, (r3.height() - pix_height) // 2, pix_width, pix_height, autoTimerIcon))
res.append((eListboxPythonMultiContent.TYPE_TEXT, r3.left(), r3.top(), eventW, r3.height(), 0, RT_HALIGN_LEFT | RT_VALIGN_CENTER, eventName))
return res

Expand Down
3 changes: 1 addition & 2 deletions lib/python/Plugins/SystemPlugins/OBH/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ SUBDIRS = images

install_PYTHON = *.py

install_DATA = *.png \
*.xml \
install_DATA = *.xml \
LICENSE \
maintainer.info
Loading

0 comments on commit 0bb477a

Please sign in to comment.