Skip to content

Commit

Permalink
whitespace fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
radxnl committed Jun 7, 2014
1 parent d4c8b2f commit 8a1add2
Show file tree
Hide file tree
Showing 361 changed files with 2,906 additions and 2,910 deletions.
42 changes: 21 additions & 21 deletions RecordTimer.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,12 @@ def __init__(self, serviceref, begin, end, name, description, eit, disabled = Fa
if checkOldTimers == True:
if self.begin < time() - 1209600:
self.begin = int(time())

if self.end < self.begin:
self.end = self.begin

assert isinstance(serviceref, ServiceReference)

if serviceref and serviceref.isRecordable():
self.service_ref = serviceref
else:
Expand Down Expand Up @@ -459,11 +459,11 @@ def sendTryQuitMainloopNotification(self, answer):
def getNextActivation(self):
if self.state == self.StateEnded:
return self.end

next_state = self.state + 1
return {self.StatePrepared: self.start_prepare,
self.StateRunning: self.begin,

return {self.StatePrepared: self.start_prepare,
self.StateRunning: self.begin,
self.StateEnded: self.end }[next_state]

def failureCB(self, answer):
Expand All @@ -478,7 +478,7 @@ def timeChanged(self):
old_prepare = self.start_prepare
self.start_prepare = self.begin - self.prepare_time
self.backoff = 0

if int(old_prepare) != int(self.start_prepare):
self.log(15, "record time changed, start prepare is now: %s" % ctime(self.start_prepare))

Expand All @@ -493,7 +493,7 @@ def gotRecordEvent(self, record, event):
# displayed only once, even if more timers are failing at the
# same time. (which is very likely in case of disk fullness)
Notifications.AddPopup(text = _("Write error while recording. Disk full?\n"), type = MessageBox.TYPE_ERROR, timeout = 0, id = "DiskFullMessage")
# ok, the recording has been stopped. we need to properly note
# ok, the recording has been stopped. we need to properly note
# that in our state, with also keeping the possibility to re-try.
# TODO: this has to be done.
elif event == iRecordableService.evStart:
Expand Down Expand Up @@ -560,21 +560,21 @@ def createTimer(xml):
#filename = xml.get("filename").encode("utf-8")
entry = RecordTimerEntry(serviceref, begin, end, name, description, eit, disabled, justplay, afterevent, dirname = location, tags = tags, descramble = descramble, record_ecm = record_ecm, always_zap = always_zap, zap_wakeup = zap_wakeup)
entry.repeated = int(repeated)

for l in xml.findall("log"):
time = int(l.get("time"))
code = int(l.get("code"))
msg = l.text.strip().encode("utf-8")
entry.log_entries.append((time, code, msg))

return entry

class RecordTimer(timer.Timer):
def __init__(self):
timer.Timer.__init__(self)

self.Filename = Directories.resolveFilename(Directories.SCOPE_CONFIG, "timers.xml")

try:
self.loadTimer()
except IOError:
Expand Down Expand Up @@ -616,7 +616,7 @@ def isRecording(self):
if timer.isRunning() and not timer.justplay:
return True
return False

def loadTimer(self):
# TODO: PATH!
if not Directories.fileExists(self.Filename):
Expand Down Expand Up @@ -665,7 +665,7 @@ def saveTimer(self):
#t.set("begin", str(int(timer.begin)))
#t.set("end", str(int(timer.end)))
#t.set("serviceref", str(timer.service_ref))
#t.set("repeated", str(timer.repeated))
#t.set("repeated", str(timer.repeated))
#t.set("name", timer.name)
#t.set("description", timer.description)
#t.set("afterevent", str({
Expand Down Expand Up @@ -696,7 +696,7 @@ def saveTimer(self):

list.append('<?xml version="1.0" ?>\n')
list.append('<timers>\n')

for timer in self.timer_list + self.processed_timers:
if timer.dontSave:
continue
Expand Down Expand Up @@ -727,7 +727,7 @@ def saveTimer(self):
list.append(' descramble="' + str(int(timer.descramble)) + '"')
list.append(' record_ecm="' + str(int(timer.record_ecm)) + '"')
list.append('>\n')

if config.recording.debug.value:
for time, code, msg in timer.log_entries:
list.append('<log')
Expand All @@ -736,7 +736,7 @@ def saveTimer(self):
list.append('>')
list.append(str(stringToXML(msg)))
list.append('</log>\n')

list.append('</timer>\n')

list.append('</timers>\n')
Expand Down Expand Up @@ -975,18 +975,18 @@ def isInTimer(self, eventid, begin, duration, service):

def removeEntry(self, entry):
print "[Timer] Remove " + str(entry)

# avoid re-enqueuing
entry.repeated = False

# abort timer.
# this sets the end time to current time, so timer will be stopped.
entry.autoincrease = False
entry.abort()

if entry.state != entry.StateEnded:
self.timeChanged(entry)

print "state: ", entry.state
print "in processed: ", entry in self.processed_timers
print "in running: ", entry in self.timer_list
Expand Down
52 changes: 26 additions & 26 deletions data/keymap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
<key id="KEY_PAGEDOWN" mapto="pageDown" flags="mr" />
<key id="KEY_LEFT" mapto="pageUp" flags="mr" />
<key id="KEY_RIGHT" mapto="pageDown" flags="mr" />

<key id="1" mapto="moveUp" flags="mr" />
<key id="2" mapto="moveDown" flags="mr" />
</map>

<map context="KeyboardInputActions">
<key id="KEY_LEFT" mapto="left" flags="mr" />
<key id="KEY_RIGHT" mapto="right" flags="mr" />
Expand Down Expand Up @@ -66,7 +66,7 @@
<key id="KEY_FILE" mapto="file" flags="m" />
<key id="KEY_VIDEO" mapto="file" flags="m" />
</map>

<map context="InputActions">
<key id="KEY_LEFT" mapto="left" flags="mr" />
<key id="KEY_RIGHT" mapto="right" flags="mr" />
Expand Down Expand Up @@ -118,7 +118,7 @@
<key id="BTN_0" mapto="zapUp" flags="mr" />
<key id="BTN_1" mapto="zapDown" flags="mr" />
</map>

<map context="MinuteInputActions">
<key id="KEY_UP" mapto="up" flags="mr" />
<key id="KEY_DOWN" mapto="down" flags="mr" />
Expand Down Expand Up @@ -160,7 +160,7 @@
<key id="KEY_9" mapto="9" flags="m" />
<key id="KEY_0" mapto="0" flags="m" />
</map>

<map context="WizardActions">
<key id="KEY_LEFT" mapto="left" flags="mr" />
<key id="KEY_RIGHT" mapto="right" flags="mr" />
Expand All @@ -171,17 +171,17 @@
<key id="KEY_EXIT" mapto="back" flags="m" />
<key id="KEY_ESC" mapto="back" flags="m" />
</map>

<map context="InfobarMenuActions">
<key id="KEY_MENU" mapto="mainMenu" flags="mr" />
<key id="KEY_SPACE" mapto="mainMenu" flags="mr" />
</map>

<map context="MenuActions">
<key id="KEY_MENU" mapto="menu" flags="mr" />
<key id="KEY_SPACE" mapto="menu" flags="mr" />
</map>

<map context="InfobarShowHideActions">
<key id="KEY_OK" mapto="toggleShow" flags="m" />
<key id="KEY_ENTER" mapto="toggleShow" flags="m" />
Expand Down Expand Up @@ -252,12 +252,12 @@
<key id="KEY_POWER" mapto="deepstandby" flags="l" />
</device>
</map>

<map context="PowerKeyActions">
<key id="KEY_POWER" mapto="powerdown" flags="m" />
<key id="KEY_POWER" mapto="powerup" flags="b" />
</map>

<map context="NumberActions">
<key id="KEY_1" mapto="1" flags="m" />
<key id="KEY_2" mapto="2" flags="m" />
Expand Down Expand Up @@ -315,7 +315,7 @@
</device>

<key id="KEY_OK" mapto="unPauseService" flags="m" />

<key id="KEY_1" mapto="seekdef:1" flags="m" />
<key id="KEY_3" mapto="seekdef:3" flags="m" />
<key id="KEY_4" mapto="seekdef:4" flags="m" />
Expand All @@ -341,7 +341,7 @@
<key id="KEY_FASTFORWARD" mapto="seekFwd" flags="b" />
<key id="KEY_REWIND" mapto="seekBackManual" flags="l" />
<key id="KEY_FASTFORWARD" mapto="seekFwdManual" flags="l" />

<key id="KEY_1" mapto="seekdef:1" flags="m" />
<key id="KEY_3" mapto="seekdef:3" flags="m" />
<key id="KEY_4" mapto="seekdef:4" flags="m" />
Expand Down Expand Up @@ -406,7 +406,7 @@
<key id="KEY_INFO" mapto="InfoButtonPressedLong" flags="l" />
<key id="KEY_EPG" mapto="EPGButtonPressedLong" flags="l" />
</map>

<map context="InfobarCueSheetActions">
<device name="dreambox advanced remote control (native)">
<key id="KEY_PREVIOUS" mapto="jumpPreviousMark" flags="m" />
Expand All @@ -424,7 +424,7 @@
<key id="KEY_NEXTSONG" mapto="jumpNextMark" flags="m" />
</device>
</map>

<map context="MediaPlayerCueSheetActions">
<device name="dreambox advanced remote control (native)">
<key id="KEY_0" mapto="toggleMark" flags="m" />
Expand All @@ -440,7 +440,7 @@
<map context="VirtualKeyboardActions">
<key id="KEY_TEXT" mapto="showVirtualKeyboard" flags="m" />
</map>

<map context="InfobarTeletextActions">
<key id="KEY_TEXT" mapto="startTeletext" flags="m" />
</map>
Expand Down Expand Up @@ -513,7 +513,7 @@
<map context="TimerEditActions">
<key id="KEY_INFO" mapto="log" flags="m" />
</map>

<map context="EPGSelectActions">
<key id="KEY_GREEN" mapto="timerAdd" flags="m" />
<key id="KEY_YELLOW" mapto="yellow" flags="mr" />
Expand Down Expand Up @@ -543,7 +543,7 @@
<key id="KEY_MENU" mapto="contextMenu" flags="m" />
<key id="KEY_PROGRAM" mapto="timerAdd" flags="m" />
</map>

<map context="EventViewEPGActions">
<key id="KEY_YELLOW" mapto="openSingleServiceEPG" flags="m" />
<key id="KEY_BLUE" mapto="openMultiServiceEPG" flags="m" />
Expand All @@ -561,7 +561,7 @@
<key id="KEY_ENTER" mapto="ok" flags="m" />
<key id="KEY_ESC" mapto="cancel" flags="m" />
</map>

<map context="DirectionActions">
<key id="KEY_UP" mapto="up" flags="m" />
<key id="KEY_DOWN" mapto="down" flags="m" />
Expand All @@ -572,13 +572,13 @@
<key id="KEY_DOWN" mapto="downRepeated" flags="r" />
<key id="KEY_LEFT" mapto="leftRepeated" flags="r" />
<key id="KEY_RIGHT" mapto="rightRepeated" flags="r" />

<key id="KEY_LEFT" mapto="leftUp" flags="b" />
<key id="KEY_RIGHT" mapto="rightUp" flags="b" />
<key id="KEY_UP" mapto="upUp" flags="b" />
<key id="KEY_DOWN" mapto="downUp" flags="b" />
</map>

<map context="AudioSelectionActions">
<key id="KEY_RED" mapto="red" flags="m" />
<key id="KEY_GREEN" mapto="green" flags="m" />
Expand All @@ -605,9 +605,9 @@
</map>

<map context="WindowActions">

</map>

<map context="HelpActions">
<key id="KEY_HELP" mapto="displayHelp" flags="m" />
</map>
Expand All @@ -627,7 +627,7 @@
<key id="KEY_POWER" mapto="power" flags="m" />
<key id="KEY_KP1" mapto="discrete_on" flags="m" />
</map>

<map context="SleepTimerEditorActions">
<key id="KEY_OK" mapto="select" flags="m" />
<key id="KEY_ENTER" mapto="select" flags="m" />
Expand All @@ -649,8 +649,8 @@
<key id="KEY_YELLOW" mapto="toggleAsk" flags="mr" />
<key id="KEY_GREEN" mapto="toggleAction" flags="mr" />
<key id="KEY_BLUE" mapto="useServiceTime" flags="mr" />
</map>
</map>

<map context="CiSelectionActions">
<key id="KEY_LEFT" mapto="left" flags="mr" />
<key id="KEY_RIGHT" mapto="right" flags="mr" />
Expand All @@ -668,7 +668,7 @@
<key id="KEY_CHANNELUP" mapto="size+" flags="mr" />
<key id="KEY_CHANNELDOWN" mapto="size-" flags="mr" />
</map>

<map context="MediaPlayerActions">
<device name="dreambox advanced remote control (native)">
<key id="KEY_RECORD" mapto="shift_record" flags="l" />
Expand Down
2 changes: 1 addition & 1 deletion data/menu.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<menu text="Main menu" title="Main menu">
<id val="mainmenu" />
<!-- the following types are allowed:
<screen [module="mod"] [screen="classname"]>[arguments]</screen>
<screen [module="mod"] [screen="classname"]>[arguments]</screen>
executes Screen called "classname" from module "Screen.mod"
if no module is given, Screen must be globally available.
if no screen is given, module is used as screen class name.
Expand Down
2 changes: 1 addition & 1 deletion data/skin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
<widget source="TimeshiftPossible" render="FixedLabel" text="Timeshift" position="460,130" zPosition="1" size="85,22" font="Regular;16" backgroundColor="#182946" shadowColor="#1d354c" shadowOffset="-1,-1" transparent="1">
<convert type="ConditionalShowHide" />
</widget>

<!-- Yellow button (used for audio on boxes with new rc?) -->
<widget source="ShowAudioOnYellow" render="Pixmap" pixmap="skin_default/buttons/button_yellow.png" position="440,130" zPosition="1" size="15,16" alphatest="on">
<convert type="ConditionalShowHide" />
Expand Down
Loading

0 comments on commit 8a1add2

Please sign in to comment.