aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2006-10-08 22:35:42 +0000
committerFelix Domke <tmbinc@elitedvb.net>2006-10-08 22:35:42 +0000
commit21ef24675a83e78934de665d2a5511141c8e6cf1 (patch)
tree6c769ef511b6df6e3b6c476b33da82efce4453f9 /lib/python
parent295fb0f22061cb6c1c014d866ea79c453527a867 (diff)
downloadenigma2-21ef24675a83e78934de665d2a5511141c8e6cf1.tar.gz
enigma2-21ef24675a83e78934de665d2a5511141c8e6cf1.zip
ask before not saving settings
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/Screens/Setup.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/python/Screens/Setup.py b/lib/python/Screens/Setup.py
index 09984bd8..48c85c8e 100644
--- a/lib/python/Screens/Setup.py
+++ b/lib/python/Screens/Setup.py
@@ -1,4 +1,5 @@
from Screen import Screen
+from MessageBox import MessageBox
from Components.ActionMap import NumberActionMap
from Components.config import config, KEY_LEFT, KEY_RIGHT, KEY_OK
from Components.ConfigList import ConfigList, ConfigListScreen
@@ -129,13 +130,20 @@ class Setup(ConfigListScreen, Screen):
for x in self["config"].list:
x[1].save()
self.close()
+
+ def cancelConfirm(self, result):
+ if not result:
+ return
- def keyCancel(self):
print "cancel requested"
+
for x in self["config"].list:
x[1].cancel()
self.close()
-
+
+ def keyCancel(self):
+ self.session.openWithCallback(self.cancelConfirm, MessageBox, _("Really close without saving settings?"))
+
def getSetupTitle(id):
xmldata = setupdom.childNodes[0].childNodes
for x in elementsWithTag(xmldata, "setup"):