use Tools.Directories to get paths
[enigma2.git] / lib / python / Screens / Menu.py
index a12571e7c0ed58ebe835ffdb137e8070f7133fbe..68a8ef98bfca4c31ac86551499efaa8c6d951914 100644 (file)
@@ -6,6 +6,8 @@ from Components.Button import Button
 from Components.Label import Label
 from Components.ProgressBar import ProgressBar
 
 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
 from enigma import quitMainloop
 
 import xml.dom.minidom
@@ -29,12 +31,7 @@ def doGlobal(screen):
 
 
 # read the menu
 
 
 # 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()
 
 mdom = xml.dom.minidom.parseString(menufile.read())
 menufile.close()