enigma2: update to 4.3.0r28
[opendreambox.git] / meta-opendreambox / recipes-dreambox / enigma2 / enigma2-4.3.0r28 / 0001-Menu-fix-Menu-icon-loading-failing-on-non-default-sk.patch
1 From ba380beb22563203168c96a9c13fa6e475252204 Mon Sep 17 00:00:00 2001
2 From: reichi <reichi@opendreambox.org>
3 Date: Tue, 21 Feb 2017 18:41:15 +0100
4 Subject: [PATCH 1/2] Menu: fix Menu icon loading failing on non-default skins
5  when default has a matching svgj (which has the wrong path is and will
6  therefore be ignored)
7
8 ---
9  usr/lib/enigma2/python/Screens/Menu.py | 6 +++---
10  1 file changed, 3 insertions(+), 3 deletions(-)
11
12 diff --git a/usr/lib/enigma2/python/Screens/Menu.py b/usr/lib/enigma2/python/Screens/Menu.py
13 index a6b21dd..b59af7d 100644
14 --- a/usr/lib/enigma2/python/Screens/Menu.py
15 +++ b/usr/lib/enigma2/python/Screens/Menu.py
16 @@ -10,7 +10,7 @@ from Components.PluginComponent import plugins
17  from Components.config import config
18  from Components.SystemInfo import SystemInfo
19  
20 -from Tools.Directories import resolveFilename, SCOPE_SKIN, SCOPE_CURRENT_SKIN
21 +from Tools.Directories import resolveFilename, SCOPE_SKIN, SCOPE_CURRENT_SKIN, fileExists
22  from Tools.LoadPixmap import LoadPixmap
23  
24  import xml.etree.cElementTree
25 @@ -32,13 +32,13 @@ def MenuEntryPixmap(entryID, png_cache, lastMenuID):
26         png = png_cache.get(entryID, None)
27         if png is None: # no cached entry
28                 pngPath = resolveFilename(SCOPE_CURRENT_SKIN, "menu/" + entryID + ".svg")
29 -               if not pngPath:
30 -                       resolveFilename(SCOPE_CURRENT_SKIN, "menu/" + entryID + ".png")
31                 pos = config.skin.primary_skin.value.rfind('/')
32                 if pos > -1:
33                         current_skin = config.skin.primary_skin.value[:pos+1]
34                 else:
35                         current_skin = ""
36 +               if not fileExists(pngPath) or not (( current_skin in pngPath and current_skin ) or not current_skin ):
37 +                       pngPath = resolveFilename(SCOPE_CURRENT_SKIN, "menu/" + entryID + ".png")
38                 if ( current_skin in pngPath and current_skin ) or not current_skin:
39                         png = LoadPixmap(pngPath, cached=True, size=pixmapSize) #lets look for a dedicated icon
40                 if png is None: # no dedicated icon found
41 -- 
42 2.1.4
43