1 diff --git a/data/skin.xml b/data/skin.xml
2 index bbf4dd0..b99bdce 100755
6 <convert type="ConditionalShowHide" />
8 <!-- Audio icon (is there multichannel audio?) -->
9 -<!-- <widget source="session.CurrentService" render="Pixmap" pixmap="skin_default/icons/icon_dolby.png" position="645,48" zPosition="1" size="26,16" alphatest="on">
10 + <widget source="session.CurrentService" render="Pixmap" pixmap="skin_default/icons/icon_dolby.png" position="645,48" zPosition="1" size="26,16" alphatest="on">
11 <convert type="ServiceInfo">IsMultichannel</convert>
12 <convert type="ConditionalShowHide" />
15 <!-- Progressbar (current event duration)-->
16 <ePixmap pixmap="skin_default/progress_bg.png" position="48,77" size="84,7" transparent="1" alphatest="on" />
17 <widget source="session.Event_Now" render="Progress" pixmap="skin_default/progress_small.png" position="50,78" zPosition="1" size="80,5" transparent="1">
18 diff --git a/lib/gdi/epng.cpp b/lib/gdi/epng.cpp
19 index fd33298..d8c1982 100644
20 --- a/lib/gdi/epng.cpp
21 +++ b/lib/gdi/epng.cpp
22 @@ -116,10 +116,71 @@ int loadPNG(ePtr<gPixmap> &result, const char *filename)
24 surface->clut.start=0;
25 png_read_end(png_ptr, end_info);
29 eDebug("%s: %dx%dx%d png, %d", filename, (int)width, (int)height, (int)bit_depth, color_type);
31 +#else //csh Support for 32bit png file.
32 + }else if (color_type == PNG_COLOR_TYPE_RGB_ALPHA && bit_depth == 8){
33 +// eDebug("%s: %dx%dx%d png, %d", filename, (int)width, (int)height, (int)bit_depth, color_type);
34 + result=new gPixmap(eSize(width, height), bit_depth*4);
35 + gSurface *surface = result->surface;
37 + png_bytep *rowptr=new png_bytep[height];
40 + //png_set_swap_alpha(png_ptr);
42 + if (color_type & PNG_COLOR_MASK_COLOR)
43 + png_set_bgr(png_ptr);
47 + int number_passes = png_set_interlace_handling(png_ptr);
49 + for (unsigned int i=0; i<height; i++)
50 + rowptr[i]=((png_byte*)(surface->data))+i*surface->stride;
52 + for (pass = 0; pass < number_passes; pass++)
53 + for (int y = 0; y < height; y++)
55 + png_read_rows(png_ptr, &rowptr[y], NULL, 1);
59 + png_bytep testptr = rowptr[32] + sizeof(unsigned int)*32;
61 + for(int i = 0 ; i < 40 ; i ++)
62 + fprintf(stderr, "0x%x\n", testptr[i]);
64 + for (int y = 0; y < height; y++){ //csh
66 + unsigned int *ptr = (unsigned int *)rowptr[y];
67 + for(int i = 0 ; i < width ; i ++){
74 + surface->clut.data=0;
75 + surface->clut.colors=0;
76 + surface->clut.start=0;
78 + testptr = rowptr[32] + sizeof(unsigned int)*32;
79 + fprintf(stderr, "----------------------------------------------\n");
80 + for(int i = 0 ; i < 40 ; i ++)
81 + fprintf(stderr, "0x%x\n", testptr[i]);
84 + png_read_end(png_ptr, end_info);
88 + eDebug("%s: %dx%dx%d png, %d", filename, (int)width, (int)height, (int)bit_depth, color_type);
92 png_destroy_read_struct(&png_ptr, &info_ptr,&end_info);
94 diff --git a/lib/python/Screens/ChannelSelection.py b/lib/python/Screens/ChannelSelection.py
95 index 6813381..a4e2771 100755
96 --- a/lib/python/Screens/ChannelSelection.py
97 +++ b/lib/python/Screens/ChannelSelection.py
98 @@ -2,6 +2,8 @@ from Tools.Profile import profile
100 from Screen import Screen
101 from Components.Button import Button
103 +from Components.Label import Label
104 from Components.ServiceList import ServiceList
105 from Components.ActionMap import NumberActionMap, ActionMap, HelpableActionMap
106 from Components.MenuList import MenuList
107 @@ -732,6 +734,8 @@ class ChannelSelectionBase(Screen):
108 self["key_yellow"] = Button(_("Provider"))
109 self["key_blue"] = Button(_("Favourites"))
111 + self["etitle"] = Label(_('Channel Selection'))
113 self["list"] = ServiceList()
114 self.servicelist = self["list"]
116 @@ -877,25 +881,51 @@ class ChannelSelectionBase(Screen):
117 pos = titleStr.find(']')
119 pos = titleStr.find(')')
121 - titleStr = titleStr[:pos+1]
122 - Len = len(self.servicePath)
124 - base_ref = self.servicePath[0]
126 - end_ref = self.servicePath[Len-1]
129 - nameStr = self.getServiceName(base_ref)
130 - titleStr += ' ' + nameStr
131 - if end_ref is not None:
135 + if config.skin.primary_skin.value =="750S/skin.xml":
137 + titleStr = titleStr[:pos+1]
138 + Len = len(self.servicePath)
140 + base_ref = self.servicePath[0]
142 + end_ref = self.servicePath[Len-1]
145 - nameStr = self.getServiceName(end_ref)
146 - titleStr += nameStr
147 - self.setTitle(titleStr)
149 + nameStr = self.getServiceName(base_ref)
150 + if end_ref is not None:
151 + titles = ".../"+ nameStr
156 + nameStr = self.getServiceName(end_ref)
158 + self["etitle"].setText(titles)
160 + titles = "Channel Selection "+titleStr + ' ' + nameStr
161 + self["etitle"].setText(titles)
165 + titleStr = titleStr[:pos+1]
166 + Len = len(self.servicePath)
168 + base_ref = self.servicePath[0]
170 + end_ref = self.servicePath[Len-1]
173 + nameStr = self.getServiceName(base_ref)
174 + titleStr += ' ' + nameStr
175 + if end_ref is not None:
180 + nameStr = self.getServiceName(end_ref)
181 + titleStr += nameStr
182 + self.setTitle(titleStr)
185 self.servicelist.moveUp()
186 diff --git a/lib/python/Screens/FixedMenu.py b/lib/python/Screens/FixedMenu.py
187 index 0122346..39b48ac 100644
188 --- a/lib/python/Screens/FixedMenu.py
189 +++ b/lib/python/Screens/FixedMenu.py
190 @@ -20,3 +20,8 @@ class FixedMenu(Screen):
193 self["title"] = StaticText(title)
194 + self["thistory"] = StaticText(title)
195 + self["title0"] = StaticText('')
196 + self["title1"] = StaticText('')
197 + self["title2"] = StaticText('')
199 diff --git a/lib/python/Screens/Menu.py b/lib/python/Screens/Menu.py
200 index 2a8801c..fe5bcf0 100755
201 --- a/lib/python/Screens/Menu.py
202 +++ b/lib/python/Screens/Menu.py
203 @@ -22,6 +22,27 @@ from Screens.Setup import Setup, getSetupTitle
205 mdom = xml.etree.cElementTree.parse(resolveFilename(SCOPE_SKIN, 'menu.xml'))
207 +class title_History:
208 + def __init__(self):
212 + def reducehistory(self):
213 +# print "reducehistory" , self.thistory
214 + history_len = len(self.thistory.split('>'))
215 + if(history_len < 3):
218 + if(self.thistory == ''):
220 + result = self.thistory.rsplit('>',2)
221 + if(result[0] == ''):
224 + self.thistory = result[0] + '> '
226 +t_history = title_History()
229 def __init__(self, fnc, *args):
231 @@ -237,9 +258,39 @@ class Menu(Screen):
234 a = _(parent.get("text", "").encode("UTF-8"))
238 self["title"] = StaticText(a)
241 + self["thistory"] = StaticText(t_history.thistory)
242 + history_len = len(t_history.thistory)
243 + self["title0"] = StaticText('')
244 + self["title1"] = StaticText('')
245 + self["title2"] = StaticText('')
246 + if history_len < 13 :
247 + self["title0"] = StaticText(a)
248 + elif history_len < 21 :
249 + self["title0"] = StaticText('')
250 + self["title1"] = StaticText(a)
252 + self["title0"] = StaticText('')
253 + self["title1"] = StaticText('')
254 + self["title2"] = StaticText(a)
257 +# if(t_history.thistory ==''):
258 +# t_history.thistory = str(etitle) + ' > '
260 +# t_history.thistory = t_history.thistory + str(etitle) + ' > '
262 + if(t_history.thistory ==''):
263 + t_history.thistory = str(a) + ' > '
265 + t_history.thistory = t_history.thistory + str(a) + ' > '
268 def keyNumberGlobal(self, number):
269 print "menu keyNumber:", number
271 @@ -250,9 +301,11 @@ class Menu(Screen):
274 def closeNonRecursive(self):
275 + t_history.reducehistory()
278 def closeRecursive(self):
282 def createSummary(self):
283 diff --git a/skin.py b/skin.py
284 index a0190f1..2de2cf5 100755
287 @@ -50,7 +50,7 @@ def loadSkin(name, scope = SCOPE_SKIN):
289 # example: loadSkin("nemesis_greenline/skin.xml")
290 config.skin = ConfigSubsection()
291 -config.skin.primary_skin = ConfigText(default = "skin.xml")
292 +config.skin.primary_skin = ConfigText(default = "Vu_HD/skin.xml")
296 @@ -133,6 +133,34 @@ def loadPixmap(path, desktop):
297 raise SkinError("pixmap file %s not found!" % (path))
300 +from enigma import runMainloop, eDVBDB, eTimer, quitMainloop, \
301 + getDesktop, ePythonConfigQuery, eAVSwitch, eServiceEvent
305 + for (path, skin) in dom_skins:
306 + for x in skin.findall("screen"):
307 + if x.attrib.get('name') == 'menu_mainmenu':
308 + print x.attrib.get('name')
309 + for s in x.findall("ePixmap"):
310 + if s.attrib.get('pixmap','') is not '':
311 + pixmaplist.append(s.attrib.get('pixmap',''))
312 + for s in x.findall('widget'):
313 + if s.attrib.get('pixmap','') is not '':
314 + pixmaplist.append(s.attrib.get('pixmap',''))
315 + desktop = getDesktop(0)
316 + for s in pixmaplist:
317 + value ='/usr/share/enigma2/'+s
319 + ptr = loadPixmap(value, desktop)
320 + pngcache.append((value,ptr))
323 + if config.skin.primary_skin.value == "750S/skin.xml" or config.skin.primary_skin.value == "Vu_HD/skin.xml":
326 + print "fail cache main menu"
328 def applySingleAttribute(guiObject, desktop, attrib, value, scale = ((1,1),(1,1))):
331 @@ -162,7 +190,15 @@ def applySingleAttribute(guiObject, desktop, attrib, value, scale = ((1,1),(1,1)
332 elif attrib == 'itemHeight':
333 guiObject.setItemHeight(int(value))
334 elif attrib in ("pixmap", "backgroundPixmap", "selectionPixmap"):
335 - ptr = loadPixmap(value, desktop) # this should already have been filename-resolved.
339 + for cvalue, cptr in pngcache:
343 + ptr = loadPixmap(value, desktop) # this should already have been filename-resolved.
345 if attrib == "pixmap":
346 guiObject.setPixmap(ptr)
347 elif attrib == "backgroundPixmap":