Skip to content

Commit

Permalink
Merge OpenViX
Browse files Browse the repository at this point in the history
  • Loading branch information
Ev0-BH committed Sep 10, 2023
2 parents 65e8af9 + 9bf11b1 commit 2da83c4
Show file tree
Hide file tree
Showing 18 changed files with 404 additions and 382 deletions.
274 changes: 121 additions & 153 deletions data/menu.xml

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions data/menuorder.bh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ youtubetv 7
youtube_tv 8
#System Menu
bluetooth_setup 1
remotecontrolcode 50
iptv_config 16
remotecontrolcode 10
remotecontrolselection 11
iptv_config 20
#Menu Service searching
cablescan 25
#User interface Menu
Expand Down
114 changes: 57 additions & 57 deletions data/recovery.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,77 +16,77 @@
-->

<!-- Main Menu -->
<menu entryID="main_menu" level="0" text="Main Menu">
<id val="mainmenu" />
<menu key="mainmenu" level="0" text="Main Menu">

<!-- Menu / Multiboot Selector -->
<menu entryID="multiboot" text="Multiboot Selector" level="0" weight="1">
<id val="multiboot" />
<item entryID="multiboot" level="0" text="MultiBoot Image Selector" requires="canMultiBoot"><screen module="MultiBootSelector" screen="MultiBootSelector">1</screen></item>
<!-- Menu / MultiBoot Image Selector -->
<menu key="recovery_multiboot" level="0" text="MultiBoot Image Selector" weight="1">

<item key="multiboot" level="0" text="MultiBoot Image Selector" requires="canMultiBoot"><screen module="MultiBootSelector" screen="MultiBootSelector">1</screen></item>
</menu>

<!-- Menu / Image Manager -->
<item entryID="image" level="0" text="Image Manager" weight="2">
<code>
<!-- Menu / Image Manager -->
<item key="image" level="0" text="Image Manager" weight="2">
<code>
from Plugins.SystemPlugins.OBH.ImageManager import OpenBhImageManager
self.session.open(OpenBhImageManager)
</code>
</item>
</code>
</item>

<!-- Menu / Information -->
<menu entryID="info_screen" level="0" text="Information" weight="98">
<id val="information" />
<item entryID="about_screen" level="0" text="About"><screen module="About" screen="About" /></item>
<item entryID="device_screen" level="0" text="Devices"><screen module="About" screen="Devices" /></item>
<item entryID="memory_screen" level="0" text="Memory"><screen module="About" screen="SystemMemoryInfo" /></item>
<item entryID="network_screen" level="0" text="Network"><screen module="About" screen="SystemNetworkInfo" /></item>
<item entryID="boxinfo_screen" level="0" text="BoxInfo"><screen module="AboutBoxInfo" screen="AboutBoxInfo" /></item>
</menu>
<!-- Menu / Other -->
<menu key="recovery_other" level="0" text="Other" weight="2">

<!-- Menu / Settings -->
<menu entryID="settings" level="0" text="Settings" flushConfigOnClose="1" weight="97">
<id val="settings" />
<!-- Menu / Setup -->
<menu key="setup" level="0" text="Setup" flushConfigOnClose="1" weight="1">

<!-- Menu / Setup / User Interface -->
<menu key="gui_menu" level="0" text="User Interface" weight="4">
<item key="language_setup" level="0" text="Language" weight="9"><screen module="LanguageSelection" /></item>
</menu>

<!-- Menu / Setup / Network -->
<menu entryID="network_menu" level="0" text="Network" weight="6">
<id val="network" />
<item entryID="device_setup" level="0" text="Device" weight="1"><screen module="NetworkSetup" screen="NetworkAdapterSelection" /></item>
<item entryID="password_setup" level="0" text="Password"><screen module="NetworkSetup" screen="NetworkPassword" /></item>
</menu>
<!-- Menu / Setup / Network -->
<menu key="network" level="0" text="Network" weight="5">
<item key="device_setup" level="0" text="Device" weight="1"><screen module="NetworkSetup" screen="NetworkAdapterSelection" /></item>
<item key="password_setup" level="2" text="Password"><screen module="NetworkSetup" screen="NetworkPassword" /></item>
</menu>
<!-- Menu / Setup / Storage -->
<menu key="harddisk" level="0" text="Storage" weight="10" requires="Harddisk">
<item key="harddisk_init" level="0" text="Initialize Devices"><screen module="HarddiskSetup" screen="HarddiskSelection" /></item>
<item key="harddisk_check" level="0" text="Filesystem Check"><screen module="HarddiskSetup" screen="HarddiskFsckSelection" /></item>
</menu>

