Skip to content

Instantly share code, notes, and snippets.

Created May 25, 2016 08:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/2782857a696c646e34e8bc63a5b5be20 to your computer and use it in GitHub Desktop.
Save anonymous/2782857a696c646e34e8bc63a5b5be20 to your computer and use it in GitHub Desktop.
diff --git a/lib/python/Plugins/SystemPlugins/OSDPositionSetup/plugin.py b/lib/python/Plugins/SystemPlugins/OSDPositionSetup/plugin.py
index 3883126..550be49 100644
--- a/lib/python/Plugins/SystemPlugins/OSDPositionSetup/plugin.py
+++ b/lib/python/Plugins/SystemPlugins/OSDPositionSetup/plugin.py
@@ -1,6 +1,9 @@
from Screens.Screen import Screen
+from Screens.Wizard import wizardManager
from Components.ConfigList import ConfigListScreen
-from Components.config import config, ConfigSubsection, ConfigInteger, ConfigSlider, getConfigListEntry
+from Components.config import config, ConfigSubsection, ConfigInteger, ConfigSlider, ConfigBoolean, getConfigListEntry
+
+config.misc.do_overscanwizard = ConfigBoolean(default = config.skin.primary_skin.value == "PLi-HD-FullNight/skin.xml")
config.plugins.OSDPositionSetup = ConfigSubsection()
config.plugins.OSDPositionSetup.dst_left = ConfigInteger(default = 0)
@@ -8,6 +11,7 @@ config.plugins.OSDPositionSetup.dst_width = ConfigInteger(default = 720)
config.plugins.OSDPositionSetup.dst_top = ConfigInteger(default = 0)
config.plugins.OSDPositionSetup.dst_height = ConfigInteger(default = 576)
+
def setPosition(dst_left, dst_width, dst_top, dst_height):
if dst_left + dst_width > 720:
dst_width = 720 - dst_left
@@ -41,3 +45,7 @@ def Plugins(**kwargs):
return [PluginDescriptor(name = "Overscan Wizard", description = "", where = PluginDescriptor.WHERE_SESSIONSTART, fnc = startup),
PluginDescriptor(name = "Overscan Wizard", description = _("Wizard to arrange the overscan"), where = PluginDescriptor.WHERE_MENU, fnc = startSetup)]
return []
+
+from overscanwizard import OverscanWizard
+wizardManager.registerWizard(OverscanWizard, config.misc.do_overscanwizard.value, priority = 10)
+
diff --git a/lib/python/Screens/StartWizard.py b/lib/python/Screens/StartWizard.py
index 6e12083..069b529 100644
--- a/lib/python/Screens/StartWizard.py
+++ b/lib/python/Screens/StartWizard.py
@@ -2,10 +2,6 @@ from Wizard import wizardManager
from Screens.WizardLanguage import WizardLanguage
from Screens.Rc import Rc
from Tools.HardwareInfo import HardwareInfo
-try:
- from Plugins.SystemPlugins.OSDPositionSetup.overscanwizard import OverscanWizard
-except:
- OverscanWizard = None
from Components.Pixmap import Pixmap, MovingPixmap, MultiPixmap
from Components.config import config, ConfigBoolean, configfile, ConfigSubsection
@@ -15,7 +11,6 @@ from enigma import getDesktop
config.misc.firstrun = ConfigBoolean(default = True)
config.misc.languageselected = ConfigBoolean(default = True)
-config.misc.do_overscanwizard = ConfigBoolean(default = OverscanWizard and config.skin.primary_skin.value == "PLi-FullNightHD/skin.xml")
class StartWizard(WizardLanguage, Rc):
def __init__(self, session, silent = True, showSteps = False, neededTag = None):
@@ -37,5 +32,4 @@ class StartWizard(WizardLanguage, Rc):
configfile.save()
wizardManager.registerWizard(LanguageWizard, config.misc.languageselected.value, priority = 5)
-wizardManager.registerWizard(OverscanWizard, config.misc.do_overscanwizard.value, priority = 10)
wizardManager.registerWizard(StartWizard, config.misc.firstrun.value, priority = 20)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment