Skip to content

Commit

Permalink
[PluginBrowser] Move plugin Layout change settings from Customize to …
Browse files Browse the repository at this point in the history
…PluginBrowser menu settings
  • Loading branch information
fairbird committed Jan 31, 2024
1 parent 1f399eb commit d29bfb3
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 18 deletions.
1 change: 0 additions & 1 deletion data/setup.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<item level="1" text="Sort order for setup entries" description="This option allows you to alphabetically sort setup menu entries.">config.usage.sort_settings</item>
<item level="1" text="Show screen path" description="This option allows you to show the full screen path leading to the current screen.">config.usage.showScreenPath</item>
<item level="1" text="Virtual keyboard skin" description="You can select the skin of virtual keyboard.">config.misc.virtualkeyBoardstyle</item>
<item level="0" text="Plugin Browser Style (Need Restart GUI)" description="This option allows you to select the plugin browser style (Need Restart GUI).">config.misc.plugin_style</item>
<item level="0" text="Show menu or plugin numbers" description="This option allows you to show menu and/or plugin number quick links.">config.usage.menu_show_numbers</item>
<item level="2" text="Show softcam setup in extensions menu" description="This option allows you to add the softcam setup in the extensions menu." requires="HasSoftcamInstalled">config.misc.softcam_setup.extension_menu</item>
<item level="1" text="Zap key delay for channel number input" description="In live view wait this many seconds after a numeric key press before assuming the required channel number has been entered. Default: 5 seconds. Setting zero will require confirmation with 'OK'. ">config.misc.zapkey_delay</item>
Expand Down
29 changes: 22 additions & 7 deletions lib/python/Screens/PluginBrowser.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,20 @@
config.misc.pluginbrowser = ConfigSubsection()
config.misc.pluginbrowser.plugin_order = ConfigText(default="")

PLUGIN_LIST = 0
PLUGIN_GRID = 1

config.pluginfilter = ConfigSubsection()
config.pluginfilter.pluginLayout = ConfigSelection(default=PLUGIN_GRID, choices=[
(PLUGIN_LIST, _("View as list")),
(PLUGIN_GRID, _("View as grid"))])
config.pluginfilter.pluginstyle = ConfigSelection(default=1, choices=[
(1, _("Style 1")),
(2, _("Style 2")),
(3, _("Style 3")),
(4, _("Style 4")),
(5, _("Style 5")),
(6, _("Style 6"))])
config.pluginfilter.kernel = ConfigYesNo(default=False)
config.pluginfilter.drivers = ConfigYesNo(default=True)
config.pluginfilter.extensions = ConfigYesNo(default=True)
Expand Down Expand Up @@ -737,31 +750,31 @@ def __init__(self, session):
self.plugins = []
self.current = 0
self.current_page = 0
if config.misc.plugin_style.value == "newstyle1":
if config.pluginfilter.pluginstyle.value == 1:
self.backgroundPixmap = ""
self.backgroundColor = "#44000000"
self.foregroundColor = "#000080ff"
self.primaryColor = "#282828"
self.primaryColorLabel = "#DCE1E3"
self.secondaryColor = "#4e4e4e"
self.secondaryColorLabel = "#00000000"
elif config.misc.plugin_style.value == "newstyle2":
elif config.pluginfilter.pluginstyle.value == 2:
self.backgroundPixmap = ""
self.backgroundColor = "#21292A"
self.foregroundColor = "#000080ff"
self.primaryColor = "#191F22"
self.primaryColorLabel = "#DCE1E3"
self.secondaryColor = "#39474F"
self.secondaryColorLabel = "#00000000"
elif config.misc.plugin_style.value == "newstyle3":
elif config.pluginfilter.pluginstyle.value == 3:
self.backgroundPixmap = ""
self.backgroundColor = "#44000000"
self.foregroundColor = "#000080ff"
self.primaryColor = "#16000000"
self.primaryColorLabel = "#00ffffff"
self.secondaryColor = "#696969"
self.secondaryColorLabel = "#00000000"
elif config.misc.plugin_style.value == "newstyle4":
elif config.pluginfilter.pluginstyle.value == 4:
if isFullHD():
self.backgroundPixmap = '<ePixmap position="0,0" size="1920,1080" pixmap="skin_default/style4.jpg" transparent="1" zPosition="-1" />'
else:
Expand All @@ -772,7 +785,7 @@ def __init__(self, session):
self.primaryColorLabel = "#00ffffff"
self.secondaryColor = "#1b3c85"
self.secondaryColorLabel = "#00ffc000"
elif config.misc.plugin_style.value == "newstyle5":
elif config.pluginfilter.pluginstyle.value == 5:
if isFullHD():
self.backgroundPixmap = '<ePixmap position="0,0" size="1920,1080" pixmap="skin_default/style5.jpg" transparent="1" zPosition="-1" />'
else:
Expand All @@ -783,7 +796,7 @@ def __init__(self, session):
self.primaryColorLabel = "#00ffffff"
self.secondaryColor = "#1b3c85"
self.secondaryColorLabel = "#00ffc000"
elif config.misc.plugin_style.value == "newstyle6":
elif config.pluginfilter.pluginstyle.value == 6:
if isFullHD():
self.backgroundPixmap = '<ePixmap position="0,0" size="1920,1080" pixmap="skin_default/style6.jpg" transparent="1" zPosition="-1" />'
else:
Expand Down Expand Up @@ -1232,6 +1245,8 @@ def __init__(self, session):
def createSetup(self):
self.editListEntry = None
self.list = []
self.list.append((_("pluginLayout"), config.pluginfilter.pluginLayout, _("This allows you to change Plugin Browser layout")))
self.list.append((_("pluginstyle"), config.pluginfilter.pluginstyle, _("This allows you to change background of grid layout")))
self.list.append((_("drivers"), config.pluginfilter.drivers, _("This allows you to show drivers modules in downloads")))
self.list.append((_("extensions"), config.pluginfilter.extensions, _("This allows you to show extensions modules in downloads")))
self.list.append((_("systemplugins"), config.pluginfilter.systemplugins, _("This allows you to show systemplugins modules in downloads")))
Expand Down Expand Up @@ -1293,5 +1308,5 @@ def __init__(self, session):
PluginDownloadBrowser.__init__(self, session=session, type=self.MANAGE)
self.skinName = ["PluginDownloadBrowser"]

if config.misc.plugin_style.value == "newstyle1" or config.misc.plugin_style.value == "newstyle2" or config.misc.plugin_style.value == "newstyle3" or config.misc.plugin_style.value == "newstyle4" or config.misc.plugin_style.value == "newstyle5" or config.misc.plugin_style.value == "newstyle6":
if config.pluginfilter.pluginLayout.value == PLUGIN_GRID:
PluginBrowser = PluginBrowserNew
10 changes: 0 additions & 10 deletions lib/python/StartEnigma.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,6 @@
config.plugins.remotecontroltype = ConfigSubsection()
config.plugins.remotecontroltype.rctype = ConfigInteger(default=0)

# New Plugin Style
config.misc.plugin_style = ConfigSelection(default="normallstyle", choices=[
("normallstyle", _("Normall Style")),
("newstyle1", _("New Style 1")),
("newstyle2", _("New Style 2")),
("newstyle3", _("New Style 3")),
("newstyle4", _("New Style 4")),
("newstyle5", _("New Style 5")),
("newstyle6", _("New Style 6"))])

# New VirtualkeyBoard Style
config.misc.virtualkeyBoardstyle = ConfigSelection(default="new", choices=[
("new", _("New style")),
Expand Down

0 comments on commit d29bfb3

Please sign in to comment.