+class Pic_Full_View(Screen):
+ def __init__(self, session, filelist, index, path):
+
+ self.textcolor = config.pic.textcolor.value
+ self.bgcolor = config.pic.bgcolor.value
+ space = config.pic.framesize.value
+ size_w = getDesktop(0).size().width()
+ size_h = getDesktop(0).size().height()
+
+ self.skin = "<screen position=\"0,0\" size=\"" + str(size_w) + "," + str(size_h) + "\" flags=\"wfNoBorder\" > \
+ <eLabel position=\"0,0\" zPosition=\"0\" size=\""+ str(size_w) + "," + str(size_h) + "\" backgroundColor=\""+ self.bgcolor +"\" /><widget name=\"pic\" position=\"" + str(space) + "," + str(space) + "\" size=\"" + str(size_w-(space*2)) + "," + str(size_h-(space*2)) + "\" zPosition=\"1\" alphatest=\"on\" /> \
+ <widget name=\"point\" position=\""+ str(space+5) + "," + str(space+2) + "\" size=\"20,20\" zPosition=\"2\" pixmap=\"skin_default/icons/record.png\" alphatest=\"on\" /> \
+ <widget name=\"play_icon\" position=\""+ str(space+25) + "," + str(space+2) + "\" size=\"20,20\" zPosition=\"2\" pixmap=\"skin_default/icons/ico_mp_play.png\" alphatest=\"on\" /> \
+ <widget name=\"file\" position=\""+ str(space+45) + "," + str(space) + "\" size=\""+ str(size_w-(space*2)-50) + ",25\" font=\"Regular;20\" halign=\"left\" foregroundColor=\"" + self.textcolor + "\" zPosition=\"2\" noWrap=\"1\" transparent=\"1\" /></screen>"
+
+ Screen.__init__(self, session)
+
+ self["actions"] = ActionMap(["OkCancelActions", "ColorActions", "DirectionActions", "MovieSelectionActions"],
+ {
+ "cancel": self.Exit,
+ "green": self.PlayPause,
+ "yellow": self.PlayPause,
+ "blue": self.nextPic,
+ "red": self.prevPic,
+ "left": self.prevPic,
+ "right": self.nextPic,
+ "showEventInfo": self.StartExif,
+ }, -1)
+
+ self["point"] = Pixmap()
+ self["pic"] = Pixmap()
+ self["play_icon"] = Pixmap()
+ self["file"] = Label(_("please wait, loading picture..."))
+
+ self.old_index = 0
+ self.filelist = []
+ self.lastindex = index
+ self.currPic = []
+ self.shownow = True
+ self.dirlistcount = 0
+
+ for x in filelist:
+ if len(filelist[0]) == 3: #orig. filelist
+ if x[0][1] == False:
+ self.filelist.append(path + x[0][0])
+ else:
+ self.dirlistcount += 1
+ elif len(filelist[0]) == 2: #scanlist
+ if x[0][1] == False:
+ self.filelist.append(x[0][0])
+ else:
+ self.dirlistcount += 1
+ else: # thumbnaillist
+ self.filelist.append(x[T_FULL])
+
+ self.maxentry = len(self.filelist)-1
+ self.index = index - self.dirlistcount
+ if self.index < 0:
+ self.index = 0
+
+ self.picload = ePicLoad()
+ self.picload.PictureData.get().append(self.finish_decode)
+
+ self.slideTimer = eTimer()
+ self.slideTimer.callback.append(self.slidePic)
+
+ if self.maxentry >= 0:
+ self.onLayoutFinish.append(self.setPicloadConf)
+
+ def setPicloadConf(self):
+ sc = getScale()
+ self.picload.setPara([self["pic"].instance.size().width(), self["pic"].instance.size().height(), sc[0], sc[1], 0, int(config.pic.resize.value), self.bgcolor])
+
+ self["play_icon"].hide()
+ if config.pic.infoline.value == False:
+ self["file"].hide()
+ self.start_decode()
+
+ def ShowPicture(self):
+ if self.shownow and len(self.currPic):
+ self.shownow = False
+ self["file"].setText(self.currPic[0])
+ self.lastindex = self.currPic[1]
+ self["pic"].instance.setPixmap(self.currPic[2].__deref__())
+ self.currPic = []
+
+ self.next()
+ self.start_decode()