Skip to content

Commit

Permalink
Merge commit '6ff491caab739113f212543e4a70a0773cf6ce37' into megamerge
Browse files Browse the repository at this point in the history
Conflicts:
	lib/python/Screens/ChannelSelection.py
  • Loading branch information
Mike Looijmans committed Oct 16, 2010
2 parents 4da1b7e + 6ff491c commit 7c66c86
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 19 deletions.
5 changes: 4 additions & 1 deletion RecordTimer.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ def __init__(self, serviceref, begin, end, name, description, eit, disabled = Fa

assert isinstance(serviceref, ServiceReference)

self.service_ref = serviceref
if serviceref.isRecordable():
self.service_ref = serviceref
else:
self.service_ref = ServiceReference(None)
self.eit = eit
self.dontSave = False
self.name = name
Expand Down
15 changes: 14 additions & 1 deletion ServiceReference.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def __init__(self, ref, reftype = eServiceReference.idInvalid, flags = 0, path =

def __str__(self):
return self.ref.toString()

def getServiceName(self):
info = self.info()
return info and info.getName(self.ref) or ""
Expand All @@ -22,3 +22,16 @@ def info(self):

def list(self):
return self.serviceHandler.list(self.ref)

def getType(self):
return self.ref.type

def getPath(self):
return self.ref.getPath()

def getFlags(self):
return self.ref.flags

def isRecordable(self):
ref = self.ref
return ref.flags & eServiceReference.isGroup or (ref.type == eServiceReference.idDVB and ref.getPath() == "")
2 changes: 1 addition & 1 deletion lib/python/Components/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def __init__(self, choices, type = None):

def __list__(self):
if self.type == choicesList.LIST_TYPE_LIST:
ret = [not isinstance(x, tuple) and x or x[0] for x in self.choices]
ret = [not isinstance(x, tuple) and x or len(x) > 0 and x[0] or len(x) == 0 and x for x in self.choices]
else:
ret = self.choices.keys()
return ret or [""]
Expand Down
1 change: 1 addition & 0 deletions lib/python/Plugins/SystemPlugins/TempFanControl/plugin.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ def __init__(self, session, args = None):
ConfigListScreen.__init__(self, self.list, session = self.session)
#self["config"].list = self.list
#self["config"].setList(self.list)
self["config"].l.setSeperation(300)

self["actions"] = ActionMap(["OkCancelActions", "ColorActions"],
{
Expand Down
25 changes: 16 additions & 9 deletions lib/python/Screens/ChannelSelection.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,16 @@ def __init__(self, session, csel):
else:
append_when_current_valid(current, menu, (_("remove from parental protection"), boundFunction(self.removeParentalProtection, csel.getCurrentSelection())), level = 0)
if haveBouquets:
append_when_current_valid(current, menu, (_("add service to bouquet"), self.addServiceToBouquetSelected), level = 0)
bouquets = self.csel.getBouquetList()
if bouquets is None:
bouquetCnt = 0
else:
bouquetCnt = len(bouquets)
if not inBouquet or bouquetCnt > 1:
append_when_current_valid(current, menu, (_("add service to bouquet"), self.addServiceToBouquetSelected), level = 0)
else:
append_when_current_valid(current, menu, (_("add service to favourites"), self.addServiceToBouquetSelected), level = 0)
if not inBouquet:
append_when_current_valid(current, menu, (_("add service to favourites"), self.addServiceToBouquetSelected), level = 0)

if SystemInfo.get("NumVideoDecoders", 1) > 1:
# only allow the service to be played directly in pip / mainwindow when the service is not under parental control
Expand Down Expand Up @@ -259,7 +266,7 @@ def addServiceToBouquetSelected(self):
if cnt > 1: # show bouquet list
self.bsel = self.session.openWithCallback(self.bouquetSelClosed, BouquetSelector, bouquets, self.addCurrentServiceToBouquet)
elif cnt == 1: # add to only one existing bouquet
self.addCurrentServiceToBouquet(bouquets[0][1])
self.addCurrentServiceToBouquet(bouquets[0][1], closeBouquetSelection = False)

def bouquetSelClosed(self, recursive):
self.bsel = None
Expand Down Expand Up @@ -293,12 +300,12 @@ def markerInputCallback(self, marker):
self.csel.addMarker(marker)
self.close()

def addCurrentServiceToBouquet(self, dest):
def addCurrentServiceToBouquet(self, dest, closeBouquetSelection = True):
self.csel.addServiceToBouquet(dest)
if self.bsel is not None:
self.bsel.close(True)
else:
self.close(True) # close bouquet selection
self.close(closeBouquetSelection) # close bouquet selection

def removeCurrentService(self):
self.csel.removeCurrentService()
Expand Down Expand Up @@ -1507,9 +1514,9 @@ def __init__(self, session, infobar):

self["actions"] = ActionMap(["OkCancelActions", "TvRadioActions"],
{
"keyTV": self.closeRadio,
"keyRadio": self.closeRadio,
"cancel": self.closeRadio,
"keyTV": self.cancel,
"keyRadio": self.cancel,
"cancel": self.cancel,
"ok": self.channelSelected,
})

Expand Down Expand Up @@ -1547,7 +1554,7 @@ def RassInteractivePossibilityChanged(self, state):
self["RdsActions"].setEnabled(state)
########## RDS Radiotext / Rass Support END

def closeRadio(self):
def cancel(self):
self.infobar.rds_display.onRassInteractivePossibilityChanged.remove(self.RassInteractivePossibilityChanged)
self.info.hide()
#set previous tv service
Expand Down
22 changes: 19 additions & 3 deletions lib/python/Screens/TimerEntry.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
from Screens.MovieSelection import getPreferredTagEditor
from Screens.LocationBox import MovieLocationBox
from Screens.ChoiceBox import ChoiceBox
from Screens.MessageBox import MessageBox
from RecordTimer import AFTEREVENT
from enigma import eEPGCache
from enigma import eEPGCache, eServiceReference
from time import localtime, mktime, time, strftime
from datetime import datetime

Expand Down Expand Up @@ -245,7 +246,7 @@ def finishedChannelSelection(self, *args):
self.timerentry_service_ref = ServiceReference(args[0])
self.timerentry_service.setCurrentText(self.timerentry_service_ref.getServiceName())
self["config"].invalidate(self.channelEntry)

def getTimestamp(self, date, mytime):
d = localtime(date)
dt = datetime(d.tm_year, d.tm_mon, d.tm_mday, mytime[0], mytime[1])
Expand All @@ -264,7 +265,22 @@ def getBeginEnd(self):
end += 86400
return begin, end

def keyGo(self):
def selectChannelSelector(self, *args):
self.session.openWithCallback(
self.finishedChannelSelectionCorrection,
ChannelSelection.SimpleChannelSelection,
_("Select channel to record from")
)

def finishedChannelSelectionCorrection(self, *args):
if args:
self.finishedChannelSelection(*args)
self.keyGo()

def keyGo(self, result = None):
if not self.timerentry_service_ref.isRecordable():
self.session.openWithCallback(self.selectChannelSelector, MessageBox, _("You didn't select a channel to record from."), MessageBox.TYPE_ERROR)
return
self.timer.name = self.timerentry_name.value
self.timer.description = self.timerentry_description.value
self.timer.justplay = self.timerentry_justplay.value == "zap"
Expand Down
4 changes: 4 additions & 0 deletions lib/python/Screens/Wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,10 +387,14 @@ def ok(self):
def keyNumberGlobal(self, number):
if (self.wizard[self.currStep]["config"]["screen"] != None):
self.configInstance.keyNumberGlobal(number)
elif (self.wizard[self.currStep]["config"]["type"] == "dynamic"):
self["config"].handleKey(KEY_0 + number)

def keyGotAscii(self):
if (self.wizard[self.currStep]["config"]["screen"] != None):
self["config"].handleKey(KEY_ASCII)
elif (self.wizard[self.currStep]["config"]["type"] == "dynamic"):
self["config"].handleKey(KEY_ASCII)

def left(self):
self.resetCounter()
Expand Down
8 changes: 4 additions & 4 deletions lib/python/Tools/NumericalTextInput.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __init__(self, nextFunc=None, handleTimeout = True, search = False):
return

if self.lang == 'de_DE':
self.mapping.append (u".,?'+\"0-()@/:_$!") # 0
self.mapping.append (u".,?'+\"0-()@/:_$!=") # 0
self.mapping.append (u" 1") # 1
self.mapping.append (u"aäbc2AÄBC") # 2
self.mapping.append (u"def3DEF") # 3
Expand All @@ -42,7 +42,7 @@ def __init__(self, nextFunc=None, handleTimeout = True, search = False):
self.mapping.append (u"tuüv8TUÜV") # 8
self.mapping.append (u"wxyz9WXYZ") # 9
elif self.lang == 'es_ES':
self.mapping.append (u".,?'+\"0-()@/:_$!") # 0
self.mapping.append (u".,?'+\"0-()@/:_$!=") # 0
self.mapping.append (u" 1") # 1
self.mapping.append (u"abcáà2ABCÁÀ") # 2
self.mapping.append (u"deéèf3DEFÉÈ") # 3
Expand All @@ -53,7 +53,7 @@ def __init__(self, nextFunc=None, handleTimeout = True, search = False):
self.mapping.append (u"tuvúù8TUVÚÙ") # 8
self.mapping.append (u"wxyz9WXYZ") # 9
if self.lang in ('sv_SE', 'fi_FI'):
self.mapping.append (u".,?'+\"0-()@/:_$!") # 0
self.mapping.append (u".,?'+\"0-()@/:_$!=") # 0
self.mapping.append (u" 1") # 1
self.mapping.append (u"abcåä2ABCÅÄ") # 2
self.mapping.append (u"defé3DEFÉ") # 3
Expand All @@ -64,7 +64,7 @@ def __init__(self, nextFunc=None, handleTimeout = True, search = False):
self.mapping.append (u"tuv8TUV") # 8
self.mapping.append (u"wxyz9WXYZ") # 9
else:
self.mapping.append (u".,?'+\"0-()@/:_$!") # 0
self.mapping.append (u".,?'+\"0-()@/:_$!=") # 0
self.mapping.append (u" 1") # 1
self.mapping.append (u"abc2ABC") # 2
self.mapping.append (u"def3DEF") # 3
Expand Down

0 comments on commit 7c66c86

Please sign in to comment.