<!-- Menu / Setup / Storage -->
<menu entryID="hardisk_selection" level="0" text="Storage" weight="10" requires="Harddisk">
<id val="harddisk" />
<item entryID="harddisk_init" level="0" text="Initialize Devices"><screen module="HarddiskSetup" screen="HarddiskSelection" /></item>
<item entryID="harddisk_check" level="0" text="Filesystem Check"><screen module="HarddiskSetup" screen="HarddiskFsckSelection" /></item>
<!-- Menu / Setup / System -->
<menu key="system" level="0" text="System" weight="98">
<menu key="logs_menu" level="2" text="Logs" weight="2">
<item key="logs_setup" level="2" text="Settings"><setup id="logs" /></item>
<item key="logs_man" level="2" text="Log Manager"><screen module="LogManager" screen="LogManager" /></item>
</menu>
<!-- Menu / Software Update -->
<menu weight="3" level="0" text="Software Update" key="softwareupdatemenu">
<item key="onlineupdate_setup" level="0" text="Settings" weight="1"><setup id="softwareupdate"/></item>
<item key="software_update" level="0" text="Software Update" weight="2"><screen module="SoftwareUpdate" screen="UpdatePlugin"/></item>
</menu>
</menu>
</menu>

<!-- Menu / Setup / Time Settings -->
<item entryID="time_setup" level="0" text="Time" weight="12"><screen module="Time" screen="Time" /></item>

<!-- Menu / Setup / Language -->
<menu entryID="gui_setup" level="0" text="Language" weight="4">
<id val="gui_menu" />
<item entryID="language_setup" level="0" text="Language" weight="9"><screen module="LanguageSelection" /></item>
<!-- Menu / Information -->
<menu key="information" level="0" text="Information" weight="6">
<item key="about_screen" level="0" text="About"><screen module="About" screen="About" /></item>
<item key="device_screen" level="0" text="Devices"><screen module="About" screen="Devices" /></item>
<item key="memory_screen" level="0" text="Memory"><screen module="About" screen="SystemMemoryInfo" /></item>
<item key="network_screen" level="0" text="Network"><screen module="About" screen="SystemNetworkInfo" /></item>
<item key="boxinfo_screen" level="2" text="BoxInfo"><screen module="AboutBoxInfo" screen="AboutBoxInfo" /></item>
</menu>

<!-- Menu / Setup / System -->
<menu entryID="system_selection" level="0" text="System" weight="98">
<id val="system" />
<menu entryID="logs_setup" level="0" text="Logs" weight="2">
<id val="logs_menu" />
<item entryID="logs_setup" level="0" text="Settings"><setup id="logs" /></item>
<item entryID="logs_man" level="0" text="Log Manager"><screen module="LogManager" screen="LogManager" /></item>
</menu>

<!-- Menu / Setup / System / Software Update -->
<menu weight="3" level="0" text="Software update" entryID="software_update">
<id val="softwareupdatemenu"/>
<item entryID="onlineupdate_setup" level="0" text="Settings" weight="1"><setup id="softwareupdate"/></item>
<item entryID="software_update" level="0" text="Online update" weight="2"><screen module="SoftwareUpdate" screen="UpdatePlugin"/></item>
</menu>
<item entryID="factory_reset" level="0" text="Factory Reset" weight="99"><screen module="FactoryReset" screen="FactoryReset" /></item>
<!-- Menu / Standby and Restart -->
<menu key="shutdown" text="Standby &amp; Restart" weight="99">
<item key="standby" level="0" text="Standby"><screen module="Standby" screen="Standby" /></item>
<item key="deep_standby" level="0" text="Deep Standby" requires="DeepstandbySupport"><screen module="Standby" screen="TryQuitMainloop">1</screen></item>
<item key="deep_standby" level="0" text="Shut Down" requires="!DeepstandbySupport"><screen module="Standby" screen="TryQuitMainloop">1</screen></item>
<item key="multiboot" level="0" text="MultiBoot Image Selector" requires="canMultiBoot"><screen module="MultiBootSelector" screen="MultiBootSelector">1</screen></item>
<item key="android_mode" level="0" text="Android Mode" requires="AndroidMode"><screen module="Standby" screen="TryQuitMainloop">12</screen></item>
<item key="H9SDswap" level="0" text="H9SDroot" requires="HasH9SD"><screen module="H9SDswap" screen="H9SDswap">1</screen></item>
<item key="restart" level="0" text="Reboot"><screen module="Standby" screen="TryQuitMainloop">2</screen></item>
<item key="restart_enigma" level="0" text="Restart Enigma2"><screen module="Standby" screen="TryQuitMainloop">3</screen></item>
</menu>
</menu>
</menu>
84 changes: 84 additions & 0 deletions doc/MENU
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
Adding a menu image that identifies the current menu screen based on menuID
===========================================================================

