git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote branch 'origin/bug_380_stop_service_entering_tuner_setup'
[enigma2.git]
/
lib
/
python
/
Screens
/
Satconfig.py
diff --git
a/lib/python/Screens/Satconfig.py
b/lib/python/Screens/Satconfig.py
index 93fdcd3523b4c4c0bf77ec1229db77d25202bd23..62480b5f5249261da6d069cb2a604cbb5e51166f 100644
(file)
--- a/
lib/python/Screens/Satconfig.py
+++ b/
lib/python/Screens/Satconfig.py
@@
-10,11
+10,12
@@
from Components.config import getConfigListEntry, config, ConfigNothing, ConfigS
from Components.Sources.List import List
from Screens.MessageBox import MessageBox
from Screens.ChoiceBox import ChoiceBox
from Components.Sources.List import List
from Screens.MessageBox import MessageBox
from Screens.ChoiceBox import ChoiceBox
+from Screens.ServiceStopScreen import ServiceStopScreen
from time import mktime, localtime
from datetime import datetime
from time import mktime, localtime
from datetime import datetime
-class NimSetup(Screen, ConfigListScreen):
+class NimSetup(Screen, ConfigListScreen
, ServiceStopScreen
):
def createSimpleSetup(self, list, mode):
nim = self.nimConfig
if mode == "single":
def createSimpleSetup(self, list, mode):
nim = self.nimConfig
if mode == "single":
@@
-146,6
+147,8
@@
class NimSetup(Screen, ConfigListScreen):
currSat = self.nimConfig.advanced.sat[cur_orb_pos]
self.fillListWithAdvancedSatEntrys(currSat)
self.have_advanced = True
currSat = self.nimConfig.advanced.sat[cur_orb_pos]
self.fillListWithAdvancedSatEntrys(currSat)
self.have_advanced = True
+ if self.nim.description == "Alps BSBE2" and config.usage.setup_level.index >= 2: # expert
+ self.list.append(getConfigListEntry(_("Tone Amplitude"), self.nimConfig.toneAmplitude))
elif self.nim.isCompatible("DVB-C"):
self.configMode = getConfigListEntry(_("Configuration Mode"), self.nimConfig.configMode)
self.list.append(self.configMode)
elif self.nim.isCompatible("DVB-C"):
self.configMode = getConfigListEntry(_("Configuration Mode"), self.nimConfig.configMode)
self.list.append(self.configMode)
@@
-374,11
+377,14
@@
class NimSetup(Screen, ConfigListScreen):
self.deleteConfirmed(confirmed)
break
if not self.satpos_to_remove:
self.deleteConfirmed(confirmed)
break
if not self.satpos_to_remove:
- self.
close(
)
+ self.
restoreService(_("Zap back to service before tuner setup?")
)
def __init__(self, session, slotid):
Screen.__init__(self, session)
self.list = [ ]
def __init__(self, session, slotid):
Screen.__init__(self, session)
self.list = [ ]
+
+ ServiceStopScreen.__init__(self)
+ self.stopService()
ConfigListScreen.__init__(self, self.list)
ConfigListScreen.__init__(self, self.list)
@@
-403,6
+409,12
@@
class NimSetup(Screen, ConfigListScreen):
ConfigListScreen.keyRight(self)
self.newConfig()
ConfigListScreen.keyRight(self)
self.newConfig()
+ def keyCancel(self):
+ if self["config"].isChanged():
+ self.session.openWithCallback(self.cancelConfirm, MessageBox, _("Really close without saving settings?"))
+ else:
+ self.restoreService(_("Zap back to service before tuner setup?"))
+
def saveAll(self):
if self.nim.isCompatible("DVB-S"):
# reset connectedTo to all choices to properly store the default value
def saveAll(self):
if self.nim.isCompatible("DVB-S"):
# reset connectedTo to all choices to properly store the default value
@@
-422,7
+434,7
@@
class NimSetup(Screen, ConfigListScreen):
x[1].cancel()
# we need to call saveAll to reset the connectedTo choices
self.saveAll()
x[1].cancel()
# we need to call saveAll to reset the connectedTo choices
self.saveAll()
- self.
close(
)
+ self.
restoreService(_("Zap back to service before tuner setup?")
)
def nothingConnectedShortcut(self):
if type(self["config"].getCurrent()[1]) is ConfigSatlist:
def nothingConnectedShortcut(self):
if type(self["config"].getCurrent()[1]) is ConfigSatlist: