Index: ipk/source/infos_foreca/CONTROL/control
===================================================================
--- ipk/source/infos_foreca/CONTROL/control	(revision 7319)
+++ ipk/source/infos_foreca/CONTROL/control	(revision 7321)
@@ -1,4 +1,4 @@
 Package: enigma2-plugin-infos-foreca
-Version: 1.2
+Version: 1.3
 Architecture: sh4
 OE: Weatherinfos for your AAF Duckbox 
Index: ipk/source/infos_foreca/CONTROL/preinst
===================================================================
--- ipk/source/infos_foreca/CONTROL/preinst	(revision 7319)
+++ ipk/source/infos_foreca/CONTROL/preinst	(revision 7321)
@@ -21,5 +21,5 @@
 	SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1`
 	FREE=`expr $SPACE - 100`
-	SIZE=560
+	SIZE=680
 	echo "checking freespace"
 	echo packege size $SIZE kb
Index: ipk/source/infos_foreca/usr/lib/enigma2/python/Plugins/Extensions/Foreca/plugin.py
===================================================================
--- ipk/source/infos_foreca/usr/lib/enigma2/python/Plugins/Extensions/Foreca/plugin.py	(revision 7319)
+++ ipk/source/infos_foreca/usr/lib/enigma2/python/Plugins/Extensions/Foreca/plugin.py	(revision 7321)
@@ -11,5 +11,5 @@
 #   Wir wuenschen allen Benutzern herrliches Wetter!
 #
-#                 Version 1.1
+#                 Version 1.3
 #
 #                  12.04.2011
@@ -26,4 +26,5 @@
 from Components.AVSwitch import AVSwitch
 from Components.Label import Label
+from Components.Button import Button
 from Components.Sources.StaticText import StaticText
 from Components.ScrollLabel import ScrollLabel
@@ -33,6 +34,7 @@
 from Components.PluginComponent import plugins
 from Components.Console import Console
+from Components.config import *
+from Components.ConfigList import ConfigList, ConfigListScreen
 from enigma import eListboxPythonMultiContent, ePicLoad, eServiceReference, eTimer, getDesktop, gFont, RT_HALIGN_LEFT
-
 from os import listdir, popen
 from Plugins.Plugin import PluginDescriptor
@@ -49,4 +51,6 @@
 from Tools.LoadPixmap import LoadPixmap
 from twisted.web.client import downloadPage, getPage
+from Screens.InfoBarGenerics import InfoBarResolutionSelection
+
 import htmlentitydefs, re, urllib2, urllib
 from re import sub, split, search, match, findall
@@ -56,11 +60,22 @@
 
 
-###################################################
-
+config.plugins.foreca = ConfigSubsection()
+config.plugins.foreca.Device = ConfigSelection(default="/usr/lib/enigma2/python/Plugins/Extensions/Foreca/bilder/", choices = [("/usr/lib/enigma2/python/Plugins/Extensions/Foreca/", _("...Plugins/Extensions/Foreca/")), ("/media/hdd/Foreca/", _("/media/hdd/Foreca/")), ("/var/swap/Foreca/", _("/var/swap/Foreca/"))])
+config.plugins.foreca.resize = ConfigSelection(default="0", choices = [("0", _("simple")), ("1", _("better"))])
+config.plugins.foreca.bgcolor = ConfigSelection(default="#00000000", choices = [("#00000000", _("black")),("#009eb9ff", _("blue")),("#00ff5a51", _("red")), ("#00ffe875", _("yellow")), ("#0038FF48", _("green"))])
+config.plugins.foreca.textcolor = ConfigSelection(default="#0038FF48", choices = [("#00000000", _("black")),("#009eb9ff", _("blue")),("#00ff5a51", _("red")), ("#00ffe875", _("yellow")), ("#0038FF48", _("green"))])
+config.plugins.foreca.framesize = ConfigInteger(default=5, limits=(5, 99))
+config.plugins.foreca.remove = ConfigSelection(default="0", choices = [("0", _("Yes")), ("1", _("No"))])
+config.plugins.foreca.slidetime = ConfigInteger(default=1, limits=(1, 60))
+config.plugins.foreca.infoline = ConfigEnableDisable(default=True)
+config.plugins.foreca.loop = ConfigEnableDisable(default=False)
+
+
+global MAIN_PAGE
 MAIN_PAGE = "http://www.foreca.at"
 PNG_PATH = resolveFilename(SCOPE_PLUGINS)+"/Extensions/Foreca/picon/"
 deviceName = HardwareInfo().get_device_name()
 
-global MAIN_PAGE
+
 
 #---------------------- Skin Funktionen ---------------------------------------------------
@@ -71,4 +86,64 @@
 def getScale():
 	return AVSwitch().getFramebufferScale()
+
+#------------------------------------------------------------------------------------------
+#---------------------- class InfoBarAspectSelection --------------------------------------
+#------------------------------------------------------------------------------------------
+
+class InfoBarAspectSelection:
+	STATE_HIDDEN = 0
+	STATE_ASPECT = 1
+	STATE_RESOLUTION = 2
+	def __init__(self):
+		self["AspectSelectionAction"] = HelpableActionMap(self, "InfobarAspectSelectionActions",
+			{
+				"aspectSelection": (self.ExGreen_toggleGreen, _("Aspect list...")),
+			})
+		self.__ExGreen_state = self.STATE_HIDDEN
+	def ExGreen_doAspect(self):
+		self.__ExGreen_state = self.STATE_ASPECT
+		self.aspectSelection()
+	def ExGreen_doResolution(self):
+		self.__ExGreen_state = self.STATE_RESOLUTION
+		self.resolutionSelection()
+	def ExGreen_doHide(self):
+		self.__ExGreen_state = self.STATE_HIDDEN
+	def ExGreen_toggleGreen(self, arg=""):
+		print self.__ExGreen_state
+		if self.__ExGreen_state == self.STATE_HIDDEN:
+			print "self.STATE_HIDDEN"
+			self.ExGreen_doAspect()
+		elif self.__ExGreen_state == self.STATE_ASPECT:
+			print "self.STATE_ASPECT"
+			self.ExGreen_doResolution()
+		elif self.__ExGreen_state == self.STATE_RESOLUTION:
+			print "self.STATE_RESOLUTION"
+			self.ExGreen_doHide()
+	def aspectSelection(self):
+		selection = 0
+		tlist = []
+		tlist.append((_("Resolution"), "resolution"))
+		tlist.append(("", ""))
+		tlist.append(("Letterbox", "letterbox"))
+		tlist.append(("PanScan", "panscan"))
+		tlist.append(("Non Linear", "non"))
+		tlist.append(("Bestfit", "bestfit"))
+		mode = open("/proc/stb/video/policy").read()[:-1]
+		print mode
+		for x in range(len(tlist)):
+			if tlist[x][1] == mode:
+				selection = x
+		keys = ["green", "",  "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" ]
+		self.session.openWithCallback(self.aspectSelected, ChoiceBox, title=_("Please select an aspect ratio..."), list = tlist, selection = selection, keys = keys)
+	def aspectSelected(self, aspect):
+		if not aspect is None:
+			if isinstance(aspect[1], str):
+				if aspect[1] == "resolution":
+					self.ExGreen_toggleGreen()
+				else:
+					open("/proc/stb/video/policy", "w").write(aspect[1])
+					self.ExGreen_doHide()
+		return
+
 
 #------------------------------------------------------------------------------------------
@@ -229,5 +304,5 @@
 class ForecaPreview(Screen, HelpableScreen):
 	def __init__(self, session):
-		global MAIN_PAGE
+		global MAIN_PAGE, menu
 		self.session = session
 		MAIN_PAGE = "http://www.foreca.at"
@@ -256,5 +331,5 @@
 		##print "Desktop ", size, width
 		if width == 1024:
-			self.skin = """<screen position="center,65" size="880,480" title="Foreca Wetterprognose V 1.2" backgroundColor="#b0b0b0" >"""
+			self.skin = """<screen position="center,65" size="880,480" title="Foreca Wetterprognose V 1.3" backgroundColor="#b0b0b0" >"""
 			self.skin += """<widget name="MainList" position="0,65" size="880,363" zPosition="3" backgroundColor="#b0b0b0" backgroundColorSelected="#f7f7f7" selectionDisabled="1" scrollbarMode="showOnDemand" />
 			<widget source="Titel" render="Label" position="120,3" zPosition="3" size="740,40" font="Regular;36" valign="center" halign="left" transparent="1" foregroundColor="#000000"/>
@@ -273,5 +348,5 @@
 		</screen>"""
 		else:
-			self.skin = """<screen position="center,center" size="890,505" title="Foreca Wetterprognose V 1.2" backgroundColor="#b0b0b0" >"""
+			self.skin = """<screen position="center,center" size="890,505" title="Foreca Wetterprognose V 1.3" backgroundColor="#b0b0b0" >"""
 			self.skin += """<widget name="MainList" position="0,90" size="890,365" zPosition="3" backgroundColor="#b0b0b0" backgroundColorSelected="#f7f7f7" selectionDisabled="1" scrollbarMode="showOnDemand" />
 			<widget source="Titel" render="Label" position="120,13" zPosition="3" size="740,40" font="Regular;36" valign="center" halign="left" transparent="1" foregroundColor="#000000"/>
@@ -311,7 +386,7 @@
 			{
 				"cancel": (self.exit, "Beenden"),
-				"menu": (self.info, "Menu"),
+				"menu": (self.Menu, "Menu"),
 				"showEventInfo": (self.info, "Info"),
-				"ok": (self.Menu, "Menu"),
+				"ok": (self.OK, "Menu"),
 				"left": (self.left, "Seite hoch"),
 				"right": (self.right, "Seite runter"),
@@ -375,4 +450,5 @@
 
 	def exit(self):
+		os.system("rm /tmp/sat.jpg; rm /tmp/sat.html; rm /tmp/meteogram.png")
 		self.close()
 		self.deactivateCacheDialog()
@@ -455,9 +531,9 @@
 		self.StartPage()
 
-	def Menu(self):
+	def OK(self):
 		global city
 		panelmenu = ""
 		city = self.ort
-		self.session.openWithCallback(self.MenuCallback, CityPanel,panelmenu)
+		self.session.openWithCallback(self.OKCallback, CityPanel,panelmenu)
 
 	def info(self):
@@ -465,6 +541,5 @@
 		self.session.open( MessageBox, message, MessageBox.TYPE_INFO)
 
-
-	def MenuCallback(self):
+	def OKCallback(self):
 		global city
 		self.ort = city
@@ -472,7 +547,13 @@
 		##print "MenuCallback "
 
+	def Menu(self):
+		self.session.openWithCallback(self.MenuCallback, SatPanel, self.ort)
+
+	def MenuCallback(self):
+		global menu
+
+#
 #------------------------------------------------------------------------------------------
 	def loadPicture(self,url=""):
-		##print "here4"
 		devicepath = "/tmp/meteogram.png"
 		path = "/tmp"
@@ -649,5 +730,5 @@
 		self.session = session
 		self.skin = """
-			<screen name="SenderPanel" position="center,center" size="430,540" title="Staedte Auswahl" backgroundColor="#252525">
+			<screen name="CityPanel" position="center,center" size="430,540" title="Staedte Auswahl" backgroundColor="#252525">
 				<widget name="Mlist" position="10,10" size="400,490" zPosition="3" backgroundColor="#252525"  backgroundColorSelected="#565656" scrollbarMode="showOnDemand" />
 				<eLabel position="0,515" zPosition="2" size="430,1" backgroundColor="#c1cdc1" />
@@ -755,5 +836,5 @@
 
 	def blue(self):
-		city = self['Mlist'].l.getCurrent()[0][0]
+		city = self['Mlist'].l.getCurrentSelection()[0][0]
 		##print "[Foreca] Service:", city
 		fwrite = open("/usr/lib/enigma2/python/Plugins/Extensions/Foreca/startservice.cfg", "w")
@@ -797,4 +878,172 @@
 		#res.append(MultiContentEntryPixmapAlphaTest(pos=(2, 5), size=(100, 60), png=entry[0]))  # png vorn
 		res.append(MultiContentEntryText(pos=(30, 6), size=(300, 35), font=0, text=entry[0], color=mblau, color_sel=mblau, backcolor_sel=grau))
+		return res
+
+#------------------------------------------------------------------------------------------
+
+# -------------------------------------------------------------------
+class SatPanelList(MenuList):
+	def __init__(self, list, font0 = 28, font1 = 16, itemHeight = 142, enableWrapAround = True):
+		MenuList.__init__(self, [], False, eListboxPythonMultiContent)
+		self.l.setFont(0, gFont("Regular", font0))
+		self.l.setFont(1, gFont("Regular", font1))
+		self.l.setItemHeight(itemHeight)
+
+# -------------------------------------------------------------------
+class SatPanel(Screen, HelpableScreen):
+	def __init__(self, session, ort):
+		self.session = session
+		self.ort = ort
+		self.skin = """
+			<screen name="SatPanel" position="center,center" size="630,500" title="Satelliten - Bilder / Karten" backgroundColor="#252525">
+				<widget name="Mlist" position="10,10" size="600,430" zPosition="3" backgroundColor="#252525"  backgroundColorSelected="#565656" scrollbarMode="showOnDemand" />
+
+				<eLabel position="0,445" zPosition="2" size="630,1" backgroundColor="#c1cdc1" />
+				<widget source="key_blue" render="Label" position="260,457" zPosition="2" size="290,30" font="Regular;20" valign="center" halign="left" transparent="1" />
+				<ePixmap position="200,460" size="36,20" pixmap="skin_default/buttons/key_blue.png" transparent="1" alphatest="on" />
+
+			</screen>"""
+
+		Screen.__init__(self, session)
+		self.Mlist = []
+
+		self.Mlist.append(self.SatEntryItem((self.SatEntryComponent('satellit'), _("Satelliten Bild"), 'satellit')))
+		self.Mlist.append(self.SatEntryItem((self.SatEntryComponent('niederschlag'), _("Niederschlags Karte"), 'niederschlag')))
+		self.Mlist.append(self.SatEntryItem((self.SatEntryComponent('bewoelkung'), _("Bewölkung Bild"), 'bewoelkung')))
+		#self.Mlist.append(self.SatEntryItem((self.SatEntryComponent('luftdruck'), _("Luftdruck Karte"), 'luftdruck')))
+
+
+		self.onChangedEntry = []
+		if (getDesktop(0).size().width() == 1280):
+				self["Mlist"] = SatPanelList([])
+		else:
+				self["Mlist"] = SatPanelList([], font0=24, font1=15, itemHeight=60)
+		self["Mlist"].l.setList(self.Mlist)
+		self["Mlist"].selectionEnabled(1)
+		self["key_blue"] = StaticText()
+		self["key_blue"].text = _("Einstellungen")
+
+		HelpableScreen.__init__(self)
+		self["actions"] = HelpableActionMap(self, "AAFKeyActions",
+			{
+				"cancel": (self.Exit, "Beenden"),
+				"left": (self.left, "Seite hoch"),
+				"right": (self.right, "Seite runter"),
+				"up": (self.up, "Hoch"),
+				"down": (self.down, "Runter"),
+				"blue": (self.PicSetupMenu, "blue"),
+				"ok": (self.ok, "OK"),
+			}, -2)
+
+	def up(self):
+		self["Mlist"].up()
+		self["Mlist"].selectionEnabled(1)
+
+	def down(self):
+		self["Mlist"].down()
+		self["Mlist"].selectionEnabled(1)
+
+	def left(self):
+		self["Mlist"].pageUp()
+
+	def right(self):
+		self["Mlist"].pageDown()
+
+	def Exit(self):
+		global menu
+		menu = "stop"
+		self.close()
+
+	def ok(self):
+		#global menu
+		menu = self['Mlist'].l.getCurrentSelection()[0][2]
+		##print "druecke OK", menu
+		#self.close()
+		self.SatBild()
+
+	def SatEntryComponent(self,file):
+		png = LoadPixmap("/usr/lib/enigma2/python/Plugins/Extensions/Foreca/thumb/" + file + ".png")
+		res = (png)
+		return res
+
+	def PicSetupMenu(self):
+		self.session.open(PicSetup)
+		
+#------------------------------------------------------------------------------------------
+	def SatBild(self):
+
+		#message = "%s" % (_("Satelittenbilder werden geladen .....\n\n                       "))
+		#self.session.open( MessageBox, message, MessageBox.TYPE_INFO, timeout=4)
+
+		menu = self['Mlist'].l.getCurrentSelection()[0][2]
+		if menu == "satellit":
+			# http://www.foreca.de/Austria/Linz?map=sat
+			devicepath = "/tmp/sat.html"
+			url = "http://www.foreca.at/" + self.ort + "?map=sat"
+
+#------------------------------------------------------------------------------------------
+		if menu == "niederschlag":
+			devicepath = "/tmp/sat.html"
+			url = "http://www.foreca.at/" + self.ort + "?map=rain"
+
+#------------------------------------------------------------------------------------------
+		if menu == "bewoelkung":
+			devicepath = "/tmp/sat.html"
+			url = "http://www.foreca.at/" + self.ort + "?map=cloud"
+
+#------------------------------------------------------------------------------------------
+			
+		if menu == "luftdruck":
+			devicepath = "/tmp/sat.html"
+			url = "http://www.foreca.at/" + self.ort + "?map=pressure"
+
+#------------------------------------------------------------------------------------------
+
+
+		# Lade Kategorie Seite und suche BildLink
+		h = urllib.urlretrieve(url, devicepath)
+		fd=open(devicepath)
+		html=fd.read()
+		fd.close()
+
+		fulltext = re.compile(r'http://cache-(.+?) ', re.DOTALL)
+		PressureLink = fulltext.findall(html)
+		PicLink = PressureLink[0]
+		PicLink = "http://cache-" +	PicLink
+
+		# Lade Bilder fuer Slideshow
+		devicepath = "/usr/lib/enigma2/python/Plugins/Extensions/Foreca/bilder/sat"
+		max = int(len(PressureLink))-2
+		print "max= ", str(max)
+		zehner = "1"
+		x = 0
+		while x < max:
+			url = "http://cache-" + PressureLink[x]
+			print str(x), url
+			h = urllib.urlretrieve(url, devicepath + zehner + str(x) + ".jpg")
+			x = x + 1
+			if x > 9:
+				zehner = "2"
+
+		self.session.open(View_Slideshow, 0, True)
+
+#------------------------------------------------------------------------------------------
+
+	def SatEntryItem(self,entry):
+		rot = 16711680
+		gruen = 60928
+		dgruen = 52480
+		drot = 0xf47d19
+		mblau = 8900346
+		hblau = 11592447
+		dblau = 5215437
+		weiss = 0xffffff
+		orange = 0xf47d19
+		grau = 0x565656
+
+		res = [entry]
+		#	return (eListboxPythonMultiContent.TYPE_TEXT, pos[0], pos[1], size[0], size[1], font, flags, text, color, color_sel, backcolor, backcolor_sel, border_width, border_color)
+		res.append(MultiContentEntryPixmapAlphaTest(pos=(2, 5), size=(200, 140), png=entry[0]))  # png vorn
+		res.append(MultiContentEntryText(pos=(240, 45), size=(340, 50), font=0, text=entry[1], color=mblau, color_sel=mblau, backcolor_sel=grau))
 		return res
 
@@ -858,5 +1107,213 @@
 
 #------------------------------------------------------------------------------------------
-#-----------------------Haupt Programm ----------------------------------------------------
+class View_Slideshow(Screen, InfoBarAspectSelection, InfoBarResolutionSelection):
+	def __init__(self, session, pindex, startslide):
+
+		print "SlideShow is running ......."
+		self.textcolor = config.plugins.foreca.textcolor.value
+		self.bgcolor = config.plugins.foreca.bgcolor.value
+		space = config.plugins.foreca.framesize.value
+		size_w = getDesktop(0).size().width()
+		size_h = getDesktop(0).size().height()
+
+		self.skindir = "/tmp"
+		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+10) + "\" size=\"20,20\" zPosition=\"2\" pixmap=\"/usr/lib/enigma2/python/Plugins/Extensions/Picasa/default/record.png\" alphatest=\"on\" /> \
+			<widget name=\"play_icon\" position=\""+ str(space+25) + "," + str(space+10) + "\" size=\"20,20\" zPosition=\"2\" pixmap=\"/usr/lib/enigma2/python/Plugins/Extensions/Picasa/default/ico_mp_play.png\"  alphatest=\"on\" /> \
+			<widget name=\"file\" position=\""+ str(space+45) + "," + str(space+8) + "\" 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)
+
+		InfoBarAspectSelection.__init__(self)
+		self["actions"] = ActionMap(["OkCancelActions", "ColorActions", "DirectionActions", "MovieSelectionActions"],
+		{
+			"cancel": self.Exit,
+			"yellow": self.PlayPause,
+			"blue": self.sleepTimer,
+			"left": self.prevPic,
+			"right": self.nextPic,
+		}, -1)
+		self["point"] = Pixmap()
+		self["pic"] = Pixmap()
+		self["play_icon"] = Pixmap()
+		self["file"] = Label(_("please wait, loading picture..."))
+		self.old_index = 0
+		self.picfilelist = []
+		self.lastindex = pindex
+		self.currPic = []
+		self.shownow = True
+		self.dirlistcount = 0
+
+		devicepath = config.plugins.foreca.Device.value
+		currDir = devicepath
+		self.filelist = FileList(currDir, showDirectories = False, matchingPattern = "^.*\.(jpg)", useServiceRef = False)
+
+		for x in self.filelist.getFileList():
+				if x[0][1] == False:
+					self.picfilelist.append(currDir + x[0][0])
+				else:
+					self.dirlistcount += 1
+
+		self.maxentry = len(self.picfilelist)-1
+		self.pindex = pindex - self.dirlistcount
+		if self.pindex < 0:
+			self.pindex = 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)
+		if startslide == True:
+			self.PlayPause();
+
+	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.plugins.foreca.resize.value), self.bgcolor])
+		self["play_icon"].hide()
+		if config.plugins.foreca.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()
+
+	def finish_decode(self, picInfo=""):
+		self["point"].hide()
+		ptr = self.picload.getData()
+		if ptr != None:
+			text = ""
+			try:
+				text = picInfo.split('\n',1)
+				text = "(" + str(self.pindex+1) + "/" + str(self.maxentry+1) + ") " + text[0].split('/')[-1]
+			except:
+				pass
+			self.currPic = []
+			self.currPic.append(text)
+			self.currPic.append(self.pindex)
+			self.currPic.append(ptr)
+			self.ShowPicture()
+
+	def start_decode(self):
+		self.picload.startDecode(self.picfilelist[self.pindex])
+		self["point"].show()
+
+	def next(self):
+		self.pindex += 1
+		if self.pindex > self.maxentry:
+			self.pindex = 0
+
+	def prev(self):
+		self.pindex -= 1
+		if self.pindex < 0:
+			self.pindex = self.maxentry
+
+	def slidePic(self):
+		print "[Picasa] slide to next Picture index=" + str(self.lastindex)
+		if config.plugins.foreca.loop.value==False and self.lastindex == self.maxentry:
+			self.PlayPause()
+		self.shownow = True
+		self.ShowPicture()
+
+	def PlayPause(self):
+		if self.slideTimer.isActive():
+			self.slideTimer.stop()
+			self["play_icon"].hide()
+		else:
+			self.slideTimer.start(config.plugins.foreca.slidetime.value*1000)
+			self["play_icon"].show()
+			self.nextPic()
+
+	def prevPic(self):
+		self.currPic = []
+		self.pindex = self.lastindex
+		self.prev()
+		self.start_decode()
+		self.shownow = True
+
+	def nextPic(self):
+		self.shownow = True
+		self.ShowPicture()
+
+	def Exit(self):
+		del self.picload
+		self.close(self.lastindex + self.dirlistcount)
+
+	def sleepTimer(self):
+		from Screens.SleepTimerEdit import SleepTimerEdit
+		self.session.open(SleepTimerEdit)
+
+#------------------------------------------------------------------------------------------
+#-------------------------------- Foreca Settings -----------------------------------------
+#------------------------------------------------------------------------------------------
+class PicSetup(Screen):
+	skin = """<screen position="center,center" size="480,260" title="Foreca SlideShow Settings" backgroundColor="#000000" >
+		<widget name="liste" position="5,5" size="470,250" scrollbarMode="showOnDemand" />
+		<eLabel backgroundColor="red" position="28,250" size="140,3" zPosition="2"/>
+		<eLabel backgroundColor="green" position="228,250" size="140,3" zPosition="2"/>
+		<widget name="key_red" position="28,218" zPosition="3" size="140,40" font="Regular;19" valign="center" halign="center" transparent="1" />
+		<widget name="key_green" position="228,218" zPosition="3" size="140,40" font="Regular;19" valign="center" halign="center" transparent="1" />
+	</screen>"""
+
+	def __init__(self, session):
+		self.skin = PicSetup.skin
+		Screen.__init__(self, session)
+		self["key_red"] = Button(_("Back"))
+		self["key_green"] = Button(_("Save"))
+		self["actions"] = NumberActionMap(["SetupActions", "ColorActions"],
+		{
+			"ok": self.save,
+			"green": self.save,
+			"cancel": self.close,
+			"red": self.close,
+			"left": self.keyLeft,
+			"right": self.keyRight,
+			"0": self.keyNumber,
+			"1": self.keyNumber,
+			"2": self.keyNumber,
+			"3": self.keyNumber,
+			"4": self.keyNumber,
+			"5": self.keyNumber,
+			"6": self.keyNumber,
+			"7": self.keyNumber,
+			"8": self.keyNumber,
+			"9": self.keyNumber
+		}, -3)
+		self.list = []
+		self["liste"] = ConfigList(self.list)
+
+		#self.list.append(getConfigListEntry(_("Picture Y moving"), config.plugins.foreca.max_offsety))
+		#self.list.append(getConfigListEntry(_("delete cached Pictures"), config.plugins.foreca.remove))
+		#self.list.append(getConfigListEntry(_("Picture Cache"), config.plugins.foreca.Device))
+		self.list.append(getConfigListEntry(_("Scaling Mode"), config.plugins.foreca.resize))
+		self.list.append(getConfigListEntry(_("Frame size in full view"), config.plugins.foreca.framesize))
+		self.list.append(getConfigListEntry(_("backgroundcolor"), config.plugins.foreca.bgcolor))
+		self.list.append(getConfigListEntry(_("Textcolor"), config.plugins.foreca.textcolor))
+		self.list.append(getConfigListEntry(_("SlideTime"), config.plugins.foreca.slidetime))
+		self.list.append(getConfigListEntry(_("Show Infoline"), config.plugins.foreca.infoline))
+		self.list.append(getConfigListEntry(_("slide picture in loop"), config.plugins.foreca.loop))
+
+	def save(self):
+		for x in self["liste"].list:
+				x[1].save()
+		config.save()
+		self.close()
+
+	def keyLeft(self):
+		self["liste"].handleKey(KEY_LEFT)
+	def keyRight(self):
+		self["liste"].handleKey(KEY_RIGHT)
+	def keyNumber(self, number):
+		self["liste"].handleKey(KEY_0 + number)
+
+#------------------------------------------------------------------------------------------
+#------------------------------------- Haupt Programm -------------------------------------
 #------------------------------------------------------------------------------------------
 def start(session, **kwargs):
Index: ipk/source/swapinfos_foreca/CONTROL/control
===================================================================
--- ipk/source/swapinfos_foreca/CONTROL/control	(revision 7319)
+++ ipk/source/swapinfos_foreca/CONTROL/control	(revision 7321)
@@ -1,4 +1,4 @@
 Package: enigma2-plugin-swapinfos-foreca
-Version: 1.2
+Version: 1.3
 Description: Weatherinfo Plugin for Swapstick
 Section: infos
Index: ipk/source/swapinfos_foreca/var/swap/extensions/Foreca/plugin.py
===================================================================
--- ipk/source/swapinfos_foreca/var/swap/extensions/Foreca/plugin.py	(revision 7319)
+++ ipk/source/swapinfos_foreca/var/swap/extensions/Foreca/plugin.py	(revision 7321)
@@ -11,5 +11,5 @@
 #   Wir wuenschen allen Benutzern herrliches Wetter!
 #
-#                 Version 1.1
+#                 Version 1.3
 #
 #                  12.04.2011
@@ -26,4 +26,5 @@
 from Components.AVSwitch import AVSwitch
 from Components.Label import Label
+from Components.Button import Button
 from Components.Sources.StaticText import StaticText
 from Components.ScrollLabel import ScrollLabel
@@ -33,6 +34,7 @@
 from Components.PluginComponent import plugins
 from Components.Console import Console
+from Components.config import *
+from Components.ConfigList import ConfigList, ConfigListScreen
 from enigma import eListboxPythonMultiContent, ePicLoad, eServiceReference, eTimer, getDesktop, gFont, RT_HALIGN_LEFT
-
 from os import listdir, popen
 from Plugins.Plugin import PluginDescriptor
@@ -49,4 +51,6 @@
 from Tools.LoadPixmap import LoadPixmap
 from twisted.web.client import downloadPage, getPage
+from Screens.InfoBarGenerics import InfoBarResolutionSelection
+
 import htmlentitydefs, re, urllib2, urllib
 from re import sub, split, search, match, findall
@@ -56,11 +60,22 @@
 
 
-###################################################
-
+config.plugins.foreca = ConfigSubsection()
+config.plugins.foreca.Device = ConfigSelection(default="/usr/lib/enigma2/python/Plugins/Extensions/Foreca/bilder/", choices = [("/usr/lib/enigma2/python/Plugins/Extensions/Foreca/", _("...Plugins/Extensions/Foreca/")), ("/media/hdd/Foreca/", _("/media/hdd/Foreca/")), ("/var/swap/Foreca/", _("/var/swap/Foreca/"))])
+config.plugins.foreca.resize = ConfigSelection(default="0", choices = [("0", _("simple")), ("1", _("better"))])
+config.plugins.foreca.bgcolor = ConfigSelection(default="#00000000", choices = [("#00000000", _("black")),("#009eb9ff", _("blue")),("#00ff5a51", _("red")), ("#00ffe875", _("yellow")), ("#0038FF48", _("green"))])
+config.plugins.foreca.textcolor = ConfigSelection(default="#0038FF48", choices = [("#00000000", _("black")),("#009eb9ff", _("blue")),("#00ff5a51", _("red")), ("#00ffe875", _("yellow")), ("#0038FF48", _("green"))])
+config.plugins.foreca.framesize = ConfigInteger(default=5, limits=(5, 99))
+config.plugins.foreca.remove = ConfigSelection(default="0", choices = [("0", _("Yes")), ("1", _("No"))])
+config.plugins.foreca.slidetime = ConfigInteger(default=1, limits=(1, 60))
+config.plugins.foreca.infoline = ConfigEnableDisable(default=True)
+config.plugins.foreca.loop = ConfigEnableDisable(default=False)
+
+
+global MAIN_PAGE
 MAIN_PAGE = "http://www.foreca.at"
 PNG_PATH = resolveFilename(SCOPE_PLUGINS)+"/Extensions/Foreca/picon/"
 deviceName = HardwareInfo().get_device_name()
 
-global MAIN_PAGE
+
 
 #---------------------- Skin Funktionen ---------------------------------------------------
@@ -71,4 +86,64 @@
 def getScale():
 	return AVSwitch().getFramebufferScale()
+
+#------------------------------------------------------------------------------------------
+#---------------------- class InfoBarAspectSelection --------------------------------------
+#------------------------------------------------------------------------------------------
+
+class InfoBarAspectSelection:
+	STATE_HIDDEN = 0
+	STATE_ASPECT = 1
+	STATE_RESOLUTION = 2
+	def __init__(self):
+		self["AspectSelectionAction"] = HelpableActionMap(self, "InfobarAspectSelectionActions",
+			{
+				"aspectSelection": (self.ExGreen_toggleGreen, _("Aspect list...")),
+			})
+		self.__ExGreen_state = self.STATE_HIDDEN
+	def ExGreen_doAspect(self):
+		self.__ExGreen_state = self.STATE_ASPECT
+		self.aspectSelection()
+	def ExGreen_doResolution(self):
+		self.__ExGreen_state = self.STATE_RESOLUTION
+		self.resolutionSelection()
+	def ExGreen_doHide(self):
+		self.__ExGreen_state = self.STATE_HIDDEN
+	def ExGreen_toggleGreen(self, arg=""):
+		print self.__ExGreen_state
+		if self.__ExGreen_state == self.STATE_HIDDEN:
+			print "self.STATE_HIDDEN"
+			self.ExGreen_doAspect()
+		elif self.__ExGreen_state == self.STATE_ASPECT:
+			print "self.STATE_ASPECT"
+			self.ExGreen_doResolution()
+		elif self.__ExGreen_state == self.STATE_RESOLUTION:
+			print "self.STATE_RESOLUTION"
+			self.ExGreen_doHide()
+	def aspectSelection(self):
+		selection = 0
+		tlist = []
+		tlist.append((_("Resolution"), "resolution"))
+		tlist.append(("", ""))
+		tlist.append(("Letterbox", "letterbox"))
+		tlist.append(("PanScan", "panscan"))
+		tlist.append(("Non Linear", "non"))
+		tlist.append(("Bestfit", "bestfit"))
+		mode = open("/proc/stb/video/policy").read()[:-1]
+		print mode
+		for x in range(len(tlist)):
+			if tlist[x][1] == mode:
+				selection = x
+		keys = ["green", "",  "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" ]
+		self.session.openWithCallback(self.aspectSelected, ChoiceBox, title=_("Please select an aspect ratio..."), list = tlist, selection = selection, keys = keys)
+	def aspectSelected(self, aspect):
+		if not aspect is None:
+			if isinstance(aspect[1], str):
+				if aspect[1] == "resolution":
+					self.ExGreen_toggleGreen()
+				else:
+					open("/proc/stb/video/policy", "w").write(aspect[1])
+					self.ExGreen_doHide()
+		return
+
 
 #------------------------------------------------------------------------------------------
@@ -229,5 +304,5 @@
 class ForecaPreview(Screen, HelpableScreen):
 	def __init__(self, session):
-		global MAIN_PAGE
+		global MAIN_PAGE, menu
 		self.session = session
 		MAIN_PAGE = "http://www.foreca.at"
@@ -256,5 +331,5 @@
 		##print "Desktop ", size, width
 		if width == 1024:
-			self.skin = """<screen position="center,65" size="880,480" title="Foreca Wetterprognose V 1.2" backgroundColor="#b0b0b0" >"""
+			self.skin = """<screen position="center,65" size="880,480" title="Foreca Wetterprognose V 1.3" backgroundColor="#b0b0b0" >"""
 			self.skin += """<widget name="MainList" position="0,65" size="880,363" zPosition="3" backgroundColor="#b0b0b0" backgroundColorSelected="#f7f7f7" selectionDisabled="1" scrollbarMode="showOnDemand" />
 			<widget source="Titel" render="Label" position="120,3" zPosition="3" size="740,40" font="Regular;36" valign="center" halign="left" transparent="1" foregroundColor="#000000"/>
@@ -273,5 +348,5 @@
 		</screen>"""
 		else:
-			self.skin = """<screen position="center,center" size="890,505" title="Foreca Wetterprognose V 1.2" backgroundColor="#b0b0b0" >"""
+			self.skin = """<screen position="center,center" size="890,505" title="Foreca Wetterprognose V 1.3" backgroundColor="#b0b0b0" >"""
 			self.skin += """<widget name="MainList" position="0,90" size="890,365" zPosition="3" backgroundColor="#b0b0b0" backgroundColorSelected="#f7f7f7" selectionDisabled="1" scrollbarMode="showOnDemand" />
 			<widget source="Titel" render="Label" position="120,13" zPosition="3" size="740,40" font="Regular;36" valign="center" halign="left" transparent="1" foregroundColor="#000000"/>
@@ -311,7 +386,7 @@
 			{
 				"cancel": (self.exit, "Beenden"),
-				"menu": (self.info, "Menu"),
+				"menu": (self.Menu, "Menu"),
 				"showEventInfo": (self.info, "Info"),
-				"ok": (self.Menu, "Menu"),
+				"ok": (self.OK, "Menu"),
 				"left": (self.left, "Seite hoch"),
 				"right": (self.right, "Seite runter"),
@@ -375,4 +450,5 @@
 
 	def exit(self):
+		os.system("rm /tmp/sat.jpg; rm /tmp/sat.html; rm /tmp/meteogram.png")
 		self.close()
 		self.deactivateCacheDialog()
@@ -455,9 +531,9 @@
 		self.StartPage()
 
-	def Menu(self):
+	def OK(self):
 		global city
 		panelmenu = ""
 		city = self.ort
-		self.session.openWithCallback(self.MenuCallback, CityPanel,panelmenu)
+		self.session.openWithCallback(self.OKCallback, CityPanel,panelmenu)
 
 	def info(self):
@@ -465,6 +541,5 @@
 		self.session.open( MessageBox, message, MessageBox.TYPE_INFO)
 
-
-	def MenuCallback(self):
+	def OKCallback(self):
 		global city
 		self.ort = city
@@ -472,7 +547,13 @@
 		##print "MenuCallback "
 
+	def Menu(self):
+		self.session.openWithCallback(self.MenuCallback, SatPanel, self.ort)
+
+	def MenuCallback(self):
+		global menu
+
+#
 #------------------------------------------------------------------------------------------
 	def loadPicture(self,url=""):
-		##print "here4"
 		devicepath = "/tmp/meteogram.png"
 		path = "/tmp"
@@ -649,5 +730,5 @@
 		self.session = session
 		self.skin = """
-			<screen name="SenderPanel" position="center,center" size="430,540" title="Staedte Auswahl" backgroundColor="#252525">
+			<screen name="CityPanel" position="center,center" size="430,540" title="Staedte Auswahl" backgroundColor="#252525">
 				<widget name="Mlist" position="10,10" size="400,490" zPosition="3" backgroundColor="#252525"  backgroundColorSelected="#565656" scrollbarMode="showOnDemand" />
 				<eLabel position="0,515" zPosition="2" size="430,1" backgroundColor="#c1cdc1" />
@@ -755,5 +836,5 @@
 
 	def blue(self):
-		city = self['Mlist'].l.getCurrent()[0][0]
+		city = self['Mlist'].l.getCurrentSelection()[0][0]
 		##print "[Foreca] Service:", city
 		fwrite = open("/usr/lib/enigma2/python/Plugins/Extensions/Foreca/startservice.cfg", "w")
@@ -797,4 +878,172 @@
 		#res.append(MultiContentEntryPixmapAlphaTest(pos=(2, 5), size=(100, 60), png=entry[0]))  # png vorn
 		res.append(MultiContentEntryText(pos=(30, 6), size=(300, 35), font=0, text=entry[0], color=mblau, color_sel=mblau, backcolor_sel=grau))
+		return res
+
+#------------------------------------------------------------------------------------------
+
+# -------------------------------------------------------------------
+class SatPanelList(MenuList):
+	def __init__(self, list, font0 = 28, font1 = 16, itemHeight = 142, enableWrapAround = True):
+		MenuList.__init__(self, [], False, eListboxPythonMultiContent)
+		self.l.setFont(0, gFont("Regular", font0))
+		self.l.setFont(1, gFont("Regular", font1))
+		self.l.setItemHeight(itemHeight)
+
+# -------------------------------------------------------------------
+class SatPanel(Screen, HelpableScreen):
+	def __init__(self, session, ort):
+		self.session = session
+		self.ort = ort
+		self.skin = """
+			<screen name="SatPanel" position="center,center" size="630,500" title="Satelliten - Bilder / Karten" backgroundColor="#252525">
+				<widget name="Mlist" position="10,10" size="600,430" zPosition="3" backgroundColor="#252525"  backgroundColorSelected="#565656" scrollbarMode="showOnDemand" />
+
+				<eLabel position="0,445" zPosition="2" size="630,1" backgroundColor="#c1cdc1" />
+				<widget source="key_blue" render="Label" position="260,457" zPosition="2" size="290,30" font="Regular;20" valign="center" halign="left" transparent="1" />
+				<ePixmap position="200,460" size="36,20" pixmap="skin_default/buttons/key_blue.png" transparent="1" alphatest="on" />
+
+			</screen>"""
+
+		Screen.__init__(self, session)
+		self.Mlist = []
+
+		self.Mlist.append(self.SatEntryItem((self.SatEntryComponent('satellit'), _("Satelliten Bild"), 'satellit')))
+		self.Mlist.append(self.SatEntryItem((self.SatEntryComponent('niederschlag'), _("Niederschlags Karte"), 'niederschlag')))
+		self.Mlist.append(self.SatEntryItem((self.SatEntryComponent('bewoelkung'), _("Bewölkung Bild"), 'bewoelkung')))
+		#self.Mlist.append(self.SatEntryItem((self.SatEntryComponent('luftdruck'), _("Luftdruck Karte"), 'luftdruck')))
+
+
+		self.onChangedEntry = []
+		if (getDesktop(0).size().width() == 1280):
+				self["Mlist"] = SatPanelList([])
+		else:
+				self["Mlist"] = SatPanelList([], font0=24, font1=15, itemHeight=60)
+		self["Mlist"].l.setList(self.Mlist)
+		self["Mlist"].selectionEnabled(1)
+		self["key_blue"] = StaticText()
+		self["key_blue"].text = _("Einstellungen")
+
+		HelpableScreen.__init__(self)
+		self["actions"] = HelpableActionMap(self, "AAFKeyActions",
+			{
+				"cancel": (self.Exit, "Beenden"),
+				"left": (self.left, "Seite hoch"),
+				"right": (self.right, "Seite runter"),
+				"up": (self.up, "Hoch"),
+				"down": (self.down, "Runter"),
+				"blue": (self.PicSetupMenu, "blue"),
+				"ok": (self.ok, "OK"),
+			}, -2)
+
+	def up(self):
+		self["Mlist"].up()
+		self["Mlist"].selectionEnabled(1)
+
+	def down(self):
+		self["Mlist"].down()
+		self["Mlist"].selectionEnabled(1)
+
+	def left(self):
+		self["Mlist"].pageUp()
+
+	def right(self):
+		self["Mlist"].pageDown()
+
+	def Exit(self):
+		global menu
+		menu = "stop"
+		self.close()
+
+	def ok(self):
+		#global menu
+		menu = self['Mlist'].l.getCurrentSelection()[0][2]
+		##print "druecke OK", menu
+		#self.close()
+		self.SatBild()
+
+	def SatEntryComponent(self,file):
+		png = LoadPixmap("/usr/lib/enigma2/python/Plugins/Extensions/Foreca/thumb/" + file + ".png")
+		res = (png)
+		return res
+
+	def PicSetupMenu(self):
+		self.session.open(PicSetup)
+		
+#------------------------------------------------------------------------------------------
+	def SatBild(self):
+
+		#message = "%s" % (_("Satelittenbilder werden geladen .....\n\n                       "))
+		#self.session.open( MessageBox, message, MessageBox.TYPE_INFO, timeout=4)
+
+		menu = self['Mlist'].l.getCurrentSelection()[0][2]
+		if menu == "satellit":
+			# http://www.foreca.de/Austria/Linz?map=sat
+			devicepath = "/tmp/sat.html"
+			url = "http://www.foreca.at/" + self.ort + "?map=sat"
+
+#------------------------------------------------------------------------------------------
+		if menu == "niederschlag":
+			devicepath = "/tmp/sat.html"
+			url = "http://www.foreca.at/" + self.ort + "?map=rain"
+
+#------------------------------------------------------------------------------------------
+		if menu == "bewoelkung":
+			devicepath = "/tmp/sat.html"
+			url = "http://www.foreca.at/" + self.ort + "?map=cloud"
+
+#------------------------------------------------------------------------------------------
+			
+		if menu == "luftdruck":
+			devicepath = "/tmp/sat.html"
+			url = "http://www.foreca.at/" + self.ort + "?map=pressure"
+
+#------------------------------------------------------------------------------------------
+
+
+		# Lade Kategorie Seite und suche BildLink
+		h = urllib.urlretrieve(url, devicepath)
+		fd=open(devicepath)
+		html=fd.read()
+		fd.close()
+
+		fulltext = re.compile(r'http://cache-(.+?) ', re.DOTALL)
+		PressureLink = fulltext.findall(html)
+		PicLink = PressureLink[0]
+		PicLink = "http://cache-" +	PicLink
+
+		# Lade Bilder fuer Slideshow
+		devicepath = "/usr/lib/enigma2/python/Plugins/Extensions/Foreca/bilder/sat"
+		max = int(len(PressureLink))-2
+		print "max= ", str(max)
+		zehner = "1"
+		x = 0
+		while x < max:
+			url = "http://cache-" + PressureLink[x]
+			print str(x), url
+			h = urllib.urlretrieve(url, devicepath + zehner + str(x) + ".jpg")
+			x = x + 1
+			if x > 9:
+				zehner = "2"
+
+		self.session.open(View_Slideshow, 0, True)
+
+#------------------------------------------------------------------------------------------
+
+	def SatEntryItem(self,entry):
+		rot = 16711680
+		gruen = 60928
+		dgruen = 52480
+		drot = 0xf47d19
+		mblau = 8900346
+		hblau = 11592447
+		dblau = 5215437
+		weiss = 0xffffff
+		orange = 0xf47d19
+		grau = 0x565656
+
+		res = [entry]
+		#	return (eListboxPythonMultiContent.TYPE_TEXT, pos[0], pos[1], size[0], size[1], font, flags, text, color, color_sel, backcolor, backcolor_sel, border_width, border_color)
+		res.append(MultiContentEntryPixmapAlphaTest(pos=(2, 5), size=(200, 140), png=entry[0]))  # png vorn
+		res.append(MultiContentEntryText(pos=(240, 45), size=(340, 50), font=0, text=entry[1], color=mblau, color_sel=mblau, backcolor_sel=grau))
 		return res
 
@@ -858,5 +1107,213 @@
 
 #------------------------------------------------------------------------------------------
-#-----------------------Haupt Programm ----------------------------------------------------
+class View_Slideshow(Screen, InfoBarAspectSelection, InfoBarResolutionSelection):
+	def __init__(self, session, pindex, startslide):
+
+		print "SlideShow is running ......."
+		self.textcolor = config.plugins.foreca.textcolor.value
+		self.bgcolor = config.plugins.foreca.bgcolor.value
+		space = config.plugins.foreca.framesize.value
+		size_w = getDesktop(0).size().width()
+		size_h = getDesktop(0).size().height()
+
+		self.skindir = "/tmp"
+		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+10) + "\" size=\"20,20\" zPosition=\"2\" pixmap=\"/usr/lib/enigma2/python/Plugins/Extensions/Picasa/default/record.png\" alphatest=\"on\" /> \
+			<widget name=\"play_icon\" position=\""+ str(space+25) + "," + str(space+10) + "\" size=\"20,20\" zPosition=\"2\" pixmap=\"/usr/lib/enigma2/python/Plugins/Extensions/Picasa/default/ico_mp_play.png\"  alphatest=\"on\" /> \
+			<widget name=\"file\" position=\""+ str(space+45) + "," + str(space+8) + "\" 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)
+
+		InfoBarAspectSelection.__init__(self)
+		self["actions"] = ActionMap(["OkCancelActions", "ColorActions", "DirectionActions", "MovieSelectionActions"],
+		{
+			"cancel": self.Exit,
+			"yellow": self.PlayPause,
+			"blue": self.sleepTimer,
+			"left": self.prevPic,
+			"right": self.nextPic,
+		}, -1)
+		self["point"] = Pixmap()
+		self["pic"] = Pixmap()
+		self["play_icon"] = Pixmap()
+		self["file"] = Label(_("please wait, loading picture..."))
+		self.old_index = 0
+		self.picfilelist = []
+		self.lastindex = pindex
+		self.currPic = []
+		self.shownow = True
+		self.dirlistcount = 0
+
+		devicepath = config.plugins.foreca.Device.value
+		currDir = devicepath
+		self.filelist = FileList(currDir, showDirectories = False, matchingPattern = "^.*\.(jpg)", useServiceRef = False)
+
+		for x in self.filelist.getFileList():
+				if x[0][1] == False:
+					self.picfilelist.append(currDir + x[0][0])
+				else:
+					self.dirlistcount += 1
+
+		self.maxentry = len(self.picfilelist)-1
+		self.pindex = pindex - self.dirlistcount
+		if self.pindex < 0:
+			self.pindex = 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)
+		if startslide == True:
+			self.PlayPause();
+
+	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.plugins.foreca.resize.value), self.bgcolor])
+		self["play_icon"].hide()
+		if config.plugins.foreca.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()
+
+	def finish_decode(self, picInfo=""):
+		self["point"].hide()
+		ptr = self.picload.getData()
+		if ptr != None:
+			text = ""
+			try:
+				text = picInfo.split('\n',1)
+				text = "(" + str(self.pindex+1) + "/" + str(self.maxentry+1) + ") " + text[0].split('/')[-1]
+			except:
+				pass
+			self.currPic = []
+			self.currPic.append(text)
+			self.currPic.append(self.pindex)
+			self.currPic.append(ptr)
+			self.ShowPicture()
+
+	def start_decode(self):
+		self.picload.startDecode(self.picfilelist[self.pindex])
+		self["point"].show()
+
+	def next(self):
+		self.pindex += 1
+		if self.pindex > self.maxentry:
+			self.pindex = 0
+
+	def prev(self):
+		self.pindex -= 1
+		if self.pindex < 0:
+			self.pindex = self.maxentry
+
+	def slidePic(self):
+		print "[Picasa] slide to next Picture index=" + str(self.lastindex)
+		if config.plugins.foreca.loop.value==False and self.lastindex == self.maxentry:
+			self.PlayPause()
+		self.shownow = True
+		self.ShowPicture()
+
+	def PlayPause(self):
+		if self.slideTimer.isActive():
+			self.slideTimer.stop()
+			self["play_icon"].hide()
+		else:
+			self.slideTimer.start(config.plugins.foreca.slidetime.value*1000)
+			self["play_icon"].show()
+			self.nextPic()
+
+	def prevPic(self):
+		self.currPic = []
+		self.pindex = self.lastindex
+		self.prev()
+		self.start_decode()
+		self.shownow = True
+
+	def nextPic(self):
+		self.shownow = True
+		self.ShowPicture()
+
+	def Exit(self):
+		del self.picload
+		self.close(self.lastindex + self.dirlistcount)
+
+	def sleepTimer(self):
+		from Screens.SleepTimerEdit import SleepTimerEdit
+		self.session.open(SleepTimerEdit)
+
+#------------------------------------------------------------------------------------------
+#-------------------------------- Foreca Settings -----------------------------------------
+#------------------------------------------------------------------------------------------
+class PicSetup(Screen):
+	skin = """<screen position="center,center" size="480,260" title="Foreca SlideShow Settings" backgroundColor="#000000" >
+		<widget name="liste" position="5,5" size="470,250" scrollbarMode="showOnDemand" />
+		<eLabel backgroundColor="red" position="28,250" size="140,3" zPosition="2"/>
+		<eLabel backgroundColor="green" position="228,250" size="140,3" zPosition="2"/>
+		<widget name="key_red" position="28,218" zPosition="3" size="140,40" font="Regular;19" valign="center" halign="center" transparent="1" />
+		<widget name="key_green" position="228,218" zPosition="3" size="140,40" font="Regular;19" valign="center" halign="center" transparent="1" />
+	</screen>"""
+
+	def __init__(self, session):
+		self.skin = PicSetup.skin
+		Screen.__init__(self, session)
+		self["key_red"] = Button(_("Back"))
+		self["key_green"] = Button(_("Save"))
+		self["actions"] = NumberActionMap(["SetupActions", "ColorActions"],
+		{
+			"ok": self.save,
+			"green": self.save,
+			"cancel": self.close,
+			"red": self.close,
+			"left": self.keyLeft,
+			"right": self.keyRight,
+			"0": self.keyNumber,
+			"1": self.keyNumber,
+			"2": self.keyNumber,
+			"3": self.keyNumber,
+			"4": self.keyNumber,
+			"5": self.keyNumber,
+			"6": self.keyNumber,
+			"7": self.keyNumber,
+			"8": self.keyNumber,
+			"9": self.keyNumber
+		}, -3)
+		self.list = []
+		self["liste"] = ConfigList(self.list)
+
+		#self.list.append(getConfigListEntry(_("Picture Y moving"), config.plugins.foreca.max_offsety))
+		#self.list.append(getConfigListEntry(_("delete cached Pictures"), config.plugins.foreca.remove))
+		#self.list.append(getConfigListEntry(_("Picture Cache"), config.plugins.foreca.Device))
+		self.list.append(getConfigListEntry(_("Scaling Mode"), config.plugins.foreca.resize))
+		self.list.append(getConfigListEntry(_("Frame size in full view"), config.plugins.foreca.framesize))
+		self.list.append(getConfigListEntry(_("backgroundcolor"), config.plugins.foreca.bgcolor))
+		self.list.append(getConfigListEntry(_("Textcolor"), config.plugins.foreca.textcolor))
+		self.list.append(getConfigListEntry(_("SlideTime"), config.plugins.foreca.slidetime))
+		self.list.append(getConfigListEntry(_("Show Infoline"), config.plugins.foreca.infoline))
+		self.list.append(getConfigListEntry(_("slide picture in loop"), config.plugins.foreca.loop))
+
+	def save(self):
+		for x in self["liste"].list:
+				x[1].save()
+		config.save()
+		self.close()
+
+	def keyLeft(self):
+		self["liste"].handleKey(KEY_LEFT)
+	def keyRight(self):
+		self["liste"].handleKey(KEY_RIGHT)
+	def keyNumber(self, number):
+		self["liste"].handleKey(KEY_0 + number)
+
+#------------------------------------------------------------------------------------------
+#------------------------------------- Haupt Programm -------------------------------------
 #------------------------------------------------------------------------------------------
 def start(session, **kwargs):