In skin.xml add the list of images to the "menus" section based on menuID.

Syntax:

<menus>
<menu key="default" image="path/myNameForDefault.png" />
<menu key="<menuID>" image="path/myNameFor<menuID>.png" />
</menus>

This element is optional but if defined allows a skin designer to associate
a graphical image with any "Screens/Menu.py" based screen. The "menus"
tag element has no attributes and contains a list of "menu" tag elements.

Each "menu" tag element must contain two attributes:

key This attribute is the value of the "key" attribute from a
menu.xml file. If the keys match then this entry defines
a graphical image that is to be used when the nominated
Setup screen is displayed.

image This attribute is the pathname of the graphical image that
is to be associated with the Menu screen identified by the
"key" attribute.

There is a special "key" attribute with the name "default". This entry,
if defined, assigns a default graphical image to be used in ALL
"Screens/Setup.py" screens that do not have a specifically assigned
image.


In skin.xml add the widget to MainMenu and Menu screens:
<screen name="MainMenu" ... >
...
<widget name="menuimage" position="0,50" size="200,400" alphatest="blend" conditional="menuimage" transparent="1" />
...
</screen>
<screen name="Menu" ... >
...
<widget name="menuimage" position="0,50" size="200,400" alphatest="blend" conditional="menuimage" transparent="1" />
...
</screen>


Adding icons to the menu list entries
=====================================

In skin.xml add enable parameter:
<parameter name="MenuIcons" value="1" />


In skin.xml add the icon size parameter:
<parameter name="MenuIconsSize" value="48" />


The graphics for the menu icons are stored in:
/usr/share/enigma2/<current_skin>/menu


The icon graphics can be svg or png format and are named as follows:
<entryID>.png or <entryID>.svg


<entryID> is the entryID from menu.xml, e.g.
<menu entryID="av_setup" level="0" text="Audio &amp; Video" weight="1">


In the above case the graphic name would be:
av_setup.png or av_setup.svg


In skin.xml the skin widget for the Menu screen with icons looks like this:

<widget source="menu" render="Listbox" position="72,274" size="564,545" scrollbarMode="showOnDemand" enableWrapAround="1" transparent="1">
<convert type="TemplatedMultiContent">
{"template": [ MultiContentEntryText(pos = (97,5), size = (435,45), flags = RT_HALIGN_LEFT|RT_VALIGN_CENTER, text = 0),
MultiContentEntryPixmapAlphaBlend(pos = (32,5), size = (48,48), png = 5)],
"fonts": [gFont("Regular",34)],
"itemHeight": 60
}
</convert>
</widget>
38 changes: 0 additions & 38 deletions doc/MENUICONS

This file was deleted.

2 changes: 1 addition & 1 deletion lib/python/Components/Harddisk.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ def deviceState(self, device):
match = bus
break

if SystemInfo["HasHiSi"] and match == bus and "usb1/1-1/1-1.1/1-1.1:1.0" in self.phys_path:
if SystemInfo["HasHiSi"] and match == bus and ("usb1/1-1/1-1.1/1-1.1:1.0" in self.phys_path or "usb1/1-1/1-1.4/1-1.4:1.0" in self.phys_path):
match = None

if match:
Expand Down
1 change: 0 additions & 1 deletion lib/python/Components/PluginComponent.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ def getDescriptionForMenuEntryID(self, menuid, entryid):
if p(menuid) and isinstance(p(menuid), (list, tuple)):
if p(menuid)[0][2] == entryid:
return p.description
return None

