Skip to content

Commit

Permalink
[vu] remove epg key workaround and fix info keys
Browse files Browse the repository at this point in the history
  • Loading branch information
atvcaptain committed Aug 23, 2014
1 parent 92dac17 commit 16be4d8
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 25 deletions.
3 changes: 1 addition & 2 deletions data/keymap.ntr
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
<map context="InfobarEPGActions">
<key id="KEY_RED" mapto="RedPressed" flags="b" />
<key id="KEY_I" mapto="IPressed" flags="b" />
<key id="KEY_INFO" mapto="InfoPressed" flags="b" />
<key id="KEY_INFO" mapto="InfoPressed" flags="m" />
<key id="KEY_INFO" mapto="showEventInfoPlugin" flags="l" />
<key id="KEY_EPG" mapto="EPGPressed" flags="b" />
<key id="KEY_EPG" mapto="showEventInfoPlugin" flags="l" />
Expand Down Expand Up @@ -216,7 +216,6 @@
<map context="InfobarShowHideActions">
<key id="KEY_OK" mapto="toggleShow" flags="m" />
<key id="KEY_OK" mapto="LongOKPressed" flags="l" />
<key id="KEY_INFO" mapto="InfoPressed" flags="m" />
<key id="KEY_ENTER" mapto="toggleShow" flags="m" />
<key id="KEY_EXIT" mapto="toggleShow" flags="b" />
<key id="KEY_ESC" mapto="hide" flags="m" />
Expand Down
3 changes: 1 addition & 2 deletions data/keymap.u80
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
</map>

<map context="InfobarEPGActions">
<key id="KEY_INFO" mapto="InfoPressed" flags="b" />
<key id="KEY_INFO" mapto="InfoPressed" flags="m" />
<key id="KEY_INFO" mapto="showEventInfoPlugin" flags="l" />
<key id="KEY_EPG" mapto="EPGPressed" flags="b" />
<key id="KEY_EPG" mapto="showEventInfoPlugin" flags="l" />
Expand Down Expand Up @@ -190,7 +190,6 @@
<map context="InfobarShowHideActions">
<key id="KEY_OK" mapto="toggleShow" flags="m" />
<key id="KEY_OK" mapto="LongOKPressed" flags="l" />
<key id="KEY_INFO" mapto="InfoPressed" flags="m" />
<key id="KEY_ENTER" mapto="toggleShow" flags="m" />
<key id="KEY_EXIT" mapto="hide" flags="m" />
<key id="KEY_ESC" mapto="hide" flags="m" />
Expand Down
3 changes: 1 addition & 2 deletions data/keymap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
<map context="InfobarEPGActions">
<key id="KEY_RED" mapto="RedPressed" flags="b" />
<key id="KEY_I" mapto="IPressed" flags="b" />
<key id="KEY_INFO" mapto="InfoPressed" flags="b" />
<key id="KEY_INFO" mapto="InfoPressed" flags="m" />
<key id="KEY_INFO" mapto="showEventInfoPlugin" flags="l" />
<key id="KEY_EPG" mapto="EPGPressed" flags="b" />
<key id="KEY_EPG" mapto="showEventInfoPlugin" flags="l" />
Expand Down Expand Up @@ -218,7 +218,6 @@
<map context="InfobarShowHideActions">
<key id="KEY_OK" mapto="toggleShow" flags="m" />
<key id="KEY_OK" mapto="LongOKPressed" flags="l" />
<key id="KEY_INFO" mapto="InfoPressed" flags="m" />
<key id="KEY_ENTER" mapto="toggleShow" flags="m" />
<key id="KEY_EXIT" mapto="hide" flags="m" />
<key id="KEY_ESC" mapto="hide" flags="m" />
Expand Down
31 changes: 12 additions & 19 deletions lib/python/Screens/InfoBarGenerics.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,16 +150,16 @@ def ToggleVideo():
if mode == "letterbox":
f = open("/proc/stb/video/policy", "w")
f.write("panscan")
f.close()
f.close()
elif mode == "panscan":
f = open("/proc/stb/video/policy", "w")
f.write("letterbox")
f.close()
f.close()
else:
# if current policy is not panscan or letterbox, set to panscan
f = open("/proc/stb/video/policy", "w")
f.write("panscan")
f.close()
f.close()
resumePointCache = loadResumePoints()
resumePointCacheLast = int(time())

