Skip to content

Commit

Permalink
Addition of PiP function (#1682)
Browse files Browse the repository at this point in the history
  • Loading branch information
alec-cs authored Jun 7, 2020
1 parent 6bba771 commit 73e840f
Show file tree
Hide file tree
Showing 11 changed files with 2,026 additions and 3,005 deletions.
5 changes: 3 additions & 2 deletions data/menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@
<!-- Menu / Settings / GUI / Display-->
<item weight="0" level="0" entryID="user_interface"><setup id="userinterface" /></item>
<item weight="5" level="0" entryID="remote_setup"><setup id="remotesetup"/></item>
<item weight="10" level="0" entryID="channelselection_setup"><setup id="channelselection" /></item>
<item weight="15" level="0" entryID="usage_setup"><setup id="usage" /></item>
<item weight="10" level="0" entryID="pip_setup" requires="PIPAvailable"><setup id="pipsetup"/></item>
<item weight="15" level="0" entryID="channelselection_setup"><setup id="channelselection" /></item>
<item weight="20" level="0" entryID="usage_setup"><setup id="usage" /></item>
<!--item weight="20" level="0" entryID="specialfeatures_menu"><setup id="specialfeatures" /></item-->
<item weight="25" level="0" text="Skin Setup" entryID="skin_setup"><screen module="SkinSelector" screen="SkinSelector"/></item>
<menu weight="30" level="0" text="STB Display" entryID="display_selection" requires="Display">
Expand Down
6 changes: 5 additions & 1 deletion data/setup.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,15 @@
<item level="2" text="Show VCR scart on main menu" description="When enabled, the VCR scart option will be shown on the main menu" requires="ScartSwitch">config.usage.show_vcr_scart</item>
<item level="2" text="Show True/False as graphical switch" description="Enable to display all true/false, yes/no, on/off and enable/disable set up options as a graphical switch.">config.usage.boolean_graphic</item>
<item level="2" text="Show additional slider value" description="Enable the current value of the slider at end of the slider bar.">config.usage.show_slider_value</item>
</setup>
<setup key="pipsetup" title="PiP settings">
<item level="2" text="PiP mode" description="Choose what you want the PIP mode how to works." requires="PIPAvailable">config.usage.pip_mode</item>
<item level="2" text="Ads filtering mode be default" description="After this time, the Ads filtering mode should be the default set mode." requires="PIPAvailable">config.usage.noadspip_default_mode_time</item>
<item level="1" text="Color first in Extensions list" description="This option allows you to place the colored buttons (red, green, yellow, blue) to the first in the Extensions list.">config.usage.colored_first_extensionslist</item>
<item level="2" text="Close PiP on exit" description="When enabled the PiP can be closed by the exit button." requires="PIPAvailable">config.usage.pip_hideOnExit</item>
<item level="1" text="Behavior of 0 key in PiP-mode" description="Choose what you want the button '0' to do when PIP is active." requires="PIPAvailable">config.usage.pip_zero_button</item>
<item level="2" text="Remember last service in PiP" description="Configure if and how long the latest service in the PiP will be remembered." requires="PIPAvailable">config.usage.pip_last_service_timeout</item>
<item level="1" text="Behavior of 0 key in PiP-mode" description="Choose what you want the button '0' to do when PIP is active." requires="PIPAvailable">config.usage.pip_zero_button</item>
<item level="2" text="PiP size and position save" description="Select the mode in which the position and size are saved. Changing the position and size is only possible when using the Standard usage mode!" requires="PIPAvailable">config.usage.pip_position_size_save</item>
</setup>
<setup key="channelselection" title="Channel selection settings">
<item level="0" text="Include CI assignment" description="Set CI assignment for detection of available services.">config.misc.use_ci_assignment</item>
Expand Down
10 changes: 7 additions & 3 deletions lib/python/Components/UsageConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,21 +234,25 @@ def showsecondinfobarChanged(configElement):
config.usage.hdd_timer = ConfigYesNo(default = False)
config.usage.output_12V = ConfigSelection(default = "do not change", choices = [
("do not change", _("Do not change")), ("off", _("Off")), ("on", _("On")) ])

config.usage.pip_mode = ConfigSelection(default = "standard", choices = [
("standard", _("Standard")), ("noadspip", _("Ads filtering mode")), ("byside", _("Side by side mode")) ])

config.usage.noadspip_default_mode_time = ConfigSelection(default = "180", choices = [
("0", _("Setting by user")), ("180", _("After 3 minutes")), ("300", _("After 5 minutes")), ("1800", _("After 30 minutes")) ])
config.usage.pip_lastusage = ConfigInteger(default = int(time()))
config.usage.pip_zero_button = ConfigSelection(default = "standard", choices = [
config.usage.pip_position_size_save = ConfigSelection(default = "standard", choices = [
("standard", _("Only Standard")), ("standard and noadspip", _("Standard and Ads filtering mode")) ])
config.usage.pip_zero_button = ConfigSelection(default = "swap", choices = [
("standard", _("Standard")), ("swap", _("Swap PiP and main picture")),
("swapstop", _("Move PiP to main picture")), ("stop", _("Stop PiP")) ])
config.usage.pip_hideOnExit = ConfigSelection(default = "no", choices = [
config.usage.pip_hideOnExit = ConfigSelection(default = "without popup", choices = [
("no", _("No")), ("popup", _("With popup")), ("without popup", _("Without popup")) ])
choicelist = [("-1", _("Disabled")), ("0", _("No timeout"))]
for i in [60, 300, 600, 900, 1800, 2700, 3600]:
m = i/60
choicelist.append(("%d" % i, ngettext("%d minute", "%d minutes", m) % m))
config.usage.pip_last_service_timeout = ConfigSelection(default = "-1", choices = choicelist)
config.usage.pip_last_service_timeout = ConfigSelection(default = "0", choices = choicelist)
if not os.path.exists(resolveFilename(SCOPE_HDD)):
try:
os.mkdir(resolveFilename(SCOPE_HDD),0755)
Expand Down
Loading

0 comments on commit 73e840f

Please sign in to comment.