Index: ipk/source/system_auto3dskinswitch_1_0/usr/lib/enigma2/python/Plugins/SystemPlugins/Auto3DSkinSwitch/__init__.py
===================================================================
--- ipk/source/system_auto3dskinswitch_1_0/usr/lib/enigma2/python/Plugins/SystemPlugins/Auto3DSkinSwitch/__init__.py	(revision 14689)
+++ ipk/source/system_auto3dskinswitch_1_0/usr/lib/enigma2/python/Plugins/SystemPlugins/Auto3DSkinSwitch/__init__.py	(revision 14689)
@@ -0,0 +1,15 @@
+from Components.Language import language
+from Tools.Directories import resolveFilename, SCOPE_LANGUAGE, SCOPE_PLUGINS
+import gettext, os
+
+lang = language.getLanguage()
+os.environ["LANGUAGE"] = lang[:2]
+gettext.bindtextdomain("enigma2", resolveFilename(SCOPE_LANGUAGE))
+gettext.textdomain("enigma2")
+gettext.bindtextdomain("Auto3DSkinSwitch", "%s%s" % (resolveFilename(SCOPE_PLUGINS), "SystemPlugins/Auto3DSkinSwitch/locale/"))
+
+def _(txt):
+	t = gettext.dgettext("Auto3DSkinSwitch", txt)
+	if t == txt:
+		t = gettext.gettext(txt)
+	return t
Index: ipk/source/system_auto3dskinswitch_1_0/usr/lib/enigma2/python/Plugins/SystemPlugins/Auto3DSkinSwitch/plugin.py
===================================================================
--- ipk/source/system_auto3dskinswitch_1_0/usr/lib/enigma2/python/Plugins/SystemPlugins/Auto3DSkinSwitch/plugin.py	(revision 14689)
+++ ipk/source/system_auto3dskinswitch_1_0/usr/lib/enigma2/python/Plugins/SystemPlugins/Auto3DSkinSwitch/plugin.py	(revision 14689)
@@ -0,0 +1,169 @@
+################################################
+#
+#  3d2dSkinSwitch Plugin for Dreambox-Enigma2
+#  Coded by Vali (c)2011 modded by bonkel for aaf
+#  Support: www.dreambox-tools.info
+#
+#  This plugin is licensed under the Creative Commons 
+#  Attribution-NonCommercial-ShareAlike 3.0 Unported License.
+#  To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/
+#  or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
+#
+#  Alternatively, this plugin may be distributed and executed on hardware which
+#  is licensed by Dream Multimedia GmbH.
+#
+#
+#  This plugin is NOT free software. It is open source, you are allowed to
+#  modify it (if you keep the license), but it may not be commercially 
+#  distributed other than under the conditions noted above.
+#
+################################################
+import commands
+from commands import getoutput
+from Components.ActionMap import ActionMap
+from Components.config import config, getConfigListEntry, ConfigSelection, ConfigSubsection, ConfigYesNo, ConfigSubDict, ConfigNothing
+from Components.ConfigList import ConfigList, ConfigListScreen
+from Components.Sources.StaticText import StaticText
+from Components.ServiceEventTracker import ServiceEventTracker
+from Components.Label import Label
+from enigma import iPlayableService, iServiceInformation, eServiceCenter, eServiceReference
+from os import path as os_path, listdir, unlink, readlink, remove, system
+from Plugins.Plugin import PluginDescriptor
+from Screens.ChoiceBox import ChoiceBox
+from Screens.Screen import Screen
+from Screens.Setup import SetupSummary
+from ServiceReference import ServiceReference
+import time
+from __init__ import _
+
+config.plugins.autothreed = ConfigSubsection()
+config.plugins.autothreed.enable = ConfigYesNo(default = False)
+config.plugins.autothreed.mode = ConfigSelection(default = "sbs", choices =
+		[("sbs", _("Side-by-Side")), ("tab", _("Top and Bottom"))])
+config.plugins.autothreed.signal = ConfigYesNo(default = False)
+config.plugins.autothreed.ask = ConfigYesNo(default = False)
+
+class Auto3DSkinSwitch(Screen):
+	def __init__(self, session):
+		self.session = session
+		Screen.__init__(self, session)
+		self.__event_tracker = ServiceEventTracker(screen = self, eventmap =
+			{
+				iPlayableService.evUpdatedInfo: self.__evUpdatedInfo,
+				iPlayableService.evStart: self.__evStart
+			})
+		self.newService = False
+	def __evStart(self):
+		self.newService = True
+	def __evUpdatedInfo(self):
+		if self.newService and self.session.nav.getCurrentlyPlayingServiceReference():
+			self.newService = False
+			ref = self.session.nav.getCurrentService() 
+			serviceRef = self.session.nav.getCurrentlyPlayingServiceReference()
+			if serviceRef.getPath():
+				serviceHandler = eServiceCenter.getInstance()
+				r = eServiceReference(ref.info().getInfoString(iServiceInformation.sServiceref))
+				info = serviceHandler.info(r)
+				if info:
+					name = ServiceReference(info.getInfoString(r, iServiceInformation.sServiceref)).getServiceName().replace('\xc2\x86', '').replace('\xc2\x87', '')
+				else:
+					name = ""
+			else:
+				name = ServiceReference(ref.info().getInfoString(iServiceInformation.sServiceref)).getServiceName().replace('\xc2\x86', '').replace('\xc2\x87', '')
+			if config.plugins.autothreed.enable.value is True:
+				if "3d" in name.lower():
+					if config.plugins.autothreed.ask.value and os_path.isfile("/tmp/3don") is not True:
+						self.session.openWithCallback(self.threedswitchchoise, ChoiceBox, title=_("Switch to 3D modus now ?"), list=[(_("yes"), "yes"), (_("no"), "no")])
+					else:
+						commands.getoutput('touch /tmp/3don')
+						mode = config.plugins.autothreed.mode.getValue()
+						config.av.threedmode.value = "%s" % (mode)
+						config.av.threedmode.save()
+						if config.plugins.autothreed.signal.value:
+							system('/bin/3d-mode 40 &')
+				elif os_path.isfile("/tmp/3don") is True:
+					commands.getoutput('rm -r /tmp/3don')
+					config.av.threedmode.value = "off"
+					config.av.threedmode.save()
+					if config.plugins.autothreed.signal.value:
+						commands.getoutput('killall 3d-mode')
+	def threedswitchchoise(self, result):
+		if result is not None:
+			if result[1] == "yes":
+				commands.getoutput('touch /tmp/3don')
+				mode = config.plugins.autothreed.mode.getValue()
+				config.av.threedmode.value = "%s" % (mode)
+				config.av.threedmode.save()
+class AutothreedSetupMenu(Screen, ConfigListScreen):
+	def __init__(self, session):
+		Screen.__init__(self, session)
+		self.skinName = [ "Auto3DSetupMenu", "Setup" ]
+		self.setup_title = _("Auto 3D OSD Switcher")
+		self.onChangedEntry = [ ]
+		self.list = [ ]
+		ConfigListScreen.__init__(self, self.list, session = session, on_change = self.changedEntry)
+		self["actions"] = ActionMap(["SetupActions"],
+			{
+				"cancel": self.keyCancel,
+				"save": self.apply,
+			}, -2)
+		self["key_green"] = StaticText(_("OK"))
+		self["key_red"] = StaticText(_("Cancel"))
+		self.createSetup()
+		self.onLayoutFinish.append(self.layoutFinished)
+	def layoutFinished(self):
+		self.setTitle(_("Auto 3D OSD settings"))
+	def createSetup(self):
+		list = [
+			getConfigListEntry(_("Enable Auto3D"), config.plugins.autothreed.enable) 
+		]
+		if config.plugins.autothreed.enable.value == True:
+			sublist = [
+				getConfigListEntry(_("3D mode"), config.plugins.autothreed.mode),
+				getConfigListEntry(_("Send 3D mode switch signal to tv (only sbs)"), config.plugins.autothreed.signal),
+				getConfigListEntry(_("3D mode with question popup"), config.plugins.autothreed.ask),
+			]
+			list.extend(sublist)
+		self["config"].list = list
+		self["config"].setList(list)
+	def apply(self):
+		for x in self["config"].list:
+			x[1].save()
+			if config.plugins.autothreed.enable.value:
+				if os_path.isfile("/tmp/3don") is True:
+					mode = config.plugins.autothreed.mode.getValue()
+					config.av.threedmode.value = "%s" % (mode)
+					config.av.threedmode.save()
+			else:
+				config.av.threedmode.value = "off"
+				config.av.threedmode.save()
+		self.close()
+	def keyLeft(self):
+		ConfigListScreen.keyLeft(self)
+		if self["config"].getCurrent()[1] == config.plugins.autothreed.enable:
+			self.createSetup()
+	def keyRight(self):
+		ConfigListScreen.keyRight(self)
+		if self["config"].getCurrent()[1] == config.plugins.autothreed.enable:
+			self.createSetup()
+	def changedEntry(self):
+		for x in self.onChangedEntry:
+			x()
+	def getCurrentEntry(self):
+		return self["config"].getCurrent()[0]
+	def getCurrentValue(self):
+		return str(self["config"].getCurrent()[1].getText())
+	def createSummary(self):
+		return SetupSummary
+def autostart(reason, **kwargs):
+	session = kwargs["session"]
+	Auto3DSkinSwitch(session)
+def startSetup(menuid):
+	if menuid != "system":
+		return [ ]
+	return [("Auto 3D mode", autothreedSetup, "autothreed_setup", 45)]
+def autothreedSetup(session, **kwargs):
+	session.open(AutothreedSetupMenu)
+def Plugins(**kwargs):
+	return [PluginDescriptor(where = [PluginDescriptor.WHERE_SESSIONSTART], fnc = autostart), \
+		PluginDescriptor(name=_("Auto 3D mode"), description=_("Auto 3D mode"), where = PluginDescriptor.WHERE_MENU, fnc=startSetup) ]