Expand Down Expand Up @@ -525,7 +525,6 @@ def __init__(self):
self["ShowHideActions"] = ActionMap( ["InfobarShowHideActions"] ,
{
"LongOKPressed": self.toggleShowLong,
"InfoPressed": self.InfoBPressed,
"toggleShow": self.OkPressed,
"hide": self.keyHide,
}, 1) # lower prio to make it possible to override ok and cancel..
Expand Down Expand Up @@ -567,10 +566,6 @@ def __layoutFinished(self):
except:
self.pvrStateDialog = None

def InfoBPressed(self):
if config.plisettings.PLIINFO_mode.value == "infobar":
self.toggleShow()

def OkPressed(self):
if config.usage.okbutton_mode.value == "0":
self.toggleShow()
Expand Down Expand Up @@ -674,7 +669,7 @@ def doTimerHide(self):
try:
self.pvrStateDialog.hide()
except:
pass
pass
elif self.__state == self.STATE_HIDDEN and self.secondInfoBarScreen and self.secondInfoBarScreen.shown:
self.secondInfoBarScreen.hide()
self.secondInfoBarWasShown = False
Expand All @@ -685,7 +680,7 @@ def doTimerHide(self):
pass
self.EventViewIsShown = False
elif hasattr(self, "pvrStateDialog"):
try:
try:
self.pvrStateDialog.hide()
except:
pass
Expand Down Expand Up @@ -719,7 +714,7 @@ def toggleShow(self):
self.hide()
self.openEventView(True)
self.EventViewIsShown = True
self.startHideTimer()
self.startHideTimer()
else:
self.hide()
if self.secondInfoBarScreen and self.secondInfoBarScreen.shown:
Expand Down Expand Up @@ -1580,9 +1575,7 @@ def RedPressed(self):

def InfoPressed(self):
if isStandardInfoBar(self) or isMoviePlayerInfoBar(self):
if getBoxType().startswith('vu'):
self.showDefaultEPG()
elif config.plisettings.PLIINFO_mode.value == "eventview":
if config.plisettings.PLIINFO_mode.value == "eventview":
self.openEventView()
elif config.plisettings.PLIINFO_mode.value == "epgpress":
self.showDefaultEPG()
Expand Down Expand Up @@ -3781,15 +3774,15 @@ def aspectSelected(self, aspect):
if aspect[1] == "letterbox":
f = open("/proc/stb/video/policy", "w")
f.write("panscan")
f.close()
f.close()
elif aspect[1] == "panscan":
f = open("/proc/stb/video/policy", "w")
f.write("letterbox")
f.close()
f.close()
else:
f = open("/proc/stb/video/policy", "w")
f.write(aspect[1])
f.close()
f.close()
self.ExGreen_doHide()
else:
self.ExGreen_doHide()
Expand All @@ -3802,7 +3795,7 @@ def __init__(self):
def resolutionSelection(self):
f = open("/proc/stb/vmpeg/0/xres", "r")
xresString = f.read()
f.close()
f.close()
f = open("/proc/stb/vmpeg/0/yres", "r")
yresString = f.read()
f.close()
Expand Down Expand Up @@ -3859,7 +3852,7 @@ def ResolutionSelected(self, Resolution):
if Resolution[1] != "auto":
f = open("/proc/stb/video/videomode", "w")
f.write(Resolution[1])
f.close()
f.close()
#from enigma import gMainDC
#gMainDC.getInstance().setResolution(-1, -1)
self.ExGreen_doHide()
Expand Down

0 comments on commit 16be4d8

Please sign in to comment.