Skip to content

Commit

Permalink
[InfoBarGenerics] add channel selection for panic button (default=1)
Browse files Browse the repository at this point in the history
  • Loading branch information
atvblack64 committed Jun 15, 2015
1 parent 6128ab6 commit fa39c11
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions data/setup.xml
Expand Up @@ -79,6 +79,7 @@
<item level="1" text="Channel list cursor behavior" description="Configure the cursor behaviour in the channel selection list. When opening the channel selection list you can keep on the current service or already select up/down and you are able to revert the B+/B- buttons.">config.usage.servicelist_cursor_behavior</item>
<item level="1" text="Enable multiple bouquets" description="Services may be grouped in bouquets. When enabled, you can use more then one bouquet.">config.usage.multibouquet</item>
<item level="1" text="Enable panic button" description="When enabled, pressing '0' will zap you to the first channel in your first bouquet and delete your zap-history.">config.usage.panicbutton</item>
<item level="1" text="Panic channel" description="Pressing the panic button will zap you to this channelnumber in your first bouquet.">config.usage.panicchannel</item>
<item level="1" text="Jump first press in channel selection" description="This option allows you to choose what the first button press jumps to in channel list screen, (so pressing '2' jumps to 'A' or '2' first), when 'Quick Actions' preset actions are performed. ">config.usage.show_channel_jump_in_servicelist</item>
<item level="0" text="Show event-progress in channel selection" description="Set the type of the progress indication in the channel selection screen.">config.usage.show_event_progress_in_servicelist</item>
<item level="1" text="Show columns" description="Configure if and how wide columns will be shown in the channel selection list.">config.usage.servicelist_column</item>
Expand Down
1 change: 1 addition & 0 deletions lib/python/Components/UsageConfig.py
Expand Up @@ -59,6 +59,7 @@ def alternativeNumberModeChange(configElement):
config.usage.show_dvdplayer = ConfigYesNo(default = False)

config.usage.panicbutton = ConfigYesNo(default = False)
config.usage.panicchannel = ConfigInteger(default = 1, limits=(1,5000) )
config.usage.quickzap_bouquet_change = ConfigYesNo(default = False)
config.usage.e1like_radio_mode = ConfigYesNo(default = True)

Expand Down
5 changes: 3 additions & 2 deletions lib/python/Screens/InfoBarGenerics.py
Expand Up @@ -1080,7 +1080,7 @@ def keyNumberGlobal(self, number):
if number == 0:
if isinstance(self, InfoBarPiP) and self.pipHandles0Action():
self.pipDoHandle0Action()
elif len(self.servicelist.history) > 1:
elif len(self.servicelist.history) > 1 or config.usage.panicbutton.value:
self.checkTimeshiftRunning(self.recallPrevService)
else:
if self.has_key("TimeshiftActions") and self.timeshiftEnabled():
Expand Down Expand Up @@ -1111,6 +1111,7 @@ def recallPrevService(self, reply):
rootbouquet = eServiceReference(bqrootstr)
bouquet = eServiceReference(bqrootstr)
bouquetlist = serviceHandler.list(bouquet)

if not bouquetlist is None:
while True:
bouquet = bouquetlist.getNext()
Expand All @@ -1121,7 +1122,7 @@ def recallPrevService(self, reply):
if not servicelist is None:
serviceIterator = servicelist.getNext()
while serviceIterator.valid():
service, bouquet2 = self.searchNumber(1)
service, bouquet2 = self.searchNumber(config.usage.panicchannel.value)
if service == serviceIterator: break
serviceIterator = servicelist.getNext()
if serviceIterator.valid() and service == serviceIterator: break
Expand Down

0 comments on commit fa39c11

Please sign in to comment.