def clearPluginList(self):
self.pluginList = []
Expand Down
2 changes: 2 additions & 0 deletions lib/python/Components/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1608,6 +1608,8 @@ def setValue(self, val):
val = ""
ConfigText.setValue(self, val)

value = property(getValue, setValue)

def getMulti(self, selected):
if self.text == "":
return "mtext"[1 - selected:], _("List of storage devices"), list(range(0))
Expand Down
2 changes: 1 addition & 1 deletion lib/python/Plugins/SystemPlugins/OBH/ImageManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ def keyRestore2(self, retval):
self.MTDROOTFS = SystemInfo["canMultiBoot"][self.multibootslot]["root"]
else:
self.MTDROOTFS = SystemInfo["canMultiBoot"][self.multibootslot]["root"].split("/")[2]
if SystemInfo["HasHiSi"] and SystemInfo["MultiBootSlot"] >= 4 and self.multibootslot < 4:
if SystemInfo["HasHiSi"] and SystemInfo["MultiBootSlot"] > 4 and self.multibootslot < 4:
self.session.open(MessageBox, _("ImageManager - %s - cannot flash eMMC slot from sd card slot.") % getBoxType(), MessageBox.TYPE_INFO, timeout=10)
return
if self.sel:
Expand Down
16 changes: 12 additions & 4 deletions lib/python/Plugins/SystemPlugins/OBH/SwapManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

from enigma import eTimer


from Components.config import config, configfile, ConfigSubsection, ConfigYesNo
from Components.ActionMap import ActionMap
from Components.Console import Console
Expand All @@ -18,6 +17,15 @@

config.swapmanager = ConfigSubsection()
config.swapmanager.swapautostart = ConfigYesNo(default=False)

# start: temp code - used due to config variable change
config.obhsettings.swapautostart = ConfigYesNo(default=False)
if config.obhsettings.swapautostart.value:
config.swapmanager.swapautostart.value = True
# switch off so doesn't happen on any subsuquent run
config.obhsettings.swapautostart.value = False
config.obhsettings.swapautostart.save()
# end: temp code
startswap = None


Expand Down Expand Up @@ -138,7 +146,7 @@ def __init__(self, session):
self["active"] = Label(_("Active"))
self["key_red"] = Label(_("Close"))
self["key_green"] = Label(_("Activate"))
self["key_yellow"] = Label(_("Autostart"))
self["key_yellow"] = Label(_("Enable Autostart"))
self["key_blue"] = Label(_("Create"))
self["swapname_summary"] = StaticText()
self["swapactive_summary"] = StaticText()
Expand Down Expand Up @@ -291,16 +299,16 @@ def updateSwap2(self, result=None, retval=None, extra_args=None):
scanning = _("Enable SWAP at startup")

if config.swapmanager.swapautostart.value or self.swap_name == _("manufacturer defined swap"):
# if config.swapmanager.swapautostart.value:
self["autostart_off"].hide()
self["autostart_on"].show()
self["key_yellow"].setText("")
self["key_yellow"].setText(_("Disable Autostart"))
else:
config.swapmanager.swapautostart.setValue(False)
config.swapmanager.swapautostart.save()
configfile.save()
self["autostart_on"].hide()
self["autostart_off"].show()
self["key_yellow"].setText(_("Enable Autostart"))
self["lab1"].setText(scanning)
self["lab1"].show()
self["actions"].setEnabled(True)
Expand Down
3 changes: 1 addition & 2 deletions lib/python/Screens/FactoryReset.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import shutil

from boxbranding import getMachineBrand, getMachineName
from gettext import dgettext
from os import _exit, listdir, remove, system
from os.path import isdir, join as pathjoin

Expand Down Expand Up @@ -144,7 +143,7 @@ def doSettingsBackup(self):
Components.Task.job_manager.AddJob(backupFiles.createBackupJob())
Components.Task.job_manager.in_background = False
for job in Components.Task.job_manager.getPendingJobs():
if job.name == dgettext('obh', 'Backup manager'):
if job.name == _('Backup manager'):
break
self.session.openWithCallback(self.doSettingsBackupCallback, JobView, job, cancelable=False, backgroundable=False, afterEventChangeable=False, afterEvent="close")

Expand Down

0 comments on commit 2da83c4

Please sign in to comment.