From: ghost Date: Wed, 30 Dec 2009 16:11:58 +0000 (+0100) Subject: show a short symbol when a unhandled key is pressed X-Git-Tag: 3.0.0~28^2~66^2~119^2~1 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/148af18dacd5f36aa785277d11126d03118e9437 show a short symbol when a unhandled key is pressed this fixes bug #293 --- diff --git a/data/skin_default.xml b/data/skin_default.xml index 71f579cb..bf21b715 100755 --- a/data/skin_default.xml +++ b/data/skin_default.xml @@ -253,6 +253,10 @@ self.instance.move(ePoint((720-wsizex)/2, (576-wsizey)/(count > 7 and 2 or 3) + + + + diff --git a/data/skin_default/Makefile.am b/data/skin_default/Makefile.am index e2d2abcc..3106af97 100644 --- a/data/skin_default/Makefile.am +++ b/data/skin_default/Makefile.am @@ -50,6 +50,7 @@ dist_install_DATA = \ sleeptimer.png \ timeline-now.png \ timeline.png \ + unhandled-key.png \ verticalline-plugins.png \ vkey_backspace.png \ vkey_bg.png \ diff --git a/data/skin_default/unhandled-key.png b/data/skin_default/unhandled-key.png new file mode 100644 index 00000000..8e543498 Binary files /dev/null and b/data/skin_default/unhandled-key.png differ diff --git a/lib/python/Screens/InfoBar.py b/lib/python/Screens/InfoBar.py index a15c7ac1..5b061245 100644 --- a/lib/python/Screens/InfoBar.py +++ b/lib/python/Screens/InfoBar.py @@ -12,7 +12,7 @@ profile("LOAD:InfoBarGenerics") from Screens.InfoBarGenerics import InfoBarShowHide, \ InfoBarNumberZap, InfoBarChannelSelection, InfoBarMenu, InfoBarRdsDecoder, \ InfoBarEPG, InfoBarSeek, InfoBarInstantRecord, \ - InfoBarAudioSelection, InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish, \ + InfoBarAudioSelection, InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish, InfoBarUnhandledKey, \ InfoBarSubserviceSelection, InfoBarShowMovies, InfoBarTimeshift, \ InfoBarServiceNotifications, InfoBarPVRState, InfoBarCueSheetSupport, InfoBarSimpleEventView, \ InfoBarSummarySupport, InfoBarMoviePlayerSummarySupport, InfoBarTimeshiftState, InfoBarTeletextPlugin, InfoBarExtensions, \ @@ -29,7 +29,7 @@ from Screens.HelpMenu import HelpableScreen class InfoBar(InfoBarBase, InfoBarShowHide, InfoBarNumberZap, InfoBarChannelSelection, InfoBarMenu, InfoBarEPG, InfoBarRdsDecoder, InfoBarInstantRecord, InfoBarAudioSelection, - HelpableScreen, InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish, + HelpableScreen, InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish, InfoBarUnhandledKey, InfoBarSubserviceSelection, InfoBarTimeshift, InfoBarSeek, InfoBarSummarySupport, InfoBarTimeshiftState, InfoBarTeletextPlugin, InfoBarExtensions, InfoBarPiP, InfoBarPlugins, InfoBarSubtitleSupport, InfoBarServiceErrorPopupSupport, InfoBarJobman, @@ -52,7 +52,7 @@ class InfoBar(InfoBarBase, InfoBarShowHide, for x in HelpableScreen, \ InfoBarBase, InfoBarShowHide, \ InfoBarNumberZap, InfoBarChannelSelection, InfoBarMenu, InfoBarEPG, InfoBarRdsDecoder, \ - InfoBarInstantRecord, InfoBarAudioSelection, \ + InfoBarInstantRecord, InfoBarAudioSelection, InfoBarUnhandledKey, \ InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish, InfoBarSubserviceSelection, \ InfoBarTimeshift, InfoBarSeek, InfoBarSummarySupport, InfoBarTimeshiftState, \ InfoBarTeletextPlugin, InfoBarExtensions, InfoBarPiP, InfoBarSubtitleSupport, InfoBarJobman, \ diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py index a3e56a40..c8aa00cb 100644 --- a/lib/python/Screens/InfoBarGenerics.py +++ b/lib/python/Screens/InfoBarGenerics.py @@ -26,13 +26,14 @@ from Screens.PictureInPicture import PictureInPicture from Screens.SubtitleDisplay import SubtitleDisplay from Screens.RdsDisplay import RdsInfoDisplay, RassInteractive from Screens.TimeDateInput import TimeDateInput +from Screens.UnhandledKey import UnhandledKey from ServiceReference import ServiceReference from Tools import Notifications from Tools.Directories import fileExists from enigma import eTimer, eServiceCenter, eDVBServicePMTHandler, iServiceInformation, \ - iPlayableService, eServiceReference, eEPGCache + iPlayableService, eServiceReference, eEPGCache, eActionMap from time import time, localtime, strftime from os import stat as os_stat @@ -47,6 +48,44 @@ class InfoBarDish: def __init__(self): self.dishDialog = self.session.instantiateDialog(Dish) +class InfoBarUnhandledKey: + def __init__(self): + self.unhandledKeyDialog = self.session.instantiateDialog(UnhandledKey) + self.hideTimer = eTimer() + self.hideTimer.callback.append(self.unhandledKeyDialog.hide) + self.checkUnusedTimer = eTimer() + self.checkUnusedTimer.callback.append(self.checkUnused) + self.onLayoutFinish.append(self.unhandledKeyDialog.hide) + eActionMap.getInstance().bindAction('', -0x7FFFFFFF, self.actionA) #highest prio + eActionMap.getInstance().bindAction('', 0x7FFFFFFF, self.actionB) #lowest prio + self.key = -1; + self.flags = 0; + self.uflags = 0; + + #this function is called on every keypress! + def actionA(self, key, flag): + if flag != 4: + if self.key != key: + if self.checkUnusedTimer.isActive(): + self.checkUnusedTimer.stop() + self.checkUnused() + self.key = key + self.flags = self.uflags = 0 + self.flags |= (1<