Skip to content

Commit

Permalink
Merge branch 'master' into Janitor
Browse files Browse the repository at this point in the history
* master:
  [setup.xml] * prepare new ServiceList settings
  [skin] * improve load skinTemplates
  [Multicontent] * add borderColor/borderColorSelected for progress
  Change the order of Screen and ConfigListScreen to fix multiple inheritance priority for the summary screens
  [EpgSelection] * fix position after bouquet change for graph epg
  [ServiceList] * prepare upcoming new service list
  [MediaPlayer] add stream extention
  [MultiContentTemplateParser] * remove debug
  [skin] * rename excludeItemValues / includeItemValues because the value attribute is not needed and will be replaced by index
  [drawing] * update license
  [MultiBoot.py] Update coding style
  • Loading branch information
jbleyel committed Jul 7, 2024
2 parents 37f0e8c + dc6b040 commit 69b73d2
Show file tree
Hide file tree
Showing 29 changed files with 182 additions and 119 deletions.
56 changes: 34 additions & 22 deletions data/setup.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,15 @@
<item level="0" text="CI Boot Delay" description="Set CI Boot delay.">config.cimisc.bootDelay</item>
</setup>
<setup key="ChannelSelection" title="Channel Selection Settings" showOpenWebif="1">
<item level="0" text="Style" description="Set the style of the channel list.">config.channelSelection.style</item>
<item level="0" text="Include CI assignment" description="Set CI assignment for detection of available services.">config.misc.use_ci_assignment</item>
<item level="1" text="Alternative numbering mode" description="When enabled, channel numbering will start at '1' for each bouquet.">config.usage.alternative_number_mode</item>
<item level="1" text="Always show bouquets" description="Select 'Yes' to always show the bouquet screen first when opening the channel list. Select 'No' to open the channel list using the current bouquet.">config.usage.show_bouquetalways</item>
<item level="1" text="Change bouquets in quickzap" description="When enabled, continue to the next bouquet when the last channel of the current bouquet is reached while changing channels.">config.usage.quickzap_bouquet_change</item>
<item level="1" text="Channel list preview" description="Select 'Yes' to enable preview of channels while in the EPG list. Press 'OK' to preview the currently selected channel. Press 'OK' again to exit the EPG and zap to the selected channel. Press 'EXIT' to exit the EPG and return to the previously selected channel.">config.usage.servicelistpreview_mode</item>
<item level="1" text="Channel list show MiniTV*" description="Channel list show MiniTV when Skin use.">config.usage.use_pig</item>
<item level="1" text="Channel list service mode*" description="This option allows you to choose from the two channel lists that are available." requires="!config.usage.use_pig">config.usage.servicelist_mode</item>
<if conditional="config.channelSelection.screenStyle.value == ''">
<item level="1" text="Channel list show MiniTV*" description="Channel list show MiniTV when Skin use.">config.usage.use_pig</item>
<item level="1" text="Channel list service mode*" description="This option allows you to choose from the two channel lists that are available." requires="!config.usage.use_pig">config.usage.servicelist_mode</item>
</if>
<item level="1" text="Channel list on mode change" description="Select 'Yes' to show the channel list after switching between Radio and TV modes.">config.usage.show_servicelist</item>
<item level="1" text="Channel list cursor behavior" description="Configure the cursor behavior in the channel selection list. When opening the channel selection list you can remain on the current service or already select up/down and you are able to revert the B+/B- buttons.">config.usage.servicelist_cursor_behavior</item>
<item level="1" text="Enable multiple bouquets" description="Services may be grouped in bouquets. When enabled, you can use more than one bouquet.">config.usage.multibouquet</item>
Expand All @@ -92,25 +93,34 @@
<item level="1" text="Panic channel" description="Pressing the panic button will zap you to this channel number in your first bouquet.">config.usage.panicchannel</item>
<item level="2" text="show picons in quickzap" description="Configure if service picons will be shown in quickzap.">config.usage.numzappicon</item>
<item level="1" text="Jump first press in channel selection" description="This option allows you to choose what the first button press jumps to in channel list screen, (so pressing '2' jumps to 'A' or '2' first), when 'Quick Actions' preset actions are performed. ">config.usage.show_channel_jump_in_servicelist</item>
<item level="1" text="show picons in service list" description="Configure if service picons will be shown in the service list.">config.usage.service_icon_enable</item>
<item level="1" text="Service picons aspect ratio" description="Set the aspect ratio of the service picons." requires="config.usage.service_icon_enable">config.usage.servicelist_picon_ratio</item>
<item level="1" text="Service picons downsize" description="Reduce the size of the service picons for more line spacing between them." requires="config.usage.service_icon_enable">config.usage.servicelist_picon_downsize</item>
<item level="1" text="Show service type icons" description="Configure if and how service type icons will be shown.">config.usage.servicetype_icon_mode</item>
<item level="1" text="Show crypto icons" description="Configure if and how crypto icons will be shown in the channel selection list.">config.usage.crypto_icon_mode</item>
<item level="1" text="Show record indicator" description="Configure if and how the record indicator will be shown in the channel selection list.">config.usage.record_indicator_mode</item>
<item level="1" text="Show two lines per entry" description="Show service name and event description among each other instead of side by side. After a change, an adjustment of the number of lines is required.">config.usage.servicelist_twolines</item>
<item level="1" text="Alignment channel number" description="Vertical alignment for the service number." requires="config.usage.servicelist_twolines">config.usage.servicelist_servicenumber_valign</item>
<item level="1" text="Alignment event-progress" description="Vertical alignment for the event-progress." requires="config.usage.servicelist_twolines">config.usage.servicelist_eventprogress_valign</item>
<item level="0" text="Show channel numbers in channel selection" description="When enabled, show channel numbers in the channel selection screen.">config.usage.show_channel_numbers_in_servicelist</item>
<item level="1" text="Show event-progress in channel selection" description="Set the type of the progress indication in the channel selection screen." requires="config.usage.servicelist_twolines">config.usage.servicelist_eventprogress_view_mode</item>
<item level="0" text="Show event-progress in channel selection" description="Set the type of the progress indication in the channel selection screen." requires="!config.usage.servicelist_twolines">config.usage.show_event_progress_in_servicelist</item>
<item level="1" text="Show columns" description="Configure if and how wide the service name column will be shown in the channel selection list." requires="!config.usage.servicelist_twolines">config.usage.servicelist_column</item>
<item level="1" text="Number of rows" description="This allows you change the number of rows shown." requires="config.usage.servicelist_twolines">config.usage.serviceitems_per_page_twolines</item>
<item level="1" text="Number of rows" description="This allows you change the number of rows shown." requires="!config.usage.servicelist_twolines">config.usage.serviceitems_per_page</item>
<item level="1" text="Service number font size" description="This allows you change the font size relative to skin size, so 1 increases by 1 point size, and -1 decreases by 1 point size.">config.usage.servicenum_fontsize</item>
<item level="1" text="Service name font size" description="This allows you change the font size relative to skin size, so 1 increases by 1 point size, and -1 decreases by 1 point size.">config.usage.servicename_fontsize</item>
<item level="1" text="Service info font size" description="This allows you change the font size relative to skin size, so 1 increases by 1 point size, and -1 decreases by 1 point size.">config.usage.serviceinfo_fontsize</item>
<item level="1" text="Progress info font size" description="This allows you change the font size relative to skin size, so 1 increases by 1 point size, and -1 decreases by 1 point size.">config.usage.progressinfo_fontsize</item>
<if conditional="config.channelSelection.screenStyle.value == ''">
<item level="0" text="Show channel numbers in channel selection" description="When enabled, show channel numbers in the channel selection screen.">config.usage.show_channel_numbers_in_servicelist</item>
<item level="1" text="show picons in service list" description="Configure if service picons will be shown in the service list.">config.usage.service_icon_enable</item>
<item level="1" text="Service picons aspect ratio" description="Set the aspect ratio of the service picons." requires="config.usage.service_icon_enable">config.usage.servicelist_picon_ratio</item>
<item level="1" text="Service picons downsize" description="Reduce the size of the service picons for more line spacing between them." requires="config.usage.service_icon_enable">config.usage.servicelist_picon_downsize</item>
<item level="1" text="Show service type icons" description="Configure if and how service type icons will be shown.">config.usage.servicetype_icon_mode</item>
<item level="1" text="Show crypto icons" description="Configure if and how crypto icons will be shown in the channel selection list.">config.usage.crypto_icon_mode</item>
<item level="1" text="Show record indicator" description="Configure if and how the record indicator will be shown in the channel selection list.">config.usage.record_indicator_mode</item>
<item level="1" text="Show two lines per entry" description="Show service name and event description among each other instead of side by side. After a change, an adjustment of the number of lines is required.">config.usage.servicelist_twolines</item>
<item level="1" text="Alignment channel number" description="Vertical alignment for the service number." requires="config.usage.servicelist_twolines">config.usage.servicelist_servicenumber_valign</item>
<item level="1" text="Alignment event-progress" description="Vertical alignment for the event-progress." requires="config.usage.servicelist_twolines">config.usage.servicelist_eventprogress_valign</item>
<item level="1" text="Show event-progress in channel selection" description="Set the type of the progress indication in the channel selection screen." requires="config.usage.servicelist_twolines">config.usage.servicelist_eventprogress_view_mode</item>
<item level="0" text="Show event-progress in channel selection" description="Set the type of the progress indication in the channel selection screen." requires="!config.usage.servicelist_twolines">config.usage.show_event_progress_in_servicelist</item>
<item level="1" text="Show columns" description="Configure if and how wide the service name column will be shown in the channel selection list." requires="!config.usage.servicelist_twolines">config.usage.servicelist_column</item>
<item level="1" text="Number of rows" description="This allows you change the number of rows shown." requires="config.usage.servicelist_twolines">config.usage.serviceitems_per_page_twolines</item>
<item level="1" text="Number of rows" description="This allows you change the number of rows shown." requires="!config.usage.servicelist_twolines">config.usage.serviceitems_per_page</item>
<item level="1" text="Service number font size" description="This allows you change the font size relative to skin size, so 1 increases by 1 point size, and -1 decreases by 1 point size.">config.usage.servicenum_fontsize</item>
<item level="1" text="Service name font size" description="This allows you change the font size relative to skin size, so 1 increases by 1 point size, and -1 decreases by 1 point size.">config.usage.servicename_fontsize</item>
<item level="1" text="Service info font size" description="This allows you change the font size relative to skin size, so 1 increases by 1 point size, and -1 decreases by 1 point size.">config.usage.serviceinfo_fontsize</item>
<item level="1" text="Progress info font size" description="This allows you change the font size relative to skin size, so 1 increases by 1 point size, and -1 decreases by 1 point size.">config.usage.progressinfo_fontsize</item>
<else />
<item level="0" text="Show channel numbers in channel selection" description="When enabled, show channel numbers in the channel selection screen.">config.channelSelection.showNumber</item>
<item level="1" text="Show LCN in channel selection" description="When enabled, show LCN in the channel selection screen.">config.channelSelection.showLCN</item>
<item level="1" text="show picons in service list" description="Configure if service picons will be shown in the service list.">config.channelSelection.showPicon</item>
<item level="1" text="Show service type icons" description="Configure if service type icons will be shown.">config.channelSelection.showServiceTypeIcon</item>
<item level="1" text="Show crypto icons" description="Configure if crypto icons will be shown in the channel selection list.">config.channelSelection.showCryptoIcon</item>
<item level="1" text="Show record indicator" description="Configure if and how the record indicator will be shown in the channel selection list.">config.channelSelection.recordIndicatorMode</item>
</if>
<item level="1" text="Zap mode" description="Setup how to control the channel changing." requires="ZapMode">config.misc.zapmode</item>
<item level="2" text="Channel zap delay mode" description="Setup delay mode to zap to channels.">config.usage.numzaptimeoutmode</item>
<item level="2" text="Channel zap delay first button" description="User defined delay when you press the first button to zap to the channel." requires="config.usage.numzaptimeoutmode" value="userdefined">config.usage.numzaptimeout1</item>
Expand Down Expand Up @@ -823,6 +833,8 @@
<item text="GUI Skin *" description="Choose the skin to be used for the GUI interface. Press 'GREEN' to activate the skin.">config.skin.guiSkin</item>
<item text="LCD/Front panel *" description="Choose the skin to be used for the LCD/front panel interface. Press 'GREEN' to activate the skin." requires="LCDSKINSetup">config.skin.lcdSkin</item>
<item text="Fallback Font *" description="Choose the fallback font.">config.skin.FallbackFont</item>
<item text="Channel Selection Screen" description="Select the screen layout, from the options provided by the skin, to be used for the ChannelSelection screen." conditional="len(config.channelSelection.screenStyle.choices) > 1">config.channelSelection.screenStyle</item>
<item text="Channel Selection List" description="Select the layout of the information in the services list, from the options provided by the skin, displayed within the ChannelSelection screen." conditional="config.channelSelection.screenStyle.value">config.channelSelection.widgetStyle</item>
</setup>
<setup key="SleepTimer" title="SleepTimer Settings" showOpenWebif="1">
<item text="SleepTimer activation delay" description="Configure the duration, in minutes, before the SleepTimer activates.">config.usage.sleepTimer</item>
Expand Down
2 changes: 1 addition & 1 deletion lib/gdi/drawing.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
Copyright (c) 2023-2024 openATV
Copyright (c) 2023-2024 zKhadiri, jbleyel, openATV
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion lib/gdi/drawing.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
Copyright (c) 2023-2024 openATV
Copyright (c) 2023-2024 zKhadiri, jbleyel, openATV
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
34 changes: 31 additions & 3 deletions lib/gui/elistboxcontent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1782,14 +1782,14 @@ void eListboxPythonMultiContent::paint(gPainter &painter, eWindowStyle &style, c
pheight = PyTuple_GET_ITEM(item, 4),
pfilled_perc = PyTuple_GET_ITEM(item, 5),
ppixmap, pborderWidth, pforeColor, pforeColorSelected, pbackColor, pbackColorSelected,
pstartColor, pmidColor, pendColor, pstartColorSelected, pmidColorSelected, pendColorSelected;
pstartColor, pmidColor, pendColor, pstartColorSelected, pmidColorSelected, pendColorSelected, pborderColor, pborderColorSelected;

int idx = 6;
if (type == TYPE_PROGRESS)
{
if (!(px && py && pwidth && pheight && pfilled_perc))
{
eDebug("[eListboxPythonMultiContent] tuple too small (must be (TYPE_PROGRESS, x, y, width, height, filled percent [, borderWidth, color, colorSelected, backColor, backColorSelected]))");
eDebug("[eListboxPythonMultiContent] tuple too small (must be (TYPE_PROGRESS, x, y, width, height, filled percent [, borderWidth, color, colorSelected, backColor, backColorSelected, borderColor, borderColorSelected]))");
goto error_out;
}
}
Expand All @@ -1800,7 +1800,7 @@ void eListboxPythonMultiContent::paint(gPainter &painter, eWindowStyle &style, c
continue;
if (!(px && py && pwidth && pheight && pfilled_perc, ppixmap))
{
eDebug("[eListboxPythonMultiContent] tuple too small (must be (TYPE_PROGRESS_PIXMAP, x, y, width, height, filled percent, pixmap, [,borderWidth, color, colorSelected, backColor, backColorSelected]))");
eDebug("[eListboxPythonMultiContent] tuple too small (must be (TYPE_PROGRESS_PIXMAP, x, y, width, height, filled percent, pixmap, [,borderWidth, color, colorSelected, backColor, backColorSelected, borderColor, borderColorSelected]))");
goto error_out;
}
}
Expand Down Expand Up @@ -1836,6 +1836,12 @@ void eListboxPythonMultiContent::paint(gPainter &painter, eWindowStyle &style, c
pbackColorSelected = ePyObject();
}

if (size > idx)
pborderColor = lookupColor(PyTuple_GET_ITEM(item, idx++), data);

if (size > idx)
pborderColorSelected = lookupColor(PyTuple_GET_ITEM(item, idx++), data);

int radius = 0;
int edges = 0;

Expand Down Expand Up @@ -1966,6 +1972,11 @@ void eListboxPythonMultiContent::paint(gPainter &painter, eWindowStyle &style, c
}
else
{
if (pborderColor) {
uint32_t color = PyLong_AsUnsignedLongMask((selected && pborderColorSelected) ? pborderColorSelected : pborderColor);
painter.setForegroundColor(gRGB(color));
}

rect.setRect(x, y, width, bwidth);
painter.fill(rect);

Expand All @@ -1977,6 +1988,23 @@ void eListboxPythonMultiContent::paint(gPainter &painter, eWindowStyle &style, c

rect.setRect(x + width - bwidth, y + bwidth, bwidth, height - bwidth);
painter.fill(rect);

if (pborderColor) {
if (selected && pforeColorSelected)
{
uint32_t color = PyLong_AsUnsignedLongMask(pforeColorSelected);
painter.setForegroundColor(gRGB(color));
}
else if (pforeColor)
{
uint32_t color = PyLong_AsUnsignedLongMask(pforeColor);
painter.setForegroundColor(gRGB(color));
}
else
{
painter.setForegroundColor(defaultForeColor);
}
}
}
}

Expand Down
5 changes: 2 additions & 3 deletions lib/python/Components/Converter/XmlMultiContent.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def parseTemplateModes(template):
context = SkinContext(context, "0,0", f"{itemWidth},{itemHeight}")
for element in list(mode):
processor = self.processors.get(element.tag, self.processNone)
newItems = processor(element, context, excludeItemValues=[], includeItemValues=[])
newItems = processor(element, context)
if newItems:
items += newItems
newItems = []
Expand Down Expand Up @@ -129,8 +129,7 @@ class XmlMultiContent(StringList, MultiContentTemplateParser):

def __init__(self, args):
StringList.__init__(self, args)
self.debug = True
MultiContentTemplateParser.__init__(self, self.debug)
MultiContentTemplateParser.__init__(self)
self.activeStyle = None
self.activeTemplate = "Default" # This value string is used in the UI.
self.dom = args.get("dom")
Expand Down
Loading

0 comments on commit 69b73d2

Please sign in to comment.