from Components.Label import Label
from Components.ProgressBar import ProgressBar
+from Tools.Directories import resolveFilename, SCOPE_SKIN
+
from enigma import quitMainloop
import xml.dom.minidom
# read the menu
-try:
- # first we search in the current path
- menufile = file('data/menu.xml', 'r')
-except IOError:
- # if not found in the current path, we use the global datadir-path
- menufile = file('/usr/share/enigma2/menu.xml', 'r')
+menufile = file(resolveFilename(SCOPE_SKIN, 'menu.xml'), 'r')
mdom = xml.dom.minidom.parseString(menufile.read())
menufile.close()
# plus possible arguments, as
# string (as we want to reference
# stuff which is just imported)
- # FIXME. somehow.
+ # FIXME. somehow
+ print arg
if arg[0] != "":
exec "from " + arg[0] + " import *"
if x.nodeType != xml.dom.minidom.Element.nodeType:
continue
elif x.tagName == 'screen':
- module = "Screens." + getValbyAttr(x, "module")
+ module = getValbyAttr(x, "module")
screen = getValbyAttr(x, "screen")
if len(screen) == 0:
screen = module
+
+ if module != "":
+ module = "Screens." + module
# check for arguments. they will be appended to the
# openDialog call