1 #######################################################################
3 # MerlinSkinThemes for Dreambox/Enigma2/Dreambox OS
4 # Coded by marthom (c)2012 - 2018
6 # Support: board.dreambox.tools
7 # E-Mail: marthom@dreambox-tools.info
9 # This plugin is open source but it is NOT free software.
11 # This plugin may only be distributed to and executed on hardware which
12 # is licensed by Dream Multimedia GmbH.
14 # It's NOT allowed to distribute any parts of this plugin or its source code in ANY way
15 # to hardware which is NOT licensed by Dream Property.
16 # It's NOT allowed to execute this plugin and its source code or even parts of it in ANY way
17 # on hardware which is NOT licensed by Dream Property.
19 # If you want to use or modify the code or parts of it,
20 # you have to keep MY license and inform me about the modifications by mail.
22 #######################################################################
24 from Plugins.Plugin import PluginDescriptor
26 from Screens.Screen import Screen
27 from Screens.HelpMenu import HelpableScreen
28 from Screens.MessageBox import MessageBox
29 from Screens.InputBox import InputBox
30 from Screens.Standby import TryQuitMainloop
31 from Screens.ChoiceBox import ChoiceBox
32 from Screens.Console import Console
34 from skin import parseColor, TemplatedListFonts, componentSizes
36 from Components.ActionMap import ActionMap, HelpableActionMap
37 from Components.Button import Button
38 from Components.Input import Input
39 from Components.Label import Label
40 from Components.Pixmap import Pixmap
41 from Components.Sources.List import List
42 from Components.MenuList import MenuList
43 from Components.config import config, configfile, ConfigYesNo, ConfigSubsection, getConfigListEntry, ConfigSelection, ConfigNumber, ConfigText, ConfigInteger
44 from Components.ConfigList import ConfigListScreen
46 from enigma import eListbox, eListboxPythonMultiContent, gFont, RT_HALIGN_LEFT, RT_HALIGN_CENTER, RT_HALIGN_RIGHT, RT_VALIGN_CENTER, getEnigmaVersionString
48 from Tools.HardwareInfo import HardwareInfo
49 from Tools.Directories import resolveFilename, SCOPE_SKIN, SCOPE_CURRENT_SKIN, SCOPE_PLUGINS, SCOPE_SYSETC, fileExists
50 from Tools.Notifications import AddPopup
52 import xml.etree.cElementTree as Tree
53 from xml.dom import minidom
58 # =========================================
59 PluginVersion = "v2.6.3"
60 Title = "MerlinSkinThemes "
62 # =========================================
64 SkinXML = config.skin.primary_skin.value
65 SkinFile = resolveFilename(SCOPE_SKIN) + SkinXML
66 SkinName = SkinXML[0:SkinXML.find("/")]
67 ThemeFile = resolveFilename(SCOPE_SKIN) + SkinName + "/themes.xml"
68 skin_user_xml = "/etc/enigma2/skin_user.xml"
69 enigmacontrol = "/var/lib/opkg/info/enigma2.control"
70 merlinChk = "/usr/share/enigma2/merlin_setup.xml"
71 GP3Chk = "/usr/lib/enigma2/python/Plugins/Bp/geminimain/gVersion.py"
72 GP4Chk = "/usr/lib/enigma2/python/Plugins/GP4/geminilocale/gVersion.py"
73 ImageCreater = "/usr/lib/enigma2/python/Components/ImageCreater.py"
74 PIL = "/usr/lib/python2.7/site-packages/PIL/Image.py"
76 # Liste der Vorschaubilder
77 myList = ["InfoBar", "Menu", "PluginBrowser", "ChannelSelection", "MovieSelection", "MoviePlayer", "SecondInfoBar", "GraphMultiEPG", "MessageBox", "InputBox", "ChoiceBox", "Mute", "Volume", "MerlinMusicPlayer2", "ExtLCDInfoBar", "ExtLCDEventView", "ExtLCDStandby", "ExtLCDMoviePlayer", "ExtLCDMMP2", "OLEDInfoBar", "OLEDEventView", "OLEDStandby", "OLEDMoviePlayer", "OLEDMMP2", "LCDInfoBar", "LCDEventView", "LCDStandby", "LCDMoviePlayer", "LCDMMP2"]
80 E2ver = "not available"
81 if open("/proc/stb/info/model","rb").read() == "dm7080":
82 if fileExists(enigmacontrol):
83 file = open(enigmacontrol, 'r')
85 line = file.readline()
87 if line[:9] == "Version: ":
91 E2ver = getEnigmaVersionString()
95 if fileExists(merlinChk):
101 if fileExists(GP3Chk):
103 file = open(GP3Chk, 'r')
106 line = file.readline()
111 data = data.split("'")
117 if fileExists(GP4Chk):
119 file = open(GP4Chk, 'r')
122 line = file.readline()
127 data = data.split("'")
132 if fileExists(ImageCreater) and fileExists(PIL):
133 from Components.ImageCreater import imageCreater
137 if HardwareInfo().get_device_name() in ('dm900', 'dm920'):
142 if HardwareInfo().get_device_name() in ('one', 'two'):
151 print "------------------------------------------------"
152 print HardwareInfo().get_device_name()
153 print "------------------------------------------------"
157 if fileExists(skin_user_xml):
160 config.plugins.MerlinSkinThemes = ConfigSubsection()
161 config.plugins.MerlinSkinThemes.Skin = ConfigText(default=SkinName)
162 config.plugins.MerlinSkinThemes.selSkin = ConfigText(default=SkinName)
163 config.plugins.MerlinSkinThemes.ComponentTheme = ConfigText(default="")
164 config.plugins.MerlinSkinThemes.LayoutTheme = ConfigText(default="")
165 config.plugins.MerlinSkinThemes.GlobalsTheme = ConfigText(default="")
166 config.plugins.MerlinSkinThemes.ColorTheme = ConfigText(default="")
167 config.plugins.MerlinSkinThemes.SkinPathTheme = ConfigText(default="")
168 config.plugins.MerlinSkinThemes.FontTheme = ConfigText(default="")
169 config.plugins.MerlinSkinThemes.BorderSetTheme = ConfigText(default="")
170 config.plugins.MerlinSkinThemes.WindowStyleScrollbarTheme = ConfigText(default="")
171 config.plugins.MerlinSkinThemes.InfoBar = ConfigText(default="")
172 config.plugins.MerlinSkinThemes.Menu = ConfigText(default="")
173 config.plugins.MerlinSkinThemes.PluginBrowser = ConfigText(default="")
174 config.plugins.MerlinSkinThemes.ChannelSelection = ConfigText(default="")
175 config.plugins.MerlinSkinThemes.MovieSelection = ConfigText(default="")
176 config.plugins.MerlinSkinThemes.MoviePlayer = ConfigText(default="")
177 config.plugins.MerlinSkinThemes.SecondInfoBar = ConfigText(default="")
178 config.plugins.MerlinSkinThemes.GraphMultiEPG = ConfigText(default="")
179 config.plugins.MerlinSkinThemes.MessageBox = ConfigText(default="")
180 config.plugins.MerlinSkinThemes.InputBox = ConfigText(default="")
181 config.plugins.MerlinSkinThemes.ChoiceBox = ConfigText(default="")
182 config.plugins.MerlinSkinThemes.Mute = ConfigText(default="")
183 config.plugins.MerlinSkinThemes.Volume = ConfigText(default="")
184 config.plugins.MerlinSkinThemes.MerlinMusicPlayer2Screen = ConfigText(default="")
185 config.plugins.MerlinSkinThemes.MerlinMusicPlayer2Screen_MIPSEL = ConfigText(default="")
186 config.plugins.MerlinSkinThemes.MerlinMusicPlayer2Screen_ARM = ConfigText(default="")
187 config.plugins.MerlinSkinThemes.MerlinMusicPlayer2Screen_AARCH64 = ConfigText(default="")
188 config.plugins.MerlinSkinThemes.MerlinMusicPlayer2ScreenSaver = ConfigText(default="")
189 config.plugins.MerlinSkinThemes.MerlinMusicPlayer2ScreenSaver_MIPSEL = ConfigText(default="")
190 config.plugins.MerlinSkinThemes.MerlinMusicPlayer2ScreenSaver_ARM = ConfigText(default="")
191 config.plugins.MerlinSkinThemes.MerlinMusicPlayer2ScreenSaver_ARCH64 = ConfigText(default="")
192 config.plugins.MerlinSkinThemes.ExtLCDInfoBar = ConfigText(default="")
193 config.plugins.MerlinSkinThemes.ExtLCDEventView = ConfigText(default="")
194 config.plugins.MerlinSkinThemes.ExtLCDStandby = ConfigText(default="")
195 config.plugins.MerlinSkinThemes.ExtLCDMoviePlayer = ConfigText(default="")
196 config.plugins.MerlinSkinThemes.ExtLCDMMP2 = ConfigText(default="")
197 config.plugins.MerlinSkinThemes.OLEDInfoBar = ConfigText(default="")
198 config.plugins.MerlinSkinThemes.OLEDEventView = ConfigText(default="")
199 config.plugins.MerlinSkinThemes.OLEDStandby = ConfigText(default="")
200 config.plugins.MerlinSkinThemes.OLEDMoviePlayer = ConfigText(default="")
201 config.plugins.MerlinSkinThemes.OLEDMMP2 = ConfigText(default="")
202 config.plugins.MerlinSkinThemes.LCDInfoBar = ConfigText(default="")
203 config.plugins.MerlinSkinThemes.LCDEventView = ConfigText(default="")
204 config.plugins.MerlinSkinThemes.LCDStandby = ConfigText(default="")
205 config.plugins.MerlinSkinThemes.LCDMoviePlayer = ConfigText(default="")
206 config.plugins.MerlinSkinThemes.LCDMMP2 = ConfigText(default="")
207 config.plugins.MerlinSkinThemes.PNGTheme = ConfigText(default="")
208 config.plugins.MerlinSkinThemes.ShowPrevPNG = ConfigText(default="1")
209 config.plugins.MerlinSkinThemes.CornerRadius = ConfigText(default="")
211 class MerlinSkinThemes(Screen, HelpableScreen, ConfigListScreen):
213 <screen position="center,center" size="1920,1080" title="%s" backgroundColor="#00808080" >
214 <widget name="DescLabel" position="10,10" size="1900,40" font="Regular;26" zPosition="2" valign="center" halign="center" />
216 <widget name="ListLabel" position="10,60" size="945,40" font="Regular;26" zPosition="2" valign="center" halign="left" />
217 <widget name="ImageInfo" position="965,60" size="945,40" font="Regular;26" zPosition="2" halign="left" />
219 <widget name="SkinsList" position="10,110" size="945,910" scrollbarMode="showOnDemand" zPosition="1" />
220 <widget name="config" position="10,110" size="945,910" scrollbarMode="showOnDemand" zPosition="1" />
222 <widget name="SkinCopyright" position="965,110" size="945,200" font="Regular;18" zPosition="2" halign="left" />
223 <widget name="Preview" position="965,320" size="945,700" alphatest="blend" />
225 <widget name="key_red" position="10,1030" size="200,40" valign="center" halign="center" zPosition="3" transparent="1" font="Regular;24" />
226 <widget name="key_green" position="258,1030" size="200,40" valign="center" halign="center" zPosition="3" transparent="1" font="Regular;24" />
227 <widget name="key_yellow" position="506,1030" size="200,40" valign="center" halign="center" zPosition="3" transparent="1" font="Regular;24" />
228 <widget name="key_blue" position="755,1030" size="200,40" valign="center" halign="center" zPosition="3" transparent="1" font="Regular;24" />
230 <ePixmap name="red" position="10,1030" zPosition="1" size="200,40" pixmap="skin_default/buttons/red.png" transparent="1" alphatest="blend" />
231 <ePixmap name="green" position="258,1030" zPosition="1" size="200,40" pixmap="skin_default/buttons/green.png" transparent="1" alphatest="blend" />
232 <ePixmap name="yellow" position="506,1030" zPosition="1" size="200,40" pixmap="skin_default/buttons/yellow.png" transparent="1" alphatest="blend" />
233 <ePixmap name="blue" position="755,1030" zPosition="1" size="200,40" pixmap="skin_default/buttons/blue.png" transparent="1" alphatest="blend" />
234 </screen>"""% _("MerlinSkinThemes")
240 def __init__(self, session):
241 print "[MST] " + PluginVersion + " running..."
243 self.session = session
245 Screen.__init__(self, session)
246 HelpableScreen.__init__(self)
249 ConfigListScreen.__init__(self, self.clist)
251 self.setTitle(Title + " " + PluginVersion + " - " + Author)
254 self["ListLabel"] = Label(_("Skinlist") )
256 self["ListLabel"] = Label(_("Skinlist") + " - ATTENTION: skin_user.xml found!!!")
258 self["DescLabel"] = Label(Title + " " + PluginVersion + " " + Author)
259 self["SkinCopyright"] = Label()
260 self["Preview"] = Pixmap()
261 self["ImageInfo"] = Label()
263 self.curList = "SkinsList"
265 self["key_red"] = Button(_("exit"))
266 self["key_green"] = Button(_("switch to skin"))
267 self["key_yellow"] = Button(_("save as design"))
268 self["key_blue"] = Button(_(" "))
270 self["SkinsList"] = GetSkinsList([])
272 self.onSelectionChanged = [ ]
274 self["ColorActions"] = HelpableActionMap(self, "ColorActions",
276 "red": self.buttonRed,
277 "green": self.buttonGreen,
278 "yellow": self.buttonYellow,
281 self["DirectionActions"] = HelpableActionMap(self, "DirectionActions",
283 "up": (self.up, _("Move cursor up")),
284 "down": (self.down, _("Move cursor down")),
285 "left": (self.left, _("Move cursor left")),
286 "right": (self.right, _("Move cursor right")),
289 self["OkCancelActions"] = HelpableActionMap(self, "OkCancelActions",
291 "ok": (self.ok, _("")),
292 "cancel": (self.exit, _("Close plugin")),
295 self["TeleTextActions"] = HelpableActionMap(self, "TeleTextActions",
297 "help": (self.Help, _("")),
298 "info": (self.Info, _("")),
301 self["MenuActions"] = HelpableActionMap(self, "MenuActions",
303 "menu": (self.MSTMenu, _("")),
306 self.updateSkinList()
308 MerlinSkinThemes.selSkinName = self["SkinsList"].getCurrent()[1][7]
309 MerlinSkinThemes.selSkinFile = resolveFilename(SCOPE_SKIN) + MerlinSkinThemes.selSkinName + "/skin.xml"
310 MerlinSkinThemes.selThemeFile = resolveFilename(SCOPE_SKIN) + MerlinSkinThemes.selSkinName + "/themes.xml"
312 self.onLayoutFinish.append(self.startRun)
315 self["SkinsList"].onSelectionChanged.append(self.changedSkinsList)
317 MerlinSkinThemes.selSkinName = self["SkinsList"].getCurrent()[1][7]
318 MerlinSkinThemes.selSkinFile = resolveFilename(SCOPE_SKIN) + MerlinSkinThemes.selSkinName + "/skin.xml"
319 MerlinSkinThemes.selThemeFile = resolveFilename(SCOPE_SKIN) + MerlinSkinThemes.selSkinName + "/themes.xml"
321 self["config"].hide()
324 self["SkinsList"].up()
325 listend = self["SkinsList"].getSelectionIndex()
326 self["SkinsList"].moveToIndex(0)
328 for index in range(listend):
329 self["SkinsList"].moveToIndex(index)
330 if self["SkinsList"].getCurrent()[1][7] == SkinName:
333 self["SkinsList"].moveToIndex(activeItem)
335 self["SkinsList"].moveToIndex(0)
338 if fileExists(MerlinSkinThemes.selSkinFile):
342 def readThemes(self):
344 defaultcomponenttheme = None
345 defaultlayouttheme = None
346 defaultglobalstheme = None
347 defaultcolortheme = None
348 defaultskinpaththeme = None
349 defaultfonttheme = None
350 defaultbordersettheme = None
351 defaultwindowstylescrollbartheme = None
352 defaultinfobar = None
354 defaultpluginbrowser = None
355 defaultchannelselection = None
356 defaultmovieselection = None
357 defaultmovieplayer = None
358 defaultsecondinfobar = None
359 defaultgraphmultiepg = None
360 defaulteventview = None
361 defaultepgselection = None
362 defaultmessagebox = None
363 defaultinputbox = None
364 defaultchoicebox = None
368 defaultmmp2mipsel = None
369 defaultmmp2arm = None
370 defaultmmp2saver = None
371 defaultmmp2savermipsel = None
372 defaultmmp2saverarm = None
373 defaultmmp2saverarch64 = None
374 defaultextlcdinfobar = None
375 defaultextlcdeventview = None
376 defaultextlcdstandby = None
377 defaultextlcdmovieplayer = None
378 defaultextlcdmmp2 = None
379 defaultoledinfobar = None
380 defaultoledeventview = None
381 defaultoledstandby = None
382 defaultoledmovieplayer = None
383 defaultoledmmp2 = None
384 defaultlcdinfobar = None
385 defaultlcdeventview = None
386 defaultlcdstandby = None
387 defaultlcdmovieplayer = None
388 defaultlcdmmp2 = None
389 defaultpngtheme = None
390 defaultcornerradius = None
395 xml = Tree.parse(MerlinSkinThemes.selThemeFile)
398 selSkinList.append(MerlinSkinThemes.selSkinName)
399 config.plugins.MerlinSkinThemes.selSkin = MyConfigSelection(default=MerlinSkinThemes.selSkinName, choices = selSkinList)
400 self.clist.append(getConfigListEntry(_(" "), ))
401 self.clist.append(getConfigListEntry("Skin", config.plugins.MerlinSkinThemes.selSkin))
404 self.clist.append(getConfigListEntry(_(" "), ))
405 self.clist.append(getConfigListEntry(_(" " + u'\u00b7' + " DESIGNS"), ))
408 if xml.find("designs") is not None:
409 DesignList.append("-none-")
410 ds = xml.find("designs")
411 for design in ds.findall("design"):
412 DesignList.append(design.get("name"))
413 defaultdesign = "-none-"
415 if len(DesignList) > 0:
416 self.MSTDesigns = MyConfigSelection(default=defaultdesign, choices = DesignList)
417 config.plugins.MerlinSkinThemes.Design = self.MSTDesigns
418 self.clist.append(getConfigListEntry("Design", self.MSTDesigns))
420 self.MSTDesigns = MyConfigSelection(default=defaultdesign, choices = ["-none-"])
421 config.plugins.MerlinSkinThemes.Design = self.MSTDesigns
422 self.clist.append(getConfigListEntry("Design", self.MSTDesigns))
425 self.clist.append(getConfigListEntry(_(" "), ))
426 self.clist.append(getConfigListEntry(_(" " + u'\u00b7' + " THEMES"), ))
430 if xml.find("colortheme") is not None:
431 for theme in xml.findall("colortheme"):
432 ColorThemeList.append(theme.get("name"))
433 if theme.get("value") == "active":
434 defaultcolortheme = theme.get("name")
436 if len(ColorThemeList) > 0:
437 self.TColor = MyConfigSelection(default=defaultcolortheme, choices = ColorThemeList)
438 config.plugins.MerlinSkinThemes.ColorTheme = self.TColor
439 self.clist.append(getConfigListEntry("ColorTheme", self.TColor))
442 SkinPathThemeList = []
443 if xml.find("skinpaththemes") is not None:
444 spt = xml.find("skinpaththemes")
445 for theme in spt.findall("theme"):
446 SkinPathThemeList.append(theme.get("name"))
447 if theme.get("value") == "active":
448 defaultskinpaththeme = theme.get("name")
450 if len(SkinPathThemeList) > 0:
451 self.SPath = MyConfigSelection(default=defaultskinpaththeme, choices = SkinPathThemeList)
452 config.plugins.MerlinSkinThemes.SkinPathTheme = self.SPath
453 self.clist.append(getConfigListEntry("SkinPathTheme", self.SPath))
457 if xml.find("fonttheme") is not None:
458 for theme in xml.findall("fonttheme"):
459 FontThemeList.append(theme.get("name"))
460 if theme.get("value") == "active":
461 defaultfonttheme = theme.get("name")
463 if len(FontThemeList) > 0:
464 self.TFont = MyConfigSelection(default=defaultfonttheme, choices = FontThemeList)
465 config.plugins.MerlinSkinThemes.FontTheme = self.TFont
466 self.clist.append(getConfigListEntry("FontTheme", self.TFont))
469 BorderSetThemeList = []
470 if xml.find("bordersettheme") is not None:
471 for theme in xml.findall("bordersettheme"):
472 BorderSetThemeList.append(theme.get("name"))
473 if theme.get("value") == "active":
474 defaultbordersettheme = theme.get("name")
476 if len(BorderSetThemeList) > 0:
477 self.TBorder = MyConfigSelection(default=defaultbordersettheme, choices = BorderSetThemeList)
478 config.plugins.MerlinSkinThemes.BorderSetTheme = self.TBorder
479 self.clist.append(getConfigListEntry("BorderSetTheme", self.TBorder))
481 # WINDOSTYLESCROLLBAR
482 WindowStyleScrollbarThemeList = []
483 if xml.find("windowstylescrollbartheme") is not None:
484 for theme in xml.findall("windowstylescrollbartheme"):
485 WindowStyleScrollbarThemeList.append(theme.get("name"))
486 if theme.get("value") == "active":
487 defaultwindowstylescrollbartheme = theme.get("name")
489 if len(WindowStyleScrollbarThemeList) > 0:
490 self.TScroll = MyConfigSelection(default=defaultwindowstylescrollbartheme, choices = WindowStyleScrollbarThemeList)
491 config.plugins.MerlinSkinThemes.WindowStyleScrollbarTheme = self.TScroll
492 self.clist.append(getConfigListEntry("WindowStyleScrollbarTheme", self.TScroll))
496 if xml.find("pngtheme") is not None:
497 for theme in xml.findall("pngtheme"):
498 PNGThemeList.append(theme.get("name"))
499 if theme.get("value") == "active":
500 defaultpngtheme = theme.get("name")
502 if len(PNGThemeList) > 0:
503 self.TPNG = MyConfigSelection(default=defaultpngtheme, choices = PNGThemeList)
504 config.plugins.MerlinSkinThemes.PNGTheme = self.TPNG
505 self.clist.append(getConfigListEntry("PNGTheme", self.TPNG))
508 ComponentsThemeList = []
509 if xml.find("componenttheme") is not None:
510 for theme in xml.findall("componenttheme"):
511 ComponentsThemeList.append(theme.get("name"))
512 if theme.get("value") == "active":
513 defaultcomponenttheme = theme.get("name")
515 if len(ComponentsThemeList) > 0:
516 self.TComponent = MyConfigSelection(default=defaultcomponenttheme, choices = ComponentsThemeList)
517 config.plugins.MerlinSkinThemes.ComponentTheme = self.TComponent
518 self.clist.append(getConfigListEntry("ComponentTheme", self.TComponent))
521 LayoutsThemeList = []
522 if xml.find("layouttheme") is not None:
523 for theme in xml.findall("layouttheme"):
524 LayoutsThemeList.append(theme.get("name"))
525 if theme.get("value") == "active":
526 defaultlayouttheme = theme.get("name")
528 if len(LayoutsThemeList) > 0:
529 self.TLayout = MyConfigSelection(default=defaultlayouttheme, choices = LayoutsThemeList)
530 config.plugins.MerlinSkinThemes.LayoutTheme = self.TLayout
531 self.clist.append(getConfigListEntry("LayoutTheme", self.TLayout))
534 GlobalsThemeList = []
535 if xml.find("globalstheme") is not None:
536 for theme in xml.findall("globalstheme"):
537 GlobalsThemeList.append(theme.get("name"))
538 if theme.get("value") == "active":
539 defaultglobalstheme = theme.get("name")
541 if len(GlobalsThemeList) > 0:
542 self.TGlobals = MyConfigSelection(default=defaultglobalstheme, choices = GlobalsThemeList)
543 config.plugins.MerlinSkinThemes.GlobalsTheme = self.TGlobals
544 self.clist.append(getConfigListEntry("GlobalsTheme", self.TGlobals))
547 self.clist.append(getConfigListEntry(_(" "), ))
548 self.clist.append(getConfigListEntry(_(" " + u'\u00b7' + " SCREENS"), ))
550 if xml.find("screenthemes") is not None:
554 st = xml.find("screenthemes")
555 for screens in st.findall("screens"):
556 if screens.get("name") == "InfoBar":
557 for themes in screens.findall("screentheme"):
558 InfoBarList.append(themes.get("name"))
559 if themes.get("value") == "active":
560 defaultinfobar = themes.get("name")
562 if len(InfoBarList) > 0:
563 self.SInfobar = MyConfigSelection(default=defaultinfobar, choices = InfoBarList)
564 config.plugins.MerlinSkinThemes.InfoBar = self.SInfobar
565 self.clist.append(getConfigListEntry("InfoBar", self.SInfobar))
570 st = xml.find("screenthemes")
571 for screens in st.findall("screens"):
572 if screens.get("name") == "Menu":
573 for themes in screens.findall("screentheme"):
574 MenuList.append(themes.get("name"))
575 if themes.get("value") == "active":
576 defaultmenu = themes.get("name")
578 if len(MenuList) > 0:
579 self.SMenu = MyConfigSelection(default=defaultmenu, choices = MenuList)
580 config.plugins.MerlinSkinThemes.Menu = self.SMenu
581 self.clist.append(getConfigListEntry("Menu", self.SMenu))
585 PluginBrowserList = []
586 st = xml.find("screenthemes")
587 for screens in st.findall("screens"):
588 if screens.get("name") == "PluginBrowser":
589 for themes in screens.findall("screentheme"):
590 PluginBrowserList.append(themes.get("name"))
591 if themes.get("value") == "active":
592 defaultpluginbrowser = themes.get("name")
594 if len(PluginBrowserList) > 0:
595 self.SPluginBrowser = MyConfigSelection(default=defaultpluginbrowser, choices = PluginBrowserList)
596 config.plugins.MerlinSkinThemes.PluginBrowser = self.SPluginBrowser
597 self.clist.append(getConfigListEntry("PluginBrowser", self.SPluginBrowser))
601 ChannelSelectionList = []
602 st = xml.find("screenthemes")
603 for screens in st.findall("screens"):
604 if screens.get("name") == "ChannelSelection":
605 for themes in screens.findall("screentheme"):
606 ChannelSelectionList.append(themes.get("name"))
607 if themes.get("value") == "active":
608 defaultchannelselection = themes.get("name")
610 if len(ChannelSelectionList) > 0:
611 self.SChannelSel = MyConfigSelection(default=defaultchannelselection, choices = ChannelSelectionList)
612 config.plugins.MerlinSkinThemes.ChannelSelection = self.SChannelSel
613 self.clist.append(getConfigListEntry("ChannelSelection", self.SChannelSel))
617 MovieSelectionList = []
618 st = xml.find("screenthemes")
619 for screens in st.findall("screens"):
620 if screens.get("name") == "MovieSelection":
621 for themes in screens.findall("screentheme"):
622 MovieSelectionList.append(themes.get("name"))
623 if themes.get("value") == "active":
624 defaultmovieselection = themes.get("name")
626 if len(MovieSelectionList) > 0:
627 self.SMovieSel = MyConfigSelection(default=defaultmovieselection, choices = MovieSelectionList)
628 config.plugins.MerlinSkinThemes.MovieSelection = self.SMovieSel
629 self.clist.append(getConfigListEntry("MovieSelection", self.SMovieSel))
634 st = xml.find("screenthemes")
635 for screens in st.findall("screens"):
636 if screens.get("name") == "MoviePlayer":
637 for themes in screens.findall("screentheme"):
638 MoviePlayerList.append(themes.get("name"))
639 if themes.get("value") == "active":
640 defaultmovieplayer = themes.get("name")
642 if len(MoviePlayerList) > 0:
643 self.SMoviePlay = MyConfigSelection(default=defaultmovieplayer, choices = MoviePlayerList)
644 config.plugins.MerlinSkinThemes.MoviePlayer = self.SMoviePlay
645 self.clist.append(getConfigListEntry("MoviePlayer", self.SMoviePlay))
649 SecondInfoBarList = []
650 st = xml.find("screenthemes")
651 for screens in st.findall("screens"):
652 if screens.get("name") == "SecondInfoBar":
653 for themes in screens.findall("screentheme"):
654 SecondInfoBarList.append(themes.get("name"))
655 if themes.get("value") == "active":
656 defaultsecondinfobar = themes.get("name")
658 if len(SecondInfoBarList) > 0:
659 self.S2IB = MyConfigSelection(default=defaultsecondinfobar, choices = SecondInfoBarList)
660 config.plugins.MerlinSkinThemes.SecondInfoBar = self.S2IB
661 self.clist.append(getConfigListEntry("SecondInfoBar", self.S2IB))
666 GraphMultiEPGList = []
667 st = xml.find("screenthemes")
668 for screens in st.findall("screens"):
669 if screens.get("name") == "GraphMultiEPG":
670 for themes in screens.findall("screentheme"):
671 GraphMultiEPGList.append(themes.get("name"))
672 if themes.get("value") == "active":
673 defaultgraphmultiepg = themes.get("name")
675 if len(GraphMultiEPGList) > 0:
676 self.graphmultiepg = MyConfigSelection(default=defaultgraphmultiepg, choices = GraphMultiEPGList)
677 config.plugins.MerlinSkinThemes.GraphMultiEPG = self.graphmultiepg
678 self.clist.append(getConfigListEntry("GraphMultiEPG", self.graphmultiepg))
683 st = xml.find("screenthemes")
684 for screens in st.findall("screens"):
685 if screens.get("name") == "EventView":
686 for themes in screens.findall("screentheme"):
687 EventViewList.append(themes.get("name"))
688 if themes.get("value") == "active":
689 defaulteventview = themes.get("name")
691 if len(EventViewList) > 0:
692 self.EventView = MyConfigSelection(default=defaulteventview, choices = EventViewList)
693 config.plugins.MerlinSkinThemes.EventView = self.EventView
694 self.clist.append(getConfigListEntry("EventView", self.EventView))
698 EPGSelectionList = []
699 st = xml.find("screenthemes")
700 for screens in st.findall("screens"):
701 if screens.get("name") == "EPGSelection":
702 for themes in screens.findall("screentheme"):
703 EPGSelectionList.append(themes.get("name"))
704 if themes.get("value") == "active":
705 defaultepgselection = themes.get("name")
707 if len(EPGSelectionList) > 0:
708 self.EPGSelection = MyConfigSelection(default=defaultepgselection, choices = EPGSelectionList)
709 config.plugins.MerlinSkinThemes.EPGSelection = self.EPGSelection
710 self.clist.append(getConfigListEntry("EPGSelection", self.EPGSelection))
715 st = xml.find("screenthemes")
716 for screens in st.findall("screens"):
717 if screens.get("name") == "MessageBox":
718 for themes in screens.findall("screentheme"):
719 MessageBoxList.append(themes.get("name"))
720 if themes.get("value") == "active":
721 defaultmessagebox = themes.get("name")
723 if len(MessageBoxList) > 0:
724 self.SMsgBox = MyConfigSelection(default=defaultmessagebox, choices = MessageBoxList)
725 config.plugins.MerlinSkinThemes.MessageBox = self.SMsgBox
726 self.clist.append(getConfigListEntry("MessageBox", self.SMsgBox))
731 st = xml.find("screenthemes")
732 for screens in st.findall("screens"):
733 if screens.get("name") == "InputBox":
734 for themes in screens.findall("screentheme"):
735 InputBoxList.append(themes.get("name"))
736 if themes.get("value") == "active":
737 defaultinputbox = themes.get("name")
739 if len(InputBoxList) > 0:
740 self.SInBox = MyConfigSelection(default=defaultinputbox, choices = InputBoxList)
741 config.plugins.MerlinSkinThemes.InputBox = self.SInBox
742 self.clist.append(getConfigListEntry("InputBox", self.SInBox))
747 st = xml.find("screenthemes")
748 for screens in st.findall("screens"):
749 if screens.get("name") == "ChoiceBox":
750 for themes in screens.findall("screentheme"):
751 ChoiceBoxList.append(themes.get("name"))
752 if themes.get("value") == "active":
753 defaultchoicebox = themes.get("name")
755 if len(ChoiceBoxList) > 0:
756 self.SChoiceBox = MyConfigSelection(default=defaultchoicebox, choices = ChoiceBoxList)
757 config.plugins.MerlinSkinThemes.ChoiceBox = self.SChoiceBox
758 self.clist.append(getConfigListEntry("ChoiceBox", self.SChoiceBox))
763 st = xml.find("screenthemes")
764 for screens in st.findall("screens"):
765 if screens.get("name") == "Mute":
766 for themes in screens.findall("screentheme"):
767 MuteList.append(themes.get("name"))
768 if themes.get("value") == "active":
769 defaultmute = themes.get("name")
771 if len(MuteList) > 0:
772 self.SMute = MyConfigSelection(default=defaultmute, choices = MuteList)
773 config.plugins.MerlinSkinThemes.Mute = self.SMute
774 self.clist.append(getConfigListEntry("Mute", self.SMute))
779 st = xml.find("screenthemes")
780 for screens in st.findall("screens"):
781 if screens.get("name") == "Volume":
782 for themes in screens.findall("screentheme"):
783 VolumeList.append(themes.get("name"))
784 if themes.get("value") == "active":
785 defaultvolume = themes.get("name")
787 if len(VolumeList) > 0:
788 self.SVolume = MyConfigSelection(default=defaultvolume, choices = VolumeList)
789 config.plugins.MerlinSkinThemes.Volume = self.SVolume
790 self.clist.append(getConfigListEntry("Volume", self.SVolume))
793 # MerlinMusicPlayer2Screen
795 st = xml.find("screenthemes")
796 for screens in st.findall("screens"):
797 if screens.get("name") == "MerlinMusicPlayer2Screen":
798 for themes in screens.findall("screentheme"):
799 MMP2List.append(themes.get("name"))
800 if themes.get("value") == "active":
801 defaultmmp2 = themes.get("name")
803 if len(MMP2List) > 0:
804 self.SMMP2 = MyConfigSelection(default=defaultmmp2, choices = MMP2List)
805 config.plugins.MerlinSkinThemes.MerlinMusicPlayer2Screen = self.SMMP2
806 self.clist.append(getConfigListEntry("MerlinMusicPlayer2Screen", self.SMMP2))
810 # MerlinMusicPlayer2Screen_MIPSEL
812 st = xml.find("screenthemes")
813 for screens in st.findall("screens"):
814 if screens.get("name") == "MerlinMusicPlayer2Screen_MIPSEL":
815 for themes in screens.findall("screentheme"):
816 MMP2MipselList.append(themes.get("name"))
817 if themes.get("value") == "active":
818 defaultmmp2mipsel = themes.get("name")
820 if len(MMP2MipselList) > 0:
821 self.SMMP2Mipsel = MyConfigSelection(default=defaultmmp2mipsel, choices = MMP2MipselList)
822 config.plugins.MerlinSkinThemes.MerlinMusicPlayer2Screen_MIPSEL = self.SMMP2Mipsel
823 self.clist.append(getConfigListEntry("MerlinMusicPlayer2Screen_MIPSEL", self.SMMP2Mipsel))
827 # MerlinMusicPlayer2Screen_ARM
829 st = xml.find("screenthemes")
830 for screens in st.findall("screens"):
831 if screens.get("name") == "MerlinMusicPlayer2Screen_ARM":
832 for themes in screens.findall("screentheme"):
833 MMP2ArmList.append(themes.get("name"))
834 if themes.get("value") == "active":
835 defaultmmp2arm = themes.get("name")
837 if len(MMP2ArmList) > 0:
838 self.SMMP2Arm = MyConfigSelection(default=defaultmmp2arm, choices = MMP2ArmList)
839 config.plugins.MerlinSkinThemes.MerlinMusicPlayer2Screen_ARM = self.SMMP2Arm
840 self.clist.append(getConfigListEntry("MerlinMusicPlayer2Screen_ARM", self.SMMP2Arm))
844 # MerlinMusicPlayer2Screen_AARCH64
846 st = xml.find("screenthemes")
847 for screens in st.findall("screens"):
848 if screens.get("name") == "MerlinMusicPlayer2Screen_AARCH64":
849 for themes in screens.findall("screentheme"):
850 MMP2Arch64List.append(themes.get("name"))
851 if themes.get("value") == "active":
852 defaultmmp2arch64 = themes.get("name")
854 if len(MMP2Arch64List) > 0:
855 self.SMMP2Arch64 = MyConfigSelection(default=defaultmmp2arch64, choices = MMP2Arch64List)
856 config.plugins.MerlinSkinThemes.MerlinMusicPlayer2Screen_AARCH64 = self.SMMP2Arch64
857 self.clist.append(getConfigListEntry("MerlinMusicPlayer2Screen_AARCH64", self.SMMP2Arch64))
860 # MerlinMusicPlayer2ScreenSaver
862 st = xml.find("screenthemes")
863 for screens in st.findall("screens"):
864 if screens.get("name") == "MerlinMusicPlayer2ScreenSaver":
865 for themes in screens.findall("screentheme"):
866 MMP2SaverList.append(themes.get("name"))
867 if themes.get("value") == "active":
868 defaultmmp2saver = themes.get("name")
870 if len(MMP2SaverList) > 0:
871 self.SMMP2Saver = MyConfigSelection(default=defaultmmp2saver, choices = MMP2SaverList)
872 config.plugins.MerlinSkinThemes.MerlinMusicPlayer2ScreenSaver = self.SMMP2Saver
873 self.clist.append(getConfigListEntry("MerlinMusicPlayer2ScreenSaver", self.SMMP2Saver))
877 # MerlinMusicPlayer2ScreenSaver_MIPSEL
878 MMP2SaverMipselList = []
879 st = xml.find("screenthemes")
880 for screens in st.findall("screens"):
881 if screens.get("name") == "MerlinMusicPlayer2ScreenSaver_MIPSEL":
882 for themes in screens.findall("screentheme"):
883 MMP2SaverMipselList.append(themes.get("name"))
884 if themes.get("value") == "active":
885 defaultmmp2savermipsel = themes.get("name")
887 if len(MMP2SaverMipselList) > 0:
888 self.SMMP2SaverMipsel = MyConfigSelection(default=defaultmmp2savermipsel, choices = MMP2SaverMipselList)
889 config.plugins.MerlinSkinThemes.MerlinMusicPlayer2ScreenSaver_MIPSEL = self.SMMP2SaverMipsel
890 self.clist.append(getConfigListEntry("MerlinMusicPlayer2ScreenSaver_MIPSEL", self.SMMP2SaverMipsel))
894 # MerlinMusicPlayer2ScreenSaver_ARM
895 MMP2SaverArmList = []
896 st = xml.find("screenthemes")
897 for screens in st.findall("screens"):
898 if screens.get("name") == "MerlinMusicPlayer2ScreenSaver_ARM":
899 for themes in screens.findall("screentheme"):
900 MMP2SaverArmList.append(themes.get("name"))
901 if themes.get("value") == "active":
902 defaultmmp2saverarm = themes.get("name")
904 if len(MMP2SaverArmList) > 0:
905 self.SMMP2SaverArm = MyConfigSelection(default=defaultmmp2saverarm, choices = MMP2SaverArmList)
906 config.plugins.MerlinSkinThemes.MerlinMusicPlayer2ScreenSaver_ARM = self.SMMP2SaverArm
907 self.clist.append(getConfigListEntry("MerlinMusicPlayer2ScreenSaver_ARM", self.SMMP2SaverArm))
911 # MerlinMusicPlayer2ScreenSaver_AARCH64
912 MMP2SaverArch64List = []
913 st = xml.find("screenthemes")
914 for screens in st.findall("screens"):
915 if screens.get("name") == "MerlinMusicPlayer2ScreenSaver_AARCH64":
916 for themes in screens.findall("screentheme"):
917 MMP2SaverArch64List.append(themes.get("name"))
918 if themes.get("value") == "active":
919 defaultmmp2saverarch64 = themes.get("name")
921 if len(MMP2SaverArch64List) > 0:
922 self.SMMP2SaverArch64 = MyConfigSelection(default=defaultmmp2saverarch64, choices = MMP2SaverArch64List)
923 config.plugins.MerlinSkinThemes.MerlinMusicPlayer2ScreenSaver_AARCH64 = self.SMMP2SaverArch64
924 self.clist.append(getConfigListEntry("MerlinMusicPlayer2ScreenSaver_AARCH64", self.SMMP2SaverArch64))
928 if xml.find("lcdscreenthemes") is not None:
929 self.clist.append(getConfigListEntry(_(" "), ))
930 self.clist.append(getConfigListEntry(_(" " + u'\u00b7' + " LCD SCREENS ID=1 (8000, 7020HD, 800HD, 7080) 132x64"), ))
933 st = xml.find("lcdscreenthemes")
934 if st.find("screens[@name='InfoBarSummary']") is not None:
935 lst = st.find("screens[@name='InfoBarSummary']")
936 for th in lst.findall("lcdscreentheme"):
937 for screen in th.findall("screen"):
938 if screen.get("name") == "InfoBarSummary" and screen.get("id") == "1":
939 LCDInfoBarList.append(th.get("name"))
940 if th.get("value") == "active":
941 defaultlcdinfobar = th.get("name")
943 if len(LCDInfoBarList) > 0:
944 self.LSInfobar = MyConfigSelection(default=defaultlcdinfobar, choices = LCDInfoBarList)
945 config.plugins.MerlinSkinThemes.LCDInfoBar = self.LSInfobar
946 self.clist.append(getConfigListEntry("LCDInfoBar", self.LSInfobar))
950 LCDEventViewList = []
951 if st.find("screens[@name='EventView_summary']") is not None:
952 lst = st.find("screens[@name='EventView_summary']")
953 for th in lst.findall("lcdscreentheme"):
954 for screen in th.findall("screen"):
955 if screen.get("name") == "EventView_summary" and screen.get("id") == "1":
956 LCDEventViewList.append(th.get("name"))
957 if th.get("value") == "active":
958 defaultlcdeventview = th.get("name")
960 if len(LCDEventViewList) > 0:
961 self.LSEventView = MyConfigSelection(default=defaultlcdeventview, choices = LCDEventViewList)
962 config.plugins.MerlinSkinThemes.LCDEventView = self.LSEventView
963 self.clist.append(getConfigListEntry("LCDEventView", self.LSEventView))
968 if st.find("screens[@name='StandbySummary']") is not None:
969 lst = st.find("screens[@name='StandbySummary']")
970 for th in lst.findall("lcdscreentheme"):
971 for screen in th.findall("screen"):
972 if screen.get("name") == "StandbySummary" and screen.get("id") == "1":
973 LCDStandbyList.append(th.get("name"))
974 if th.get("value") == "active":
975 defaultlcdstandby = th.get("name")
977 if len(LCDStandbyList) > 0:
978 self.LSStandby = MyConfigSelection(default=defaultlcdstandby, choices = LCDStandbyList)
979 config.plugins.MerlinSkinThemes.LCDStandby = self.LSStandby
980 self.clist.append(getConfigListEntry("LCDStandby", self.LSStandby))
983 # InfoBarMoviePlayerSummary
984 LCDMoviePlayerList = []
985 if st.find("screens[@name='InfoBarMoviePlayerSummary']") is not None:
986 lst = st.find("screens[@name='InfoBarMoviePlayerSummary']")
987 for th in lst.findall("lcdscreentheme"):
988 for screen in th.findall("screen"):
989 if screen.get("name") == "InfoBarMoviePlayerSummary" and screen.get("id") == "1":
990 LCDMoviePlayerList.append(th.get("name"))
991 if th.get("value") == "active":
992 defaultlcdmovieplayer = th.get("name")
994 if len(LCDMoviePlayerList) > 0:
995 self.LSMoviePlayer = MyConfigSelection(default=defaultlcdmovieplayer, choices = LCDMoviePlayerList)
996 config.plugins.MerlinSkinThemes.LCDMoviePlayer = self.LSMoviePlayer
997 self.clist.append(getConfigListEntry("LCDMoviePlayer", self.LSMoviePlayer))
1000 # MerlinMusicPlayer2LCDScreen
1002 if st.find("screens[@name='MerlinMusicPlayer2LCDScreen']") is not None:
1003 lst = st.find("screens[@name='MerlinMusicPlayer2LCDScreen']")
1004 for th in lst.findall("lcdscreentheme"):
1005 for screen in th.findall("screen"):
1006 if screen.get("name") == "MerlinMusicPlayer2LCDScreen" and screen.get("id") == "1":
1007 LCDMMP2Lst.append(th.get("name"))
1008 if th.get("value") == "active":
1009 defaultlcdmmp2 = th.get("name")
1011 if len(LCDMMP2List) > 0:
1012 self.LSMMP2 = MyConfigSelection(default=defaultlcdmmp2, choices = LCDMMP2List)
1013 config.plugins.MerlinSkinThemes.LCDMMP2 = self.LSMMP2
1014 self.clist.append(getConfigListEntry("LCDMMP2", self.LSMMP2))
1017 if xml.find("oledscreenthemes") is not None:
1018 self.clist.append(getConfigListEntry(_(" "), ))
1019 self.clist.append(getConfigListEntry(_(" " + u'\u00b7' + " OLED SCREENS ID=2 (800se, 820) 96x64"), ))
1022 OLEDInfoBarList = []
1023 st = xml.find("oledscreenthemes")
1024 if st.find("screens[@name='InfoBarSummary']") is not None:
1025 ost = st.find("screens[@name='InfoBarSummary']")
1026 for th in ost.findall("oledscreentheme"):
1027 for screen in th.findall("screen"):
1028 if screen.get("name") == "InfoBarSummary" and screen.get("id") == "2":
1029 OLEDInfoBarList.append(th.get("name"))
1030 if th.get("value") == "active":
1031 defaultoledinfobar = th.get("name")
1033 if len(OLEDInfoBarList) > 0:
1034 self.OSInfobar = MyConfigSelection(default=defaultoledinfobar, choices = OLEDInfoBarList)
1035 config.plugins.MerlinSkinThemes.OLEDInfoBar = self.OSInfobar
1036 self.clist.append(getConfigListEntry("OLEDInfoBar", self.OSInfobar))
1040 OLEDEventViewList = []
1041 if st.find("screens[@name='EventView_summary']") is not None:
1042 ost = st.find("screens[@name='EventView_summary']")
1043 for th in ost.findall("oledscreentheme"):
1044 for screen in th.findall("screen"):
1045 if screen.get("name") == "EventView_summary" and screen.get("id") == "2":
1046 OLEDEventViewList.append(th.get("name"))
1047 if th.get("value") == "active":
1048 defaultoledeventview = th.get("name")
1050 if len(OLEDEventViewList) > 0:
1051 self.OSEventView = MyConfigSelection(default=defaultoledeventview, choices = OLEDEventViewList)
1052 config.plugins.MerlinSkinThemes.OLEDEventView = self.OSEventView
1053 self.clist.append(getConfigListEntry("OLEDEventView", self.OSEventView))
1057 OLEDStandbyList = []
1058 if st.find("screens[@name='StandbySummary']") is not None:
1059 ost = st.find("screens[@name='StandbySummary']")
1060 for th in ost.findall("oledscreentheme"):
1061 for screen in th.findall("screen"):
1062 if screen.get("name") == "StandbySummary" and screen.get("id") == "2":
1063 OLEDStandbyList.append(th.get("name"))
1064 if th.get("value") == "active":
1065 defaultoledstandby = th.get("name")
1067 if len(OLEDStandbyList) > 0:
1068 self.OSStandby = MyConfigSelection(default=defaultoledstandby, choices = OLEDStandbyList)
1069 config.plugins.MerlinSkinThemes.OLEDStandby = self.OSStandby
1070 self.clist.append(getConfigListEntry("OLEDStandby", self.OSStandby))
1073 # InfoBarMoviePlayerSummary
1074 OLEDMoviePlayerList = []
1075 if st.find("screens[@name='InfoBarMoviePlayerSummary']") is not None:
1076 ost = st.find("screens[@name='InfoBarMoviePlayerSummary']")
1077 for th in ost.findall("oledscreentheme"):
1078 for screen in th.findall("screen"):
1079 if screen.get("name") == "InfoBarMoviePlayerSummary" and screen.get("id") == "2":
1080 OLEDMoviePlayerList.append(th.get("name"))
1081 if th.get("value") == "active":
1082 defaultoledmovieplayer = th.get("name")
1084 if len(OLEDMoviePlayerList) > 0:
1085 self.OSMoviePlayer = MyConfigSelection(default=defaultoledmovieplayer, choices = OLEDMoviePlayerList)
1086 config.plugins.MerlinSkinThemes.OLEDMoviePlayer = self.OSMoviePlayer
1087 self.clist.append(getConfigListEntry("OLEDMoviePlayer", self.OSMoviePlayer))
1090 # MerlinMusicPlayer2OLCDScreen
1092 if st.find("screens[@name='MerlinMusicPlayer2LCDScreen']") is not None:
1093 ost = st.find("screens[@name='MerlinMusicPlayer2LCDScreen']")
1094 for th in ost.findall("oledscreentheme"):
1095 for screen in th.findall("screen"):
1096 if screen.get("name") == "MerlinMusicPlayer2LCDScreen" and screen.get("id") == "2":
1097 OLEDMMP2Lst.append(th.get("name"))
1098 if th.get("value") == "active":
1099 defaultoledmmp2 = th.get("name")
1101 if len(OLEDMMP2List) > 0:
1102 self.OSMMP2 = MyConfigSelection(default=defaultoledmmp2, choices = OLEDMMP2List)
1103 config.plugins.MerlinSkinThemes.OLEDMMP2 = self.OSMMP2
1104 self.clist.append(getConfigListEntry("OLEDMMP2", self.OSMMP2))
1106 # External LCD Screens
1108 if xml.find("extlcdscreenthemes") is not None:
1109 self.clist.append(getConfigListEntry(_(" "), ))
1110 self.clist.append(getConfigListEntry(_(" " + u'\u00b7' + " LCD SCREENS ID=3 (900ultraHD, 920ultraHD, Buck(380x210)...) 400x240"), ))
1112 ExtLCDInfoBarList = []
1113 st = xml.find("extlcdscreenthemes")
1114 if st.find("screens[@name='InfoBarSummary']") is not None:
1115 elst = st.find("screens[@name='InfoBarSummary']")
1116 for th in elst.findall("extlcdscreentheme"):
1117 for screen in th.findall("screen"):
1118 if screen.get("name") == "InfoBarSummary" and screen.get("id") == "3":
1119 ExtLCDInfoBarList.append(th.get("name"))
1120 if th.get("value") == "active":
1121 defaultextlcdinfobar = th.get("name")
1123 if len(ExtLCDInfoBarList) > 0:
1124 self.ExtLSInfobar = MyConfigSelection(default=defaultextlcdinfobar, choices = ExtLCDInfoBarList)
1125 config.plugins.MerlinSkinThemes.ExtLCDInfoBar = self.ExtLSInfobar
1126 self.clist.append(getConfigListEntry("ExtLCDInfoBar", self.ExtLSInfobar))
1130 ExtLCDEventViewList = []
1131 if st.find("screens[@name='EventView_summary']") is not None:
1132 elst = st.find("screens[@name='EventView_summary']")
1133 for th in elst.findall("extlcdscreentheme"):
1134 for screen in th.findall("screen"):
1135 if screen.get("name") == "EventView_summary" and screen.get("id") == "3":
1136 ExtLCDEventViewList.append(th.get("name"))
1137 if th.get("value") == "active":
1138 defaultextlcdeventview = th.get("name")
1140 if len(ExtLCDEventViewList) > 0:
1141 self.ExtLSEventView = MyConfigSelection(default=defaultextlcdeventview, choices = ExtLCDEventViewList)
1142 config.plugins.MerlinSkinThemes.ExtLCDEventView = self.ExtLSEventView
1143 self.clist.append(getConfigListEntry("ExtLCDEventView", self.ExtLSEventView))
1147 ExtLCDStandbyList = []
1148 if st.find("screens[@name='StandbySummary']") is not None:
1149 elst = st.find("screens[@name='StandbySummary']")
1150 for th in elst.findall("extlcdscreentheme"):
1151 for screen in th.findall("screen"):
1152 if screen.get("name") == "StandbySummary" and screen.get("id") == "3":
1153 ExtLCDStandbyList.append(th.get("name"))
1154 if th.get("value") == "active":
1155 defaultextlcdstandby = th.get("name")
1157 if len(ExtLCDStandbyList) > 0:
1158 self.ExtLSStandby = MyConfigSelection(default=defaultextlcdstandby, choices = ExtLCDStandbyList)
1159 config.plugins.MerlinSkinThemes.ExtLCDStandby = self.ExtLSStandby
1160 self.clist.append(getConfigListEntry("ExtLCDStandby", self.ExtLSStandby))
1163 # InfoBarMoviePlayerSummary
1164 ExtLCDMoviePlayerList = []
1165 if st.find("screens[@name='InfoBarMoviePlayerSummary']") is not None:
1166 elst = st.find("screens[@name='InfoBarMoviePlayerSummary']")
1167 for th in elst.findall("extlcdscreentheme"):
1168 for screen in th.findall("screen"):
1169 if screen.get("name") == "InfoBarMoviePlayerSummary" and screen.get("id") == "3":
1170 ExtLCDMoviePlayerList.append(th.get("name"))
1171 if th.get("value") == "active":
1172 defaultextlcdmovieplayer = th.get("name")
1174 if len(ExtLCDMoviePlayerList) > 0:
1175 self.ExtLSMoviePlayer = MyConfigSelection(default=defaultextlcdmovieplayer, choices = ExtLCDMoviePlayerList)
1176 config.plugins.MerlinSkinThemes.ExtLCDMoviePlayer = self.ExtLSMoviePlayer
1177 self.clist.append(getConfigListEntry("ExtLCDMoviePlayer", self.ExtLSMoviePlayer))
1180 # MerlinMusicPlayer2EXTLCDScreen
1182 if st.find("screens[@name='MerlinMusicPlayer2LCDScreen']") is not None:
1183 elst = st.find("screens[@name='MerlinMusicPlayer2LCDScreen']")
1184 for th in elst.findall("extlcdscreentheme"):
1185 for screen in th.findall("screen"):
1186 if screen.get("name") == "MerlinMusicPlayer2LCDScreen" and screen.get("id") == "3":
1187 ExtLCDMMP2List.append(th.get("name"))
1188 if th.get("value") == "active":
1189 defaultextlcdmmp2 = th.get("name")
1191 if len(ExtLCDMMP2List) > 0:
1192 self.ExtLSMMP2 = MyConfigSelection(default=defaultextlcdmmp2, choices = ExtLCDMMP2List)
1193 config.plugins.MerlinSkinThemes.ExtLCDMMP2 = self.ExtLSMMP2
1194 self.clist.append(getConfigListEntry("ExtLCDMMP2", self.ExtLSMMP2))
1197 if xml.find("cornerradius") is not None:
1198 self.clist.append(getConfigListEntry(_(" "), ))
1199 self.clist.append(getConfigListEntry(_(" " + u'\u00b7' + " CORNERRADIUS"), ))
1201 CornerRadiusList = []
1203 cr = xml.find("cornerradius")
1204 for cradius in cr.findall("radius"):
1205 CornerRadiusList.append(cradius.get("name"))
1206 if cradius.get("value") == "active":
1207 defaultcornerradius = cradius.get("name")
1209 if len(CornerRadiusList) > 0:
1210 self.CornerRadius = MyConfigSelection(default=defaultcornerradius, choices = CornerRadiusList)
1211 config.plugins.MerlinSkinThemes.CornerRadius = self.CornerRadius
1212 self.clist.append(getConfigListEntry("CornerRadius", self.CornerRadius))
1215 print "[MST] themes.xml in " + MerlinSkinThemes.selSkinName + " corrupt!"
1216 self.clist.append(getConfigListEntry(_(" "), ))
1217 self.clist.append(getConfigListEntry(_(">>> ERROR - themes.xml in " + MerlinSkinThemes.selSkinName + " corrupt! <<<"), ))
1219 self["config"].setList(self.clist)
1221 def buttonGreen(self):
1222 if self.curList == "SkinsList":
1224 sel = self["SkinsList"].getCurrent()
1225 if sel[1][7] == "Default Skin":
1226 skinfile = "skin.xml"
1228 skinfile = "%s/skin.xml" % sel[1][7]
1230 # Dr. Best Infobar position
1231 if fileExists("/usr/share/enigma2/merlin_setup.xml"):
1232 config.merlin2.infobar_position_offset_x.value = 0
1233 config.merlin2.infobar_position_offset_x.save()
1234 config.merlin2.infobar_position_offset_y.value = 0
1235 config.merlin2.infobar_position_offset_y.save()
1236 config.merlin2.movieplayer_infobar_position_offset_x.value = 0
1237 config.merlin2.movieplayer_infobar_position_offset_x.save()
1238 config.merlin2.movieplayer_infobar_position_offset_y.value = 0
1239 config.merlin2.movieplayer_infobar_position_offset_y.save()
1241 config.skin.primary_skin.value = skinfile
1242 config.skin.primary_skin.save()
1243 restartbox = self.session.openWithCallback(self.restartGUI,MessageBox,_("GUI needs a restart to apply a new skin\nDo you want to Restart the GUI now?"), MessageBox.TYPE_YESNO)
1244 restartbox.setTitle(_("Restart GUI now?"))
1245 elif self.curList == "ConfigList":
1246 askBox = self.session.openWithCallback(self.askYN,MessageBox,_("[apply themes] needs time to build new settings\nDo you want to do this now?"), MessageBox.TYPE_YESNO)
1247 askBox.setTitle(_("Apply themes now?"))
1249 def askYN(self, answer):
1252 if SkinName == MerlinSkinThemes.selSkinName:
1253 restartbox = self.session.openWithCallback(self.restartGUI,MessageBox,_("GUI needs a restart to apply a new skin\nDo you want to Restart the GUI now?"), MessageBox.TYPE_YESNO)
1254 restartbox.setTitle(_("Restart GUI now?"))
1257 self.session.open(MessageBox, _("Changes to skin " + MerlinSkinThemes.selSkinName + " ready!"), MessageBox.TYPE_INFO)
1261 def MSTScrFix(self, answer):
1263 curSkin = Tree.parse(MerlinSkinThemes.selSkinFile)
1264 rootSkin = curSkin.getroot()
1265 mstscreen = rootSkin.find("screen[@name='MerlinSkinThemes']")
1266 rootSkin.remove(mstscreen)
1268 self.XMLindent(rootSkin, 0)
1269 curSkin.write(MerlinSkinThemes.selSkinFile)
1271 self.updateSkinList()
1273 self.session.open(MessageBox, '<screen name="MerlinSkinThemes"...> was removed from selected skin.', MessageBox.TYPE_INFO)
1275 def buttonRed(self):
1278 def buttonYellow(self):
1279 if self.curList == "SkinsList":
1280 if self["SkinsList"].getCurrent()[3][7] == "no themes.xml":
1283 if self["SkinsList"].getCurrent()[3][7] == "no skin.xml":
1286 elif self.curList == "ConfigList":
1287 if self["config"].getCurrent()[0] == "Design":
1293 self.session.openWithCallback(self.saveDesign, InputBox, title=_("Please enter designname!"))
1295 def saveDesign(self, designname):
1296 if designname is not None:
1298 designname = designname.strip()
1300 curTree = Tree.parse(MerlinSkinThemes.selThemeFile)
1301 xmlroot = curTree.getroot()
1303 if xmlroot.find("designs") is None:
1304 xmldesigns = Tree.SubElement(xmlroot, "designs")
1306 xmldesigns = xmlroot.find("designs")
1308 # check if design exists
1309 if xmldesigns.find("design[@name='" + designname + "']") is not None:
1310 xmldesigns.remove(xmldesigns.find("design[@name='" + designname + "']"))
1312 # write/rewrite design
1313 xmldesign = Tree.SubElement(xmldesigns, "design", {"name": designname, "value": "active"})
1315 if xmlroot.find("colortheme[@name='" + config.plugins.MerlinSkinThemes.ColorTheme.value + "']") is not None:
1316 if xmldesign.find("ColorTheme") is not None:
1317 td = xmldesign.find("ColorTheme")
1318 td.set("name", config.plugins.MerlinSkinThemes.ColorTheme.value)
1320 Tree.SubElement(xmldesign, "ColorTheme", {"name": config.plugins.MerlinSkinThemes.ColorTheme.value})
1322 if xmlroot.find("fonttheme[@name='" + config.plugins.MerlinSkinThemes.FontTheme.value + "']") is not None:
1323 if xmldesign.find("FontTheme") is not None:
1324 td = d.find("FontTheme")
1325 td.set("name", config.plugins.MerlinSkinThemes.FontTheme.value)
1327 Tree.SubElement(xmldesign, "FontTheme", {"name": config.plugins.MerlinSkinThemes.FontTheme.value})
1329 if xmlroot.find("bordersettheme") is not None:
1330 if xmldesign.find("BorderSetTheme") is not None:
1331 td = d.find("BorderSetTheme")
1332 td.set("name", config.plugins.MerlinSkinThemes.BorderSetTheme.value)
1334 Tree.SubElement(xmldesign, "BorderSetTheme", {"name": config.plugins.MerlinSkinThemes.BorderSetTheme.value})
1336 if xmlroot.find("windowstylescrollbartheme") is not None:
1337 if xmldesign.find("WindowStyleScrollbarTheme") is not None:
1338 td = d.find("WindowStyleScrollbarTheme")
1339 td.set("name", config.plugins.MerlinSkinThemes.WindowStyleScrollbarTheme.value)
1341 Tree.SubElement(xmldesign, "WindowStyleScrollbarTheme", {"name": config.plugins.MerlinSkinThemes.WindowStyleScrollbarTheme.value})
1343 if xmlroot.find("componenttheme") is not None:
1344 if xmldesign.find("ComponentTheme") is not None:
1345 td = d.find("ComponentTheme")
1346 td.set("name", config.plugins.MerlinSkinThemes.ComponentTheme.value)
1348 Tree.SubElement(xmldesign, "ComponentTheme", {"name": config.plugins.MerlinSkinThemes.ComponentTheme.value})
1350 if xmlroot.find("layouttheme") is not None:
1351 if xmldesign.find("LayoutTheme") is not None:
1352 td = d.find("LayoutTheme")
1353 td.set("name", config.plugins.MerlinSkinThemes.LayoutTheme.value)
1355 Tree.SubElement(xmldesign, "LayoutTheme", {"name": config.plugins.MerlinSkinThemes.LayoutTheme.value})
1357 if xmlroot.find("globalstheme") is not None:
1358 if xmldesign.find("GlobalsTheme") is not None:
1359 td = d.find("GlobalsTheme")
1360 td.set("name", config.plugins.MerlinSkinThemes.GlobalsTheme.value)
1362 Tree.SubElement(xmldesign, "GlobalsTheme", {"name": config.plugins.MerlinSkinThemes.GlobalsTheme.value})
1364 if xmlroot.find("pngtheme[@name='" + config.plugins.MerlinSkinThemes.PNGTheme.value + "']") is not None:
1365 if xmldesign.find("PNGTheme") is not None:
1366 td = xmldesign.find("PNGTheme")
1367 td.set("name", config.plugins.MerlinSkinThemes.PNGTheme.value)
1369 Tree.SubElement(xmldesign, "PNGTheme", {"name": config.plugins.MerlinSkinThemes.PNGTheme.value})
1372 if xmlroot.find("skinpaththemes") is not None:
1373 t = xmlroot.find("skinpaththemes")
1375 if t.find("theme[@name='" + config.plugins.MerlinSkinThemes.SkinPathTheme.value + "']") is not None:
1376 if xmldesign.find("SkinPathTheme") is not None:
1377 td = xmldesign.find("SkinPathTheme")
1378 td.set("name", config.plugins.MerlinSkinThemes.SkinPathTheme.value)
1380 Tree.SubElement(xmldesign, "SkinPathTheme", {"name": config.plugins.MerlinSkinThemes.SkinPathTheme.value})
1383 if xmlroot.find("screenthemes") is not None:
1384 t = xmlroot.find("screenthemes")
1386 if t.find("screens[@name='InfoBar']") is not None:
1387 ts = t.find("screens[@name='InfoBar']")
1388 if ts.find("screentheme[@name='" + config.plugins.MerlinSkinThemes.InfoBar.value + "']") is not None:
1389 Tree.SubElement(xmldesign, "InfoBar", {"name": config.plugins.MerlinSkinThemes.InfoBar.value})
1391 if t.find("screens[@name='Menu']") is not None:
1392 ts = t.find("screens[@name='Menu']")
1393 if ts.find("screentheme[@name='" + config.plugins.MerlinSkinThemes.Menu.value + "']") is not None:
1394 Tree.SubElement(xmldesign, "Menu", {"name": config.plugins.MerlinSkinThemes.Menu.value})
1396 if t.find("screens[@name='PluginBrowser']") is not None:
1397 ts = t.find("screens[@name='PluginBrowser']")
1398 if ts.find("screentheme[@name='" + config.plugins.MerlinSkinThemes.PluginBrowser.value + "']") is not None:
1399 Tree.SubElement(xmldesign, "PluginBrowser", {"name": config.plugins.MerlinSkinThemes.PluginBrowser.value})
1401 if t.find("screens[@name='ChannelSelection']") is not None:
1402 ts = t.find("screens[@name='ChannelSelection']")
1403 if ts.find("screentheme[@name='" + config.plugins.MerlinSkinThemes.ChannelSelection.value + "']") is not None:
1404 Tree.SubElement(xmldesign, "ChannelSelection", {"name": config.plugins.MerlinSkinThemes.ChannelSelection.value})
1406 if t.find("screens[@name='MovieSelection']") is not None:
1407 ts = t.find("screens[@name='MovieSelection']")
1408 if ts.find("screentheme[@name='" + config.plugins.MerlinSkinThemes.MovieSelection.value + "']") is not None:
1409 Tree.SubElement(xmldesign, "MovieSelection", {"name": config.plugins.MerlinSkinThemes.MovieSelection.value})
1411 if t.find("screens[@name='MoviePlayer']") is not None:
1412 ts = t.find("screens[@name='MoviePlayer']")
1413 if ts.find("screentheme[@name='" + config.plugins.MerlinSkinThemes.MoviePlayer.value + "']") is not None:
1414 Tree.SubElement(xmldesign, "MoviePlayer", {"name": config.plugins.MerlinSkinThemes.MoviePlayer.value})
1416 if t.find("screens[@name='SecondInfoBar']") is not None:
1417 ts = t.find("screens[@name='SecondInfoBar']")
1418 if ts.find("screentheme[@name='" + config.plugins.MerlinSkinThemes.SecondInfoBar.value + "']") is not None:
1419 Tree.SubElement(xmldesign, "SecondInfoBar", {"name": config.plugins.MerlinSkinThemes.SecondInfoBar.value})
1421 if t.find("screens[@name='GraphMultiEPG']") is not None:
1422 ts = t.find("screens[@name='GraphMultiEPG']")
1423 if ts.find("screentheme[@name='" + config.plugins.MerlinSkinThemes.GraphMultiEPG.value + "']") is not None:
1424 Tree.SubElement(xmldesign, "GraphMultiEPG", {"name": config.plugins.MerlinSkinThemes.GraphMultiEPG.value})
1426 if t.find("screens[@name='EventView']") is not None:
1427 ts = t.find("screens[@name='EventView']")
1428 if ts.find("screentheme[@name='" + config.plugins.MerlinSkinThemes.EventView.value + "']") is not None:
1429 Tree.SubElement(xmldesign, "EventView", {"name": config.plugins.MerlinSkinThemes.EventView.value})
1431 if t.find("screens[@name='EPGSelection']") is not None:
1432 ts = t.find("screens[@name='EPGSelection']")
1433 if ts.find("screentheme[@name='" + config.plugins.MerlinSkinThemes.EPGSelection.value + "']") is not None:
1434 Tree.SubElement(xmldesign, "EPGSelection", {"name": config.plugins.MerlinSkinThemes.EPGSelection.value})
1436 if t.find("screens[@name='MessageBox']") is not None:
1437 ts = t.find("screens[@name='MessageBox']")
1438 if ts.find("screentheme[@name='" + config.plugins.MerlinSkinThemes.MessageBox.value + "']") is not None:
1439 Tree.SubElement(xmldesign, "MessageBox", {"name": config.plugins.MerlinSkinThemes.MessageBox.value})
1441 if t.find("screens[@name='InputBox']") is not None:
1442 ts = t.find("screens[@name='InputBox']")
1443 if ts.find("screentheme[@name='" + config.plugins.MerlinSkinThemes.InputBox.value + "']") is not None:
1444 Tree.SubElement(xmldesign, "InputBox", {"name": config.plugins.MerlinSkinThemes.InputBox.value})
1446 if t.find("screens[@name='ChoiceBox']") is not None:
1447 ts = t.find("screens[@name='ChoiceBox']")
1448 if ts.find("screentheme[@name='" + config.plugins.MerlinSkinThemes.ChoiceBox.value + "']") is not None:
1449 Tree.SubElement(xmldesign, "ChoiceBox", {"name": config.plugins.MerlinSkinThemes.ChoiceBox.value})
1451 if t.find("screens[@name='Mute']") is not None:
1452 ts = t.find("screens[@name='Mute']")
1453 if ts.find("screentheme[@name='" + config.plugins.MerlinSkinThemes.Mute.value + "']") is not None:
1454 Tree.SubElement(xmldesign, "Mute", {"name": config.plugins.MerlinSkinThemes.Mute.value})
1456 if t.find("screens[@name='Volume']") is not None:
1457 ts = t.find("screens[@name='Volume']")
1458 if ts.find("screentheme[@name='" + config.plugins.MerlinSkinThemes.Volume.value + "']") is not None:
1459 Tree.SubElement(xmldesign, "Volume", {"name": config.plugins.MerlinSkinThemes.Volume.value})
1461 if t.find("screens[@name='MerlinMusicPlayer2Screen']") is not None:
1462 ts = t.find("screens[@name='MerlinMusicPlayer2Screen']")
1463 if ts.find("screentheme[@name='" + config.plugins.MerlinSkinThemes.MerlinMusicPlayer2Screen.value + "']") is not None:
1464 Tree.SubElement(xmldesign, "MerlinMusicPlayer2Screen", {"name": config.plugins.MerlinSkinThemes.MerlinMusicPlayer2Screen.value})
1466 if t.find("screens[@name='MerlinMusicPlayer2Screen_MIPSEL']") is not None:
1467 ts = t.find("screens[@name='MerlinMusicPlayer2Screen_MIPSEL']")
1468 if ts.find("screentheme[@name='" + config.plugins.MerlinSkinThemes.MerlinMusicPlayer2Screen_MIPSEL.value + "']") is not None:
1469 Tree.SubElement(xmldesign, "MerlinMusicPlayer2Screen_MIPSEL", {"name": config.plugins.MerlinSkinThemes.MerlinMusicPlayer2Screen_MIPSEL.value})
1471 if t.find("screens[@name='MerlinMusicPlayer2Screen_ARM']") is not None:
1472 ts = t.find("screens[@name='MerlinMusicPlayer2Screen_ARM']")
1473 if ts.find("screentheme[@name='" + config.plugins.MerlinSkinThemes.MerlinMusicPlayer2Screen_ARM.value + "']") is not None:
1474 Tree.SubElement(xmldesign, "MerlinMusicPlayer2Screen_ARM", {"name": config.plugins.MerlinSkinThemes.MerlinMusicPlayer2Screen_ARM.value})
1476 if t.find("screens[@name='MerlinMusicPlayer2Screen_AARCH64']") is not None:
1477 ts = t.find("screens[@name='MerlinMusicPlayer2Screen_AARCH64']")
1478 if ts.find("screentheme[@name='" + config.plugins.MerlinSkinThemes.MerlinMusicPlayer2Screen_AARCH64.value + "']") is not None:
1479 Tree.SubElement(xmldesign, "MerlinMusicPlayer2Screen_AARCH64", {"name": config.plugins.MerlinSkinThemes.MerlinMusicPlayer2Screen_AARCH64.value})
1481 if t.find("screens[@name='MerlinMusicPlayer2ScreenSaver']") is not None:
1482 ts = t.find("screens[@name='MerlinMusicPlayer2ScreenSaver']")
1483 if ts.find("screentheme[@name='" + config.plugins.MerlinSkinThemes.MerlinMusicPlayer2ScreenSaver.value + "']") is not None:
1484 Tree.SubElement(xmldesign, "MerlinMusicPlayer2ScreenSaver", {"name": config.plugins.MerlinSkinThemes.MerlinMusicPlayer2ScreenSaver.value})
1486 if t.find("screens[@name='MerlinMusicPlayer2ScreenSaver_MIPSEL']") is not None:
1487 ts = t.find("screens[@name='MerlinMusicPlayer2ScreenSaver_MIPSEL']")
1488 if ts.find("screentheme[@name='" + config.plugins.MerlinSkinThemes.MerlinMusicPlayer2ScreenSaver_MIPSEL.value + "']") is not None:
1489 Tree.SubElement(xmldesign, "MerlinMusicPlayer2ScreenSaver_MIPSEL", {"name": config.plugins.MerlinSkinThemes.MerlinMusicPlayer2ScreenSaver_MIPSEL.value})
1491 if t.find("screens[@name='MerlinMusicPlayer2ScreenSaver_ARM']") is not None:
1492 ts = t.find("screens[@name='MerlinMusicPlayer2ScreenSaver_ARM']")
1493 if ts.find("screentheme[@name='" + config.plugins.MerlinSkinThemes.MerlinMusicPlayer2ScreenSaver_ARM.value + "']") is not None:
1494 Tree.SubElement(xmldesign, "MerlinMusicPlayer2ScreenSaver_ARM", {"name": config.plugins.MerlinSkinThemes.MerlinMusicPlayer2ScreenSaver_ARM.value})
1496 if t.find("screens[@name='MerlinMusicPlayer2ScreenSaver_AARCH64']") is not None:
1497 ts = t.find("screens[@name='MerlinMusicPlayer2ScreenSaver_AARCH64']")
1498 if ts.find("screentheme[@name='" + config.plugins.MerlinSkinThemes.MerlinMusicPlayer2ScreenSaver_AARCH64.value + "']") is not None:
1499 Tree.SubElement(xmldesign, "MerlinMusicPlayer2ScreenSaver_AARCH64", {"name": config.plugins.MerlinSkinThemes.MerlinMusicPlayer2ScreenSaver_AARCH64.value})
1502 if xmlroot.find("lcdscreenthemes") is not None:
1503 t = xmlroot.find("lcdscreenthemes")
1505 if t.find("screens[@name='InfoBarSummary']") is not None:
1506 ts = t.find("screens[@name='InfoBarSummary']")
1507 if ts.find("lcdscreentheme[@name='" + config.plugins.MerlinSkinThemes.LCDInfoBar.value + "']") is not None:
1508 Tree.SubElement(xmldesign, "LCDInfoBar", {"name": config.plugins.MerlinSkinThemes.LCDInfoBar.value})
1510 if t.find("screens[@name='EventView_summary']") is not None:
1511 ts = t.find("screens[@name='EventView_summary']")
1512 if ts.find("lcdscreentheme[@name='" + config.plugins.MerlinSkinThemes.LCDEventView.value + "']") is not None:
1513 Tree.SubElement(xmldesign, "LCDEventView", {"name": config.plugins.MerlinSkinThemes.LCDEventView.value})
1515 if t.find("screens[@name='StandbySummary']") is not None:
1516 ts = t.find("screens[@name='StandbySummary']")
1517 if ts.find("lcdscreentheme[@name='" + config.plugins.MerlinSkinThemes.LCDStandby.value + "']") is not None:
1518 Tree.SubElement(xmldesign, "LCDStandby", {"name": config.plugins.MerlinSkinThemes.LCDStandby.value})
1520 if t.find("screens[@name='InfoBarMoviePlayerSummary']") is not None:
1521 ts = t.find("screens[@name='InfoBarMoviePlayerSummary']")
1522 if ts.find("lcdscreentheme[@name='" + config.plugins.MerlinSkinThemes.LCDMoviePlayer.value + "']") is not None:
1523 Tree.SubElement(xmldesign, "LCDMoviePlayer", {"name": config.plugins.MerlinSkinThemes.LCDMoviePlayer.value})
1525 if t.find("screens[@name='MerlinMusicPlayer2LCDScreen']") is not None:
1526 ts = t.find("screens[@name='MerlinMusicPlayer2LCDScreen']")
1527 if ts.find("lcdscreentheme[@name='" + config.plugins.MerlinSkinThemes.LCDMMP2.value + "']") is not None:
1528 Tree.SubElement(xmldesign, "LCDMMP2", {"name": config.plugins.MerlinSkinThemes.LCDMMP2.value})
1531 if xmlroot.find("oledscreenthemes") is not None:
1532 t = xmlroot.find("oledscreenthemes")
1534 if t.find("screens[@name='InfoBarSummary']") is not None:
1535 ts = t.find("screens[@name='InfoBarSummary']")
1536 if ts.find("oledscreentheme[@name='" + config.plugins.MerlinSkinThemes.OLEDInfoBar.value + "']") is not None:
1537 Tree.SubElement(xmldesign, "OLEDInfoBar", {"name": config.plugins.MerlinSkinThemes.OLEDInfoBar.value})
1539 if t.find("screens[@name='EventView_summary']") is not None:
1540 ts = t.find("screens[@name='EventView_summary']")
1541 if ts.find("oledscreentheme[@name='" + config.plugins.MerlinSkinThemes.OLEDEventView.value + "']") is not None:
1542 Tree.SubElement(xmldesign, "OLEDEventView", {"name": config.plugins.MerlinSkinThemes.OLEDEventView.value})
1544 if t.find("screens[@name='StandbySummary']") is not None:
1545 ts = t.find("screens[@name='StandbySummary']")
1546 if ts.find("oledscreentheme[@name='" + config.plugins.MerlinSkinThemes.OLEDStandby.value + "']") is not None:
1547 Tree.SubElement(xmldesign, "OLEDStandby", {"name": config.plugins.MerlinSkinThemes.OLEDStandby.value})
1549 if t.find("screens[@name='InfoBarMoviePlayerSummary']") is not None:
1550 ts = t.find("screens[@name='InfoBarMoviePlayerSummary']")
1551 if ts.find("oledscreentheme[@name='" + config.plugins.MerlinSkinThemes.OLEDMoviePlayer.value + "']") is not None:
1552 Tree.SubElement(xmldesign, "OLEDMoviePlayer", {"name": config.plugins.MerlinSkinThemes.OLEDMoviePlayer.value})
1554 if t.find("screens[@name='MerlinMusicPlayer2LCDScreen']") is not None:
1555 ts = t.find("screens[@name='MerlinMusicPlayer2LCDScreen']")
1556 if ts.find("oledscreentheme[@name='" + config.plugins.MerlinSkinThemes.OLEDMMP2.value + "']") is not None:
1557 Tree.SubElement(xmldesign, "OLEDMMP2", {"name": config.plugins.MerlinSkinThemes.OLEDMMP2.value})
1559 # External LCD Screens
1560 if xmlroot.find("extlcdscreenthemes") is not None:
1561 t = xmlroot.find("extlcdscreenthemes")
1563 if t.find("screens[@name='InfoBarSummary']") is not None:
1564 ts = t.find("screens[@name='InfoBarSummary']")
1565 if ts.find("extlcdscreentheme[@name='" + config.plugins.MerlinSkinThemes.ExtLCDInfoBar.value + "']") is not None:
1566 Tree.SubElement(xmldesign, "ExtLCDInfoBar", {"name": config.plugins.MerlinSkinThemes.ExtLCDInfoBar.value})
1568 if t.find("screens[@name='EventView_summary']") is not None:
1569 ts = t.find("screens[@name='EventView_summary']")
1570 if ts.find("extlcdscreentheme[@name='" + config.plugins.MerlinSkinThemes.ExtLCDEventView.value + "']") is not None:
1571 Tree.SubElement(xmldesign, "ExtLCDEventView", {"name": config.plugins.MerlinSkinThemes.ExtLCDEventView.value})
1573 if t.find("screens[@name='StandbySummary']") is not None:
1574 ts = t.find("screens[@name='StandbySummary']")
1575 if ts.find("extlcdscreentheme[@name='" + config.plugins.MerlinSkinThemes.ExtLCDStandby.value + "']") is not None:
1576 Tree.SubElement(xmldesign, "ExtLCDStandby", {"name": config.plugins.MerlinSkinThemes.ExtLCDStandby.value})
1578 if t.find("screens[@name='InfoBarMoviePlayerSummary']") is not None:
1579 ts = t.find("screens[@name='InfoBarMoviePlayerSummary']")
1580 if ts.find("extlcdscreentheme[@name='" + config.plugins.MerlinSkinThemes.ExtLCDMoviePlayer.value + "']") is not None:
1581 Tree.SubElement(xmldesign, "ExtLCDMoviePlayer", {"name": config.plugins.MerlinSkinThemes.ExtLCDMoviePlayer.value})
1583 if t.find("screens[@name='MerlinMusicPlayer2LCDScreen']") is not None:
1584 ts = t.find("screens[@name='MerlinMusicPlayer2LCDScreen']")
1585 if ts.find("extlcdscreentheme[@name='" + config.plugins.MerlinSkinThemes.ExtLCDMMP2.value + "']") is not None:
1586 Tree.SubElement(xmldesign, "ExtLCDMMP2", {"name": config.plugins.MerlinSkinThemes.ExtLCDMMP2.value})
1590 if xmlroot.find("cornerradius") is not None:
1591 if xmldesign.find("CornerRadius") is not None:
1592 td = xmldesign.find("CornerRadius")
1593 td.set("name", config.plugins.MerlinSkinThemes.CornerRadius.value)
1595 Tree.SubElement(xmldesign, "CornerRadius", {"name": config.plugins.MerlinSkinThemes.CornerRadius.value})
1597 self.XMLindent(xmlroot, 0)
1599 curTree.write(MerlinSkinThemes.selThemeFile)
1603 def deleteDesign(self):
1604 if self.MSTDesigns.value == "-none-":
1605 self.session.open(MessageBox,_("nothing to delete"), MessageBox.TYPE_ERROR)
1607 curTree = Tree.parse(MerlinSkinThemes.selThemeFile)
1608 xmlroot = curTree.getroot()
1609 designs = xmlroot.find("designs")
1610 for design in designs.findall("design"):
1611 if design.get("name") == config.plugins.MerlinSkinThemes.Design.value:
1612 designs.remove(design)
1614 self.XMLindent(xmlroot, 0)
1616 curTree.write(MerlinSkinThemes.selThemeFile)
1620 def setDesign(self):
1621 curTree = Tree.parse(MerlinSkinThemes.selThemeFile)
1622 xmlroot = curTree.getroot()
1623 designs = xmlroot.find("designs")
1624 for design in designs.findall("design"):
1625 if design.get("name") == config.plugins.MerlinSkinThemes.Design.value:
1626 if design.find("ColorTheme") is not None:
1627 tmp = design.find("ColorTheme")
1629 self.TColor.setValue(tmp.get("name"))
1631 print "[MST] TColor not found"
1633 if design.find("SkinPathTheme") is not None:
1634 tmp = design.find("SkinPathTheme")
1636 self.SPath.setValue(tmp.get("name"))
1638 print "[MST] SPath not found"
1640 if design.find("FontTheme") is not None:
1641 tmp = design.find("FontTheme")
1643 self.TFont.setValue(tmp.get("name"))
1645 print "[MST] TFont not found"
1647 if design.find("BorderSetTheme") is not None:
1648 tmp = design.find("BorderSetTheme")
1650 self.TBorder.setValue(tmp.get("name"))
1652 print "[MST] TBorder not found"
1654 if design.find("WindowStyleScrollbarTheme") is not None:
1655 tmp = design.find("WindowStyleScrollbarTheme")
1656 #print "[MST] TScroll: %s" % self["config"].getCurrent()[1].getChoices()
1657 #print "[MST] TScroll: %s" % self["config"].getCurrent()[0]
1658 #print "[MST] TScroll len: %s" % len(self["config"].getCurrent()[1].getChoices())
1660 #print "[MST] BEVOR"
1661 #print "[MST] TScroll: %s" % self.TScroll.getChoices()
1662 #print "[MST] TScroll default: %s" % tmp.get("name")
1663 #print "[MST] TScroll index: %s" % self.TScroll.getChoices().index(tmp.get("name"))
1664 #print "[MST] TScroll len: %s" % len(self.TScroll.getChoices())
1667 self.TScroll.setValue(tmp.get("name"))
1669 print "[MST] TScroll not found"
1671 if design.find("ComponentTheme") is not None:
1672 tmp = design.find("ComponentTheme")
1674 self.TComponent.setValue(tmp.get("name"))
1676 print "[MST] TComponent not found"
1678 if design.find("LayoutTheme") is not None:
1679 tmp = design.find("LayoutTheme")
1681 self.TLayout.setValue(tmp.get("name"))
1683 print "[MST] TLayout not found"
1685 if design.find("GlobalsTheme") is not None:
1686 tmp = design.find("GlobalsTheme")
1688 self.TGlobals.setValue(tmp.get("name"))
1690 print "[MST] TGlobals not found"
1692 if design.find("PNGTheme") is not None:
1693 tmp = design.find("PNGTheme")
1695 self.TPNG.setValue(tmp.get("name"))
1697 print "[MST] TPNG not found"
1700 if design.find("InfoBar") is not None:
1701 tmp = design.find("InfoBar")
1703 self.SInfobar.setValue(tmp.get("name"))
1705 print "[MST] SInfobar not found"
1707 if design.find("Menu") is not None:
1708 tmp = design.find("Menu")
1710 self.SMenu.setValue(tmp.get("name"))
1712 print "[MST] SMenu not found"
1714 if design.find("PluginBrowser") is not None:
1715 tmp = design.find("PluginBrowser")
1717 self.SPluginBrowser.setValue(tmp.get("name"))
1719 print "[MST] SPluginBrowser not found"
1721 if design.find("ChannelSelection") is not None:
1722 tmp = design.find("ChannelSelection")
1724 self.SChannelSel.setValue(tmp.get("name"))
1726 print "[MST] SChannelSel not found"
1728 if design.find("MovieSelection") is not None:
1729 tmp = design.find("MovieSelection")
1731 self.SMovieSel.setValue(tmp.get("name"))
1733 print "[MST] SMovieSel not found"
1735 if design.find("MoviePlayer") is not None:
1736 tmp = design.find("MoviePlayer")
1738 self.SMoviePlay.setValue(tmp.get("name"))
1740 print "[MST] SMoviePlayer not found"
1742 if design.find("SecondInfoBar") is not None:
1743 tmp = design.find("SecondInfoBar")
1745 self.S2IB.setValue(tmp.get("name"))
1747 print "[MST] S2IB not found"
1749 if design.find("GraphMultiEPG") is not None:
1750 tmp = design.find("GraphMultiEPG")
1752 self.graphmultiepg.setValue(tmp.get("name"))
1754 print "[MST] GMEPG not found"
1756 if design.find("EventView") is not None:
1757 tmp = design.find("EventView")
1759 self.EventView.setValue(tmp.get("name"))
1761 print "[MST] EventView not found"
1763 if design.find("EPGSelection") is not None:
1764 tmp = design.find("EPGSelection")
1766 self.EPGSelection.setValue(tmp.get("name"))
1768 print "[MST] EPGSelection not found"
1770 if design.find("MessageBox") is not None:
1771 tmp = design.find("MessageBox")
1773 self.SMsgBox.setValue(tmp.get("name"))
1775 print "[MST] SMsgBox not found"
1777 if design.find("InputBox") is not None:
1778 tmp = design.find("InputBox")
1780 self.SInBox.setValue(tmp.get("name"))
1782 print "[MST] SInBox not found"
1784 if design.find("ChoiceBox") is not None:
1785 tmp = design.find("ChoiceBox")
1787 self.SChoiceBox.setValue(tmp.get("name"))
1789 print "[MST] SChoiceBox not found"
1791 if design.find("Mute") is not None:
1792 tmp = design.find("Mute")
1794 self.SMute.setValue(tmp.get("name"))
1796 print "[MST] SMute not found"
1798 if design.find("Volume") is not None:
1799 tmp = design.find("Volume")
1801 self.SVolume.setValue(tmp.get("name"))
1803 print "[MST] SVolume not found"
1805 if design.find("MerlinMusicPlayer2Screen") is not None:
1806 tmp = design.find("MerlinMusicPlayer2Screen")
1808 self.SMMP2.setValue(tmp.get("name"))
1810 print "[MST] SMMP2 not found"
1812 if design.find("MerlinMusicPlayer2Screen_MIPSEL") is not None:
1813 tmp = design.find("MerlinMusicPlayer2Screen_MIPSEL")
1815 self.SMMP2Mipsel.setValue(tmp.get("name"))
1817 print "[MST] SMMP2Mipsel not found"
1819 if design.find("MerlinMusicPlayer2Screen_ARM") is not None:
1820 tmp = design.find("MerlinMusicPlayer2Screen_ARM")
1822 self.SMMP2Arm.setValue(tmp.get("name"))
1824 print "[MST] SMMP2Arm not found"
1826 if design.find("MerlinMusicPlayer2Screen_AARCH64") is not None:
1827 tmp = design.find("MerlinMusicPlayer2Screen_AARCH64")
1829 self.SMMP2Arch64.setValue(tmp.get("name"))
1831 print "[MST] SMMP2Arch64 not found"
1833 if design.find("MerlinMusicPlayer2ScreenSaver") is not None:
1834 tmp = design.find("MerlinMusicPlayer2ScreenSaver")
1836 self.SMMP2Saver.setValue(tmp.get("name"))
1838 print "[MST] SMMP2Saver not found"
1840 if design.find("MerlinMusicPlayer2ScreenSaver_MIPSEL") is not None:
1841 tmp = design.find("MerlinMusicPlayer2ScreenSaver_MIPSEL")
1843 self.SMMP2SaverMipsel.setValue(tmp.get("name"))
1845 print "[MST] SMMP2SaverMipsel not found"
1847 if design.find("MerlinMusicPlayer2ScreenSaver_ARM") is not None:
1848 tmp = design.find("MerlinMusicPlayer2ScreenSaver_ARM")
1850 self.SMMP2SaverArm.setValue(tmp.get("name"))
1852 print "[MST] SMMP2SaverArm not found"
1854 if design.find("MerlinMusicPlayer2ScreenSaver_AARCH64") is not None:
1855 tmp = design.find("MerlinMusicPlayer2ScreenSaver_AARCH64")
1857 self.SMMP2SaverArch64.setValue(tmp.get("name"))
1859 print "[MST] SMMP2SaverArch64 not found"
1862 if design.find("LCDInfoBar") is not None:
1863 tmp = design.find("LCDInfoBar")
1865 self.LSInfobar.setValue(tmp.get("name"))
1867 print "[MST] LSInfobar not found"
1869 if design.find("LCDEventView") is not None:
1870 tmp = design.find("LCDEventView")
1872 self.LSEventView.setValue(tmp.get("name"))
1874 print "[MST] LSEventView not found"
1876 if design.find("LCDStandby") is not None:
1877 tmp = design.find("LCDStandby")
1879 self.LSStandby.setValue(tmp.get("name"))
1881 print "[MST] LSStandby not found"
1883 if design.find("LCDMoviePlayer") is not None:
1884 tmp = design.find("LCDMoviePlayer")
1886 self.LSMoviePlayer.setValue(tmp.get("name"))
1888 print "[MST] LSMoviePlayer not found"
1890 if design.find("LCDMMP2") is not None:
1891 tmp = design.find("LCDMMP2")
1893 self.LSMMP2.setValue(tmp.get("name"))
1895 print "[MST] LSMMP2 not found"
1898 if design.find("OLEDInfoBar") is not None:
1899 tmp = design.find("OLEDInfoBar")
1901 self.OSInfobar.setValue(tmp.get("name"))
1903 print "[MST] OSInfobar not found"
1905 if design.find("OLEDEventView") is not None:
1906 tmp = design.find("OLEDEventView")
1908 self.OSEventView.setValue(tmp.get("name"))
1910 print "[MST] OSEventView not found"
1912 if design.find("OLEDStandby") is not None:
1913 tmp = design.find("OLEDStandby")
1915 self.OSStandby.setValue(tmp.get("name"))
1917 print "[MST] OSStandby not found"
1919 if design.find("OLEDMoviePlayer") is not None:
1920 tmp = design.find("OLEDMoviePlayer")
1922 self.OSMoviePlayer.setValue(tmp.get("name"))
1924 print "[MST] OSMoviePlayer not found"
1926 if design.find("OLEDMMP2") is not None:
1927 tmp = design.find("OLEDMMP2")
1929 self.OSMMP2.setValue(tmp.get("name"))
1931 print "[MST] OSMMP2 not found"
1934 if design.find("ExtLCDInfoBar") is not None:
1935 tmp = design.find("ExtLCDInfoBar")
1937 self.ExtLSInfobar.setValue(tmp.get("name"))
1939 print "[MST] ExtLSInfobar not found"
1941 if design.find("ExtLCDEventView") is not None:
1942 tmp = design.find("ExtLCDEventView")
1944 self.ExtLSEventView.setValue(tmp.get("name"))
1946 print "[MST] ExtLSEventView not found"
1948 if design.find("ExtLCDStandby") is not None:
1949 tmp = design.find("ExtLCDStandby")
1951 self.ExtLSStandby.setValue(tmp.get("name"))
1953 print "[MST] ExtLSStandby not found"
1955 if design.find("ExtLCDMoviePlayer") is not None:
1956 tmp = design.find("ExtLCDMoviePlayer")
1958 self.ExtLSMoviePlayer.setValue(tmp.get("name"))
1960 print "[MST] ExtLSMoviePlayer not found"
1962 if design.find("ExtLCDMMP2") is not None:
1963 tmp = design.find("ExtLCDMMP2")
1965 self.ExtLSMMP2.setValue(tmp.get("name"))
1967 print "[MST] ExtLSMMP2 not found"
1970 self["config"].setList(self.clist)
1971 #self["config"].hide()
1972 #self["config"].show()
1974 if design.find("CornerRadius") is not None:
1975 tmp = design.find("CornerRadius")
1977 self.CornerRadius.setValue(tmp.get("name"))
1979 print "[MST] CornerRadius not found"
1982 if self.curList == "SkinsList":
1983 if self["SkinsList"].getCurrent()[3][7] == "":
1984 self.curList = "ConfigList"
1987 self["ListLabel"].setText(_("Configlist") )
1989 self["ListLabel"].setText(_("Configlist") + " - ATTENTION: skin_user.xml found!!!")
1991 if fileExists(MerlinSkinThemes.selSkinFile):
1992 self.CopyrightInfo()
1996 if self["config"].getCurrent()[0] == "Design":
1997 self["key_green"].setText(_("apply themes"))
1998 self["key_yellow"].setText(_("delete design"))
1999 elif self["config"].getCurrent()[0] == "Skin":
2000 self["key_green"].setText(_("apply themes"))
2001 self["key_yellow"].setText(_("save as design"))
2003 self["key_green"].setText(_("apply themes"))
2004 self["key_yellow"].setText(_("save as design"))
2006 self["key_green"].show()
2007 self["key_yellow"].show()
2009 self["SkinsList"].hide()
2010 self["config"].show()
2012 config.plugins.MerlinSkinThemes.Skin.value = self["SkinsList"].getCurrent()[1][7]
2015 self.CopyrightInfo()
2016 self.session.open(MessageBox,_("No themes.xml or skin.xml found.\nPlease select a valid skin including themes.xml"), MessageBox.TYPE_ERROR, title=_("Error"))
2019 self.curList = "SkinsList"
2022 self["ListLabel"].setText(_("Skinlist") )
2024 self["ListLabel"].setText(_("Skinlist") + " - ATTENTION: skin_user.xml found!!!")
2026 self["SkinCopyright"].setText("")
2028 self["key_green"].setText(_("switch to skin"))
2029 self["key_green"].hide()
2030 self["key_yellow"].setText(_(""))
2031 self["key_yellow"].hide()
2034 self.updateSkinList()
2036 #print "[MST] updateSkinList: ", t2 - t1
2038 self["SkinsList"].show()
2039 self["config"].hide()
2041 if fileExists(MerlinSkinThemes.selSkinFile):
2042 self.CopyrightInfo()
2045 if self.curList == "SkinsList":
2046 self[self.curList].up()
2048 if fileExists(MerlinSkinThemes.selSkinFile):
2049 self.CopyrightInfo()
2052 self["config"].instance.moveSelection(self["config"].instance.moveUp)
2053 if self["config"].getCurrent()[0] == "Design":
2054 self["key_green"].setText(_("apply themes"))
2055 self["key_yellow"].setText(_("delete design"))
2056 elif self["config"].getCurrent()[0] == "Skin":
2057 self["key_green"].setText(_("apply themes"))
2058 self["key_yellow"].setText(_("save as design"))
2060 self["key_green"].setText(_("apply themes"))
2061 self["key_yellow"].setText(_("save as design"))
2064 if self.curList == "SkinsList":
2065 self[self.curList].down()
2067 if fileExists(MerlinSkinThemes.selSkinFile):
2068 self.CopyrightInfo()
2071 self["config"].instance.moveSelection(self["config"].instance.moveDown)
2072 if self["config"].getCurrent()[0] == "Design":
2073 self["key_green"].setText(_("apply themes"))
2074 self["key_yellow"].setText(_("delete design"))
2075 elif self["config"].getCurrent()[0] == "Skin":
2076 self["key_green"].setText(_("apply themes"))
2077 self["key_yellow"].setText(_("save as design"))
2079 self["key_green"].setText(_("apply themes"))
2080 self["key_yellow"].setText(_("save as design"))
2083 if self.curList == "SkinsList":
2084 self[self.curList].pageUp()
2086 ConfigListScreen.keyLeft(self)
2088 if self["config"].getCurrent()[0] in myList:
2089 # PreviewPNG anzeigen
2090 pngpath = resolveFilename(SCOPE_SKIN) + MerlinSkinThemes.selSkinName + "/preview/" + self["config"].getCurrent()[0] + "/" + self["config"].getCurrent()[1].value + ".png"
2092 if not fileExists(pngpath):
2093 pngpath = resolveFilename(SCOPE_PLUGINS) + "Extensions/MerlinSkinThemes/noprev.png"
2095 self["Preview"].instance.setPixmapFromFile(pngpath)
2096 self["Preview"].show()
2098 if self["config"].getCurrent()[0] == "Design":
2099 if config.plugins.MerlinSkinThemes.Design.value == "-none-":
2102 # PreviewPNG anzeigen
2103 pngpath = resolveFilename(SCOPE_SKIN) + MerlinSkinThemes.selSkinName + "/preview/" + config.plugins.MerlinSkinThemes.Design.value + ".png"
2105 if not fileExists(pngpath):
2106 pngpath = resolveFilename(SCOPE_PLUGINS) + "Extensions/MerlinSkinThemes/noprev.png"
2108 self["Preview"].instance.setPixmapFromFile(pngpath)
2109 self["Preview"].show()
2114 if self.curList == "SkinsList":
2115 self[self.curList].pageDown()
2117 ConfigListScreen.keyRight(self)
2119 if self["config"].getCurrent()[0] in myList:
2120 # PreviewPNG anzeigen
2121 pngpath = resolveFilename(SCOPE_SKIN) + MerlinSkinThemes.selSkinName + "/preview/" + self["config"].getCurrent()[0] + "/" + self["config"].getCurrent()[1].value + ".png"
2123 if not fileExists(pngpath):
2124 pngpath = resolveFilename(SCOPE_PLUGINS) + "Extensions/MerlinSkinThemes/noprev.png"
2126 self["Preview"].instance.setPixmapFromFile(pngpath)
2127 self["Preview"].show()
2129 if self["config"].getCurrent()[0] == "Design":
2130 if config.plugins.MerlinSkinThemes.Design.value == "-none-":
2133 # PreviewPNG anzeigen
2134 pngpath = resolveFilename(SCOPE_SKIN) + MerlinSkinThemes.selSkinName + "/preview/" + config.plugins.MerlinSkinThemes.Design.value + ".png"
2136 if not fileExists(pngpath):
2137 pngpath = resolveFilename(SCOPE_PLUGINS) + "Extensions/MerlinSkinThemes/noprev.png"
2139 self["Preview"].instance.setPixmapFromFile(pngpath)
2140 self["Preview"].show()
2144 def changedSkinsList(self):
2145 self["SkinCopyright"].setText("")
2147 MerlinSkinThemes.selSkinName = self["SkinsList"].getCurrent()[1][7]
2149 MerlinSkinThemes.selSkinFile = resolveFilename(SCOPE_SKIN) + MerlinSkinThemes.selSkinName + "/skin.xml"
2150 MerlinSkinThemes.selThemeFile = resolveFilename(SCOPE_SKIN) + MerlinSkinThemes.selSkinName + "/themes.xml"
2152 #if fileExists(MerlinSkinThemes.selSkinFile):
2153 # self.CopyrightInfo()
2155 if config.plugins.MerlinSkinThemes.ShowPrevPNG.value == "1":
2158 if self["SkinsList"].getCurrent()[2][7] == "active skin":
2159 self["key_green"].hide()
2161 self["key_green"].show()
2163 if self["SkinsList"].getCurrent()[3][7] == "no skin.xml":
2164 self["key_green"].hide()
2166 self["key_yellow"].show()
2167 self["key_yellow"].setText(_("delete"))
2169 elif self["SkinsList"].getCurrent()[3][7] == "no themes.xml":
2170 self["key_green"].show()
2172 self["key_yellow"].show()
2173 self["key_yellow"].setText(_("create themes"))
2176 self["key_yellow"].show()
2178 self["key_yellow"].hide()
2181 def updateSkinList(self):
2182 self["SkinsList"].buildList()
2184 def setThemes(self):
2185 # set all "inactive", set new theme "active"
2186 curTree = Tree.parse(MerlinSkinThemes.selThemeFile)
2187 rootTheme = curTree.getroot()
2189 curSkin = Tree.parse(MerlinSkinThemes.selSkinFile)
2190 rootSkin = curSkin.getroot()
2192 if rootTheme.find("colortheme") is not None:
2193 for theme in rootTheme.findall("colortheme"):
2194 if theme.get("name") == config.plugins.MerlinSkinThemes.ColorTheme.value:
2195 theme.set("value", "active")
2198 SkinColors = rootSkin.find("colors")
2201 for color in SkinColors.findall("color"):
2202 SkinColors.remove(color)
2205 ThemeColors = theme.find("colors")
2207 for color in ThemeColors.findall("color"):
2208 name = color.get("name")
2209 value = color.get("value")
2211 Tree.SubElement(SkinColors, "color", {"name": name, "value": value})
2214 theme.set("value", "inactive")
2216 if rootTheme.find("fonttheme") is not None:
2217 for theme in rootTheme.findall("fonttheme"):
2218 if theme.get("name") == config.plugins.MerlinSkinThemes.FontTheme.value:
2219 theme.set("value", "active")
2222 SkinFonts = rootSkin.find("fonts")
2225 for font in SkinFonts.findall("font"):
2226 SkinFonts.remove(font)