diff options
| author | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2010-09-27 15:18:55 +0200 |
|---|---|---|
| committer | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2010-10-06 11:05:40 +0200 |
| commit | ba4499aef953ae803c76171d4f966c06732dab2a (patch) | |
| tree | b817aad589931c6914923f9dcfbbb09ce3f5bc6c /lib/python | |
| parent | 8646cfe67f006cbec63cfe8fbbff50b6aa5ba811 (diff) | |
| download | enigma2-ba4499aef953ae803c76171d4f966c06732dab2a.tar.gz enigma2-ba4499aef953ae803c76171d4f966c06732dab2a.zip | |
refs bug #584
don't show "add service to bouquet" when inside bouquet view in multi bouquet mode and just one bouquet is set
don't show "add service to favourites" when inside favourite view (multi bouquet mode is disabled)
Diffstat (limited to 'lib/python')
| -rw-r--r-- | lib/python/Screens/ChannelSelection.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/python/Screens/ChannelSelection.py b/lib/python/Screens/ChannelSelection.py index 9ced5840..1c05bbf3 100644 --- a/lib/python/Screens/ChannelSelection.py +++ b/lib/python/Screens/ChannelSelection.py @@ -111,9 +111,16 @@ class ChannelContextMenu(Screen): 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) else: if current_root.getPath().find('FROM SATELLITES') != -1: append_when_current_valid(current, menu, (_("remove selected satellite"), self.removeSatelliteServices), level = 0) |
