From 14c433828a94f15aaabefffdc3978914a6a7b604 Mon Sep 17 00:00:00 2001 From: Stefan Pluecken Date: Tue, 17 Nov 2009 01:14:57 +0100 Subject: fixes bug #163 remove transparency from the (turning) dish icon and draw a border around it move dish icon to the foreground --- data/skin_default.xml | 2 +- data/skin_default/icons/dish.png | Bin 8320 -> 8195 bytes 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'data') diff --git a/data/skin_default.xml b/data/skin_default.xml index 649cedaf..71f579cb 100755 --- a/data/skin_default.xml +++ b/data/skin_default.xml @@ -250,7 +250,7 @@ self.instance.move(ePoint((720-wsizex)/2, (576-wsizey)/(count > 7 and 2 or 3) - + diff --git a/data/skin_default/icons/dish.png b/data/skin_default/icons/dish.png index f3c6548d..6148e07c 100644 Binary files a/data/skin_default/icons/dish.png and b/data/skin_default/icons/dish.png differ -- cgit v1.2.3 From 796d71eab6d0760a9657ba0519154288511ba30e Mon Sep 17 00:00:00 2001 From: ghost Date: Wed, 18 Nov 2009 12:16:03 +0100 Subject: data/encoding.conf: add arabic --- data/encoding.conf | 1 + 1 file changed, 1 insertion(+) (limited to 'data') diff --git a/data/encoding.conf b/data/encoding.conf index 14eeaefd..9383317e 100644 --- a/data/encoding.conf +++ b/data/encoding.conf @@ -1,5 +1,6 @@ #Fallback encoding when in dvb-text no encoding table is given #Countycode ISO8859-X or ISO6397 +ara ISO8859-6 tur ISO8859-9 gre ISO8859-7 pol ISO8859-2 -- cgit v1.2.3 From 9fba96095af3d4a6b1b596893f4e005dc0b6f16d Mon Sep 17 00:00:00 2001 From: ghost Date: Thu, 3 Dec 2009 16:46:01 +0100 Subject: use new DeepstandbySupport SystemInfo entry at some places... this fixes bug #307 Conflicts: lib/python/Screens/TimerEntry.py --- data/menu.xml | 3 ++- lib/python/Screens/SleepTimerEdit.py | 7 ++++++- lib/python/Screens/TaskView.py | 7 ++++++- lib/python/Screens/TimerEntry.py | 7 ++++++- 4 files changed, 20 insertions(+), 4 deletions(-) (limited to 'data') diff --git a/data/menu.xml b/data/menu.xml index 403e0b81..59195f15 100644 --- a/data/menu.xml +++ b/data/menu.xml @@ -104,6 +104,7 @@ self.session.openWithCallback(msgClosed, FactoryReset) 2 3 - 1 + 1 + 1 diff --git a/lib/python/Screens/SleepTimerEdit.py b/lib/python/Screens/SleepTimerEdit.py index ff061d88..e5e7af4e 100644 --- a/lib/python/Screens/SleepTimerEdit.py +++ b/lib/python/Screens/SleepTimerEdit.py @@ -5,6 +5,7 @@ from Components.Input import Input from Components.Label import Label from Components.Pixmap import Pixmap from Components.config import config, ConfigInteger +from Components.SystemInfo import SystemInfo from enigma import eEPGCache from SleepTimer import SleepTimer from time import time @@ -77,7 +78,11 @@ class SleepTimerEdit(Screen): self["red_text"].setText(_("Action:") + " " + _("Disable timer")) if config.SleepTimer.action.value == "shutdown": - self["green_text"].setText(_("Sleep timer action:") + " " + _("Deep Standby")) + if SystemInfo["DeepstandbySupport"]: + shutdownString = _("Deep Standby") + else: + shutdownString = _("Shutdown") + self["green_text"].setText(_("Sleep timer action:") + " " + shutdownString) elif config.SleepTimer.action.value == "standby": self["green_text"].setText(_("Sleep timer action:") + " " + _("Standby")) diff --git a/lib/python/Screens/TaskView.py b/lib/python/Screens/TaskView.py index 1453c05f..eb926ca3 100644 --- a/lib/python/Screens/TaskView.py +++ b/lib/python/Screens/TaskView.py @@ -1,6 +1,7 @@ from Screen import Screen from Components.ConfigList import ConfigListScreen from Components.config import config, ConfigSubsection, ConfigSelection, getConfigListEntry +from Components.SystemInfo import SystemInfo from InfoBarGenerics import InfoBarNotifications import Screens.Standby from Tools import Notifications @@ -44,7 +45,11 @@ class JobView(InfoBarNotifications, Screen, ConfigListScreen): self.afterevents = [ "nothing", "standby", "deepstandby", "close" ] self.settings = ConfigSubsection() - self.settings.afterEvent = ConfigSelection(choices = [("nothing", _("do nothing")), ("close", _("Close")), ("standby", _("go to standby")), ("deepstandby", _("go to deep standby"))], default = self.afterevents[afterEvent]) + if SystemInfo["DeepstandbySupport"]: + shutdownString = _("go to deep standby") + else: + shutdownString = _("shut down") + self.settings.afterEvent = ConfigSelection(choices = [("nothing", _("do nothing")), ("close", _("Close")), ("standby", _("go to standby")), ("deepstandby", shutdownString)], default = self.afterevents[afterEvent]) self.setupList() self.state_changed() diff --git a/lib/python/Screens/TimerEntry.py b/lib/python/Screens/TimerEntry.py index 5813bac5..42a3195c 100644 --- a/lib/python/Screens/TimerEntry.py +++ b/lib/python/Screens/TimerEntry.py @@ -9,6 +9,7 @@ from Components.Button import Button from Components.Label import Label from Components.Pixmap import Pixmap from Components.UsageConfig import defaultMoviePath +from Components.SystemInfo import SystemInfo from Screens.MovieSelection import getPreferredTagEditor from Screens.LocationBox import MovieLocationBox from Screens.ChoiceBox import ChoiceBox @@ -93,7 +94,11 @@ class TimerEntry(Screen, ConfigListScreen): day[weekday] = 1 self.timerentry_justplay = ConfigSelection(choices = [("zap", _("zap")), ("record", _("record"))], default = {0: "record", 1: "zap"}[justplay]) - self.timerentry_afterevent = ConfigSelection(choices = [("nothing", _("do nothing")), ("standby", _("go to standby")), ("deepstandby", _("go to deep standby")), ("auto", _("auto"))], default = afterevent) + if SystemInfo["DeepstandbySupport"]: + shutdownString = _("go to deep standby") + else: + shutdownString = _("shut down") + self.timerentry_afterevent = ConfigSelection(choices = [("nothing", _("do nothing")), ("standby", _("go to standby")), ("deepstandby", shutdownString), ("auto", _("auto"))], default = afterevent) self.timerentry_type = ConfigSelection(choices = [("once",_("once")), ("repeated", _("repeated"))], default = type) self.timerentry_name = ConfigText(default = self.timer.name, visible_width = 50, fixed_size = False) self.timerentry_description = ConfigText(default = self.timer.description, visible_width = 50, fixed_size = False) -- cgit v1.2.3 From a88994b2d0bab5d8a5d0b38b5a66f374372b0830 Mon Sep 17 00:00:00 2001 From: thedoc Date: Tue, 15 Dec 2009 16:18:52 +0100 Subject: fixes bug #354 change MenuList to ChoiceList in ChannelContext and assign Blue button to PiP activation --- data/skin_default.xml | 4 ++-- lib/python/Components/ChoiceList.py | 2 +- lib/python/Screens/ChannelSelection.py | 27 +++++++++++++++++---------- 3 files changed, 20 insertions(+), 13 deletions(-) (limited to 'data') diff --git a/data/skin_default.xml b/data/skin_default.xml index 71f579cb..7aaff38f 100755 --- a/data/skin_default.xml +++ b/data/skin_default.xml @@ -70,8 +70,8 @@ - - + + diff --git a/lib/python/Components/ChoiceList.py b/lib/python/Components/ChoiceList.py index 4700e9e6..33868d61 100755 --- a/lib/python/Components/ChoiceList.py +++ b/lib/python/Components/ChoiceList.py @@ -3,7 +3,7 @@ from Tools.Directories import SCOPE_CURRENT_SKIN, resolveFilename from enigma import RT_HALIGN_LEFT, eListboxPythonMultiContent, gFont from Tools.LoadPixmap import LoadPixmap -def ChoiceEntryComponent(key, text): +def ChoiceEntryComponent(key = "", text = ["--"]): res = [ text ] if text[0] == "--": res.append((eListboxPythonMultiContent.TYPE_TEXT, 0, 00, 800, 25, 0, RT_HALIGN_LEFT, "-"*200)) diff --git a/lib/python/Screens/ChannelSelection.py b/lib/python/Screens/ChannelSelection.py index d4a098c3..e8bbce15 100644 --- a/lib/python/Screens/ChannelSelection.py +++ b/lib/python/Screens/ChannelSelection.py @@ -21,6 +21,7 @@ profile("ChannelSelection.py 2.3") from Components.Input import Input profile("ChannelSelection.py 3") from Components.ParentalControl import parentalControl +from Components.ChoiceList import ChoiceList, ChoiceEntryComponent from Screens.InputBox import InputBox, PinInput from Screens.MessageBox import MessageBox from Screens.ServiceInfo import ServiceInfo @@ -70,9 +71,9 @@ OFF = 0 EDIT_BOUQUET = 1 EDIT_ALTERNATIVES = 2 -def append_when_current_valid(current, menu, args, level = 0): +def append_when_current_valid(current, menu, args, level = 0, key = ""): if current and current.valid() and level <= config.usage.setup_level.index: - menu.append(args) + menu.append(ChoiceEntryComponent(key, args)) class ChannelContextMenu(Screen): def __init__(self, session, csel): @@ -81,13 +82,15 @@ class ChannelContextMenu(Screen): self.csel = csel self.bsel = None - self["actions"] = ActionMap(["OkCancelActions"], + self["actions"] = ActionMap(["OkCancelActions", "ColorActions", "NumberActions"], { "ok": self.okbuttonClick, - "cancel": self.cancelClick + "cancel": self.cancelClick, + "blue": self.showServiceInPiP }) menu = [ ] + self.pipAvailable = False current = csel.getCurrentSelection() current_root = csel.getRoot() current_sel_path = current.getPath() @@ -102,7 +105,6 @@ class ChannelContextMenu(Screen): if not inBouquetRootList: isPlayable = not (current_sel_flags & (eServiceReference.isMarker|eServiceReference.isDirectory)) if isPlayable: - append_when_current_valid(current, menu, (_("Activate Picture in Picture"), self.showServiceInPiP), level = 0) if config.ParentalControl.configured.value: if parentalControl.getProtectionLevel(csel.getCurrentSelection().toCompareString()) == -1: append_when_current_valid(current, menu, (_("add to parental protection"), boundFunction(self.addParentalProtection, csel.getCurrentSelection())), level = 0) @@ -124,8 +126,11 @@ class ChannelContextMenu(Screen): append_when_current_valid(current, menu, (_("remove entry"), self.removeCurrentService), level = 0) if current_root and current_root.getPath().find("flags == %d" %(FLAG_SERVICE_NEW_FOUND)) != -1: append_when_current_valid(current, menu, (_("remove new found flag"), self.removeNewFoundFlag), level = 0) + if isPlayable: + append_when_current_valid(current, menu, (_("Activate Picture in Picture"), self.showServiceInPiP), level = 0, key = "blue") + self.pipAvailable = True else: - menu.append((_("add bouquet"), self.showBouquetInputBox)) + menu.append(ChoiceEntryComponent(text = (_("add bouquet"), self.showBouquetInputBox))) append_when_current_valid(current, menu, (_("remove entry"), self.removeBouquet), level = 0) if inBouquet: # current list is editable? @@ -133,7 +138,7 @@ class ChannelContextMenu(Screen): if not csel.movemode: append_when_current_valid(current, menu, (_("enable move mode"), self.toggleMoveMode), level = 1) if not inBouquetRootList and current_root and not (current_root.flags & eServiceReference.isGroup): - menu.append((_("add marker"), self.showMarkerInputBox)) + menu.append(ChoiceEntryComponent(text = (_("add marker"), self.showMarkerInputBox))) if haveBouquets: append_when_current_valid(current, menu, (_("enable bouquet edit"), self.bouquetMarkStart), level = 0) else: @@ -158,11 +163,11 @@ class ChannelContextMenu(Screen): append_when_current_valid(current, menu, (_("end alternatives edit"), self.bouquetMarkEnd), level = 0) append_when_current_valid(current, menu, (_("abort alternatives edit"), self.bouquetMarkAbort), level = 0) - menu.append((_("back"), self.cancelClick)) - self["menu"] = MenuList(menu) + menu.append(ChoiceEntryComponent(text = (_("back"), self.cancelClick))) + self["menu"] = ChoiceList(menu) def okbuttonClick(self): - self["menu"].getCurrent()[1]() + self["menu"].getCurrent()[0][1]() def cancelClick(self): self.close(False) @@ -193,6 +198,8 @@ class ChannelContextMenu(Screen): self.session.openWithCallback(self.close, MessageBox, _("The pin code you entered is wrong."), MessageBox.TYPE_ERROR) def showServiceInPiP(self): + if not self.pipAvailable: + return if self.session.pipshown: del self.session.pip self.session.pip = self.session.instantiateDialog(PictureInPicture) -- cgit v1.2.3 From a285571e31b3b1a99764a674319621f0298833c2 Mon Sep 17 00:00:00 2001 From: thedoc Date: Wed, 23 Dec 2009 21:57:24 +0100 Subject: fixes bug #273 add a quick shortcut to switch to "nothing connected" in the sat config screen for remote debugging purposes (undocumented) --- data/keymap.xml | 4 ++++ lib/python/Screens/Satconfig.py | 11 +++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'data') diff --git a/data/keymap.xml b/data/keymap.xml index 25538f87..9461d509 100755 --- a/data/keymap.xml +++ b/data/keymap.xml @@ -98,6 +98,10 @@ + + + + diff --git a/lib/python/Screens/Satconfig.py b/lib/python/Screens/Satconfig.py index 634d231a..d5249b99 100644 --- a/lib/python/Screens/Satconfig.py +++ b/lib/python/Screens/Satconfig.py @@ -5,7 +5,8 @@ from Components.ActionMap import ActionMap from Components.ConfigList import ConfigListScreen from Components.MenuList import MenuList from Components.NimManager import nimmanager -from Components.config import getConfigListEntry, config, ConfigNothing, ConfigSelection, updateConfigElement +from Components.config import getConfigListEntry, config, ConfigNothing, ConfigSelection, updateConfigElement,\ + ConfigSatlist from Components.Sources.List import List from Screens.MessageBox import MessageBox from Screens.ChoiceBox import ChoiceBox @@ -383,10 +384,11 @@ class NimSetup(Screen, ConfigListScreen): ConfigListScreen.__init__(self, self.list) - self["actions"] = ActionMap(["SetupActions"], + self["actions"] = ActionMap(["SetupActions", "SatlistShortcutAction"], { "ok": self.keySave, "cancel": self.keyCancel, + "nothingconnected": self.nothingConnectedShortcut }, -2) self.slotid = slotid @@ -423,6 +425,11 @@ class NimSetup(Screen, ConfigListScreen): # we need to call saveAll to reset the connectedTo choices self.saveAll() self.close() + + def nothingConnectedShortcut(self): + if type(self["config"].getCurrent()[1]) is ConfigSatlist: + self["config"].getCurrent()[1].setValue("3601") + self["config"].invalidateCurrent() class NimSelection(Screen): def __init__(self, session): -- cgit v1.2.3 From 148af18dacd5f36aa785277d11126d03118e9437 Mon Sep 17 00:00:00 2001 From: ghost Date: Wed, 30 Dec 2009 17:11:58 +0100 Subject: show a short symbol when a unhandled key is pressed this fixes bug #293 --- data/skin_default.xml | 4 ++++ data/skin_default/Makefile.am | 1 + data/skin_default/unhandled-key.png | Bin 0 -> 1335 bytes lib/python/Screens/InfoBar.py | 6 ++--- lib/python/Screens/InfoBarGenerics.py | 41 +++++++++++++++++++++++++++++++++- lib/python/Screens/Makefile.am | 2 +- lib/python/Screens/UnhandledKey.py | 7 ++++++ 7 files changed, 56 insertions(+), 5 deletions(-) create mode 100644 data/skin_default/unhandled-key.png create mode 100644 lib/python/Screens/UnhandledKey.py (limited to 'data') 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< Date: Thu, 31 Dec 2009 12:15:45 +0100 Subject: fixes bug #344 clean up default favourites --- data/defaults/Dream/userbouquet.favourites.tv | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'data') diff --git a/data/defaults/Dream/userbouquet.favourites.tv b/data/defaults/Dream/userbouquet.favourites.tv index f1adaf9e..cc5e9fe9 100644 --- a/data/defaults/Dream/userbouquet.favourites.tv +++ b/data/defaults/Dream/userbouquet.favourites.tv @@ -10,7 +10,7 @@ #SERVICE 1:0:1:33:21:85:C00000:0:0:0: #SERVICE 1:0:1:701:5:85:C00000:0:0:0: #SERVICE 1:0:1:2F1C:441:1:C00000:0:0:0: -#SERVICE 1:0:1:7005:436:1:C00000:0:0:0: +#SERVICE 1:0:1:6D6E:437:1:C00000:0:0:0: #SERVICE 1:0:1:2FC:5:85:C00000:0:0:0: #SERVICE 1:0:1:F98:454:1:C00000:0:0:0: #SERVICE 1:0:1:7034:41B:1:C00000:0:0:0: @@ -26,7 +26,6 @@ #SERVICE 1:64:B:0:0:0:0:0:0:0::Doku/Wissen/Themen #DESCRIPTION Doku/Wissen/Themen #SERVICE 1:0:1:6DD0:44D:1:C00000:0:0:0: -#SERVICE 1:0:1:6D6E:437:1:C00000:0:0:0: #SERVICE 1:0:1:6D6B:437:1:C00000:0:0:0: #SERVICE 1:0:1:2775:444:1:C00000:0:0:0: #SERVICE 1:0:1:293:5:85:C00000:0:0:0: @@ -77,8 +76,6 @@ #SERVICE 1:64:5:0:0:0:0:0:0:0::Reisen #DESCRIPTION Reisen #SERVICE 1:0:1:20:21:85:C00000:0:0:0: -#SERVICE 1:0:1:3339:45B:1:C00000:0:0:0: -#SERVICE 1:0:1:27B9:444:1:C00000:0:0:0: #SERVICE 1:64:9:0:0:0:0:0:0:0::Beratung #DESCRIPTION Beratung #SERVICE 1:0:1:295:21:85:C00000:0:0:0: @@ -92,7 +89,6 @@ #SERVICE 1:0:1:36:7:85:C00000:0:0:0: #SERVICE 1:0:1:307:7:85:C00000:0:0:0: #SERVICE 1:0:1:296:5:85:C00000:0:0:0: -#SERVICE 1:0:1:2791:444:1:C00000:0:0:0: #SERVICE 1:0:1:383:21:85:C00000:0:0:0: #SERVICE 1:0:1:313C:459:1:C00000:0:0:0: #SERVICE 1:0:1:3159:459:1:C00000:0:0:0: @@ -104,9 +100,9 @@ #SERVICE 1:0:19:2B66:3F3:1:C00000:0:0:0: #SERVICE 1:0:19:2B70:3F3:1:C00000:0:0:0: #SERVICE 1:0:19:6EEC:4B1:1:C00000:0:0:0: -#SERVICE 1:0:19:1324:3EF:1:C00000:0:0:0: -#SERVICE 1:0:19:1325:3EF:1:C00000:0:0:0: +#SERVICE 1:0:19:EF12:421:1:C00000:0:0:0: #SERVICE 1:0:19:2B84:3F3:1:C00000:0:0:0: +#SERVICE 1:0:19:EF13:421:1:C00000:0:0:0: #SERVICE 1:64:0:0:0:0:0:0:0:0::Alternativen #DESCRIPTION Alternativen #SERVICE 1:0:1:6DCB:44D:1:C00000:0:0:0: -- cgit v1.2.3 From b6f95a8f5457c60ccc14192a4d13d3c05fa608be Mon Sep 17 00:00:00 2001 From: thedoc Date: Fri, 1 Jan 2010 14:07:03 +0100 Subject: fixes bug #362 allow configuring short power button action to shutdown, standby, menu --- data/setup.xml | 1 + lib/python/Components/UsageConfig.py | 6 ++++++ mytest.py | 6 +++--- 3 files changed, 10 insertions(+), 3 deletions(-) (limited to 'data') diff --git a/data/setup.xml b/data/setup.xml index 9425afda..92bbc0f1 100644 --- a/data/setup.xml +++ b/data/setup.xml @@ -31,6 +31,7 @@ config.usage.quickzap_bouquet_change config.usage.e1like_radio_mode config.usage.on_long_powerpress + config.usage.on_short_powerpress config.usage.infobar_timeout config.usage.output_12V config.usage.show_infobar_on_zap diff --git a/lib/python/Components/UsageConfig.py b/lib/python/Components/UsageConfig.py index f133f9f6..21478e90 100644 --- a/lib/python/Components/UsageConfig.py +++ b/lib/python/Components/UsageConfig.py @@ -53,6 +53,12 @@ def InitUsageConfig(): ("show_menu", _("show shutdown menu")), ("shutdown", _("immediate shutdown")), ("standby", _("Standby")) ] ) + + config.usage.on_short_powerpress = ConfigSelection(default = "standby", choices = [ + ("show_menu", _("show shutdown menu")), + ("shutdown", _("immediate shutdown")), + ("standby", _("Standby")) ] ) + config.usage.alternatives_priority = ConfigSelection(default = "0", choices = [ ("0", "DVB-S/-C/-T"), diff --git a/mytest.py b/mytest.py index 7eb045ee..4b687e05 100755 --- a/mytest.py +++ b/mytest.py @@ -363,9 +363,10 @@ class PowerKey: def powerlong(self): if Screens.Standby.inTryQuitMainloop or (self.session.current_dialog and not self.session.current_dialog.ALLOW_SUSPEND): return + self.doAction(action = config.usage.on_long_powerpress.value) + def doAction(self, action): self.standbyblocked = 1 - action = config.usage.on_long_powerpress.value if action == "shutdown": self.shutdown() elif action == "show_menu": @@ -388,8 +389,7 @@ class PowerKey: def powerup(self): if self.standbyblocked == 0: - self.standbyblocked = 1 - self.standby() + self.doAction(action = config.usage.on_short_powerpress.value) def standby(self): if not Screens.Standby.inStandby and self.session.current_dialog and self.session.current_dialog.ALLOW_SUSPEND and self.session.in_exec: -- cgit v1.2.3 From cdeabe4754ac791dc36d320767816317b87ef692 Mon Sep 17 00:00:00 2001 From: Stefan Pluecken Date: Fri, 1 Jan 2010 15:57:06 +0100 Subject: fixes bug #314 remove default settings entry from setup menu since the default wizard is called on first run (doing a factory reset to install the default settings is more plausible) --- data/menu.xml | 6 ------ 1 file changed, 6 deletions(-) (limited to 'data') diff --git a/data/menu.xml b/data/menu.xml index 59195f15..1b71a152 100644 --- a/data/menu.xml +++ b/data/menu.xml @@ -75,12 +75,6 @@ - - -from Screens.DefaultWizard import DefaultWizard -self.session.open(DefaultWizard, silent = False) - - from Screens.FactoryReset import FactoryReset -- cgit v1.2.3 From 3e6957cfc66bd8760d412826cf14f82ee16b0dea Mon Sep 17 00:00:00 2001 From: ghost Date: Thu, 21 Jan 2010 11:31:53 +0100 Subject: show minus sign before remaining time in movieplayer --- data/skin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'data') diff --git a/data/skin.xml b/data/skin.xml index d5fe01e6..32adb2be 100755 --- a/data/skin.xml +++ b/data/skin.xml @@ -323,7 +323,7 @@ - Remaining + Remaining,Negate -- cgit v1.2.3 From 03a11846308b3a0404786ce5e63e2e6bb4b0c83b Mon Sep 17 00:00:00 2001 From: Stefan Pluecken Date: Sat, 20 Feb 2010 17:47:58 +0100 Subject: removed german tv station 'TIMM' from default userbouquet due to cancellation of satellite broadcast next monday --- data/defaults/Dream/userbouquet.favourites.tv | 1 - 1 file changed, 1 deletion(-) (limited to 'data') diff --git a/data/defaults/Dream/userbouquet.favourites.tv b/data/defaults/Dream/userbouquet.favourites.tv index cc5e9fe9..a5a2e8fa 100644 --- a/data/defaults/Dream/userbouquet.favourites.tv +++ b/data/defaults/Dream/userbouquet.favourites.tv @@ -29,7 +29,6 @@ #SERVICE 1:0:1:6D6B:437:1:C00000:0:0:0: #SERVICE 1:0:1:2775:444:1:C00000:0:0:0: #SERVICE 1:0:1:293:5:85:C00000:0:0:0: -#SERVICE 1:0:1:3138:459:1:C00000:0:0:0: #SERVICE 1:0:1:6D70:437:1:C00000:0:0:0: #SERVICE 1:0:1:277B:444:1:C00000:0:0:0: #SERVICE 1:0:1:332D:45B:1:C00000:0:0:0: -- cgit v1.2.3 From 62d7c7e0b4d31822c47dd2b4d6d505bda424a39f Mon Sep 17 00:00:00 2001 From: Stefan Pluecken Date: Sat, 20 Feb 2010 18:09:10 +0100 Subject: removes hd test ard/zdf from default userbouquet --- data/defaults/Dream/userbouquet.favourites.tv | 1 - 1 file changed, 1 deletion(-) (limited to 'data') diff --git a/data/defaults/Dream/userbouquet.favourites.tv b/data/defaults/Dream/userbouquet.favourites.tv index a5a2e8fa..5f89c48a 100644 --- a/data/defaults/Dream/userbouquet.favourites.tv +++ b/data/defaults/Dream/userbouquet.favourites.tv @@ -100,7 +100,6 @@ #SERVICE 1:0:19:2B70:3F3:1:C00000:0:0:0: #SERVICE 1:0:19:6EEC:4B1:1:C00000:0:0:0: #SERVICE 1:0:19:EF12:421:1:C00000:0:0:0: -#SERVICE 1:0:19:2B84:3F3:1:C00000:0:0:0: #SERVICE 1:0:19:EF13:421:1:C00000:0:0:0: #SERVICE 1:64:0:0:0:0:0:0:0:0::Alternativen #DESCRIPTION Alternativen -- cgit v1.2.3 From eca33f89346b4ad0e7bbaef7438e8a87daa963a9 Mon Sep 17 00:00:00 2001 From: ghost Date: Mon, 11 Jan 2010 19:18:34 +0100 Subject: Add some parental control improvements (made by Tode) --- data/skin_default/Makefile.am | 4 + data/skin_default/lock.png | Bin 0 -> 1053 bytes data/skin_default/lockBouquet.png | Bin 0 -> 1176 bytes data/skin_default/unlock.png | Bin 0 -> 965 bytes data/skin_default/unlockBouquet.png | Bin 0 -> 1141 bytes lib/python/Components/ParentalControl.py | 316 +++++++++++++++++++-------- lib/python/Components/ParentalControlList.py | 29 ++- lib/python/Screens/ParentalControlSetup.py | 79 +++++-- 8 files changed, 320 insertions(+), 108 deletions(-) create mode 100644 data/skin_default/lock.png create mode 100644 data/skin_default/lockBouquet.png create mode 100644 data/skin_default/unlock.png create mode 100644 data/skin_default/unlockBouquet.png mode change 100755 => 100644 lib/python/Components/ParentalControl.py mode change 100755 => 100644 lib/python/Screens/ParentalControlSetup.py (limited to 'data') diff --git a/data/skin_default/Makefile.am b/data/skin_default/Makefile.am index 9e9b7cd4..85bb800d 100755 --- a/data/skin_default/Makefile.am +++ b/data/skin_default/Makefile.am @@ -32,6 +32,8 @@ dist_install_DATA = \ expanded-plugins.png \ info-bg_mp.png \ info-bg.png \ + lock.png \ + lockBouquet.png \ mediaplayer_bg.png \ mute.png \ nim_active.png \ @@ -52,6 +54,8 @@ dist_install_DATA = \ timeline-now.png \ timeline.png \ unhandled-key.png \ + unlock.png \ + unlockBouquet.png \ verticalline-plugins.png \ vkey_backspace.png \ vkey_bg.png \ diff --git a/data/skin_default/lock.png b/data/skin_default/lock.png new file mode 100644 index 00000000..d0ae7f64 Binary files /dev/null and b/data/skin_default/lock.png differ diff --git a/data/skin_default/lockBouquet.png b/data/skin_default/lockBouquet.png new file mode 100644 index 00000000..d503dd2b Binary files /dev/null and b/data/skin_default/lockBouquet.png differ diff --git a/data/skin_default/unlock.png b/data/skin_default/unlock.png new file mode 100644 index 00000000..bd4486e9 Binary files /dev/null and b/data/skin_default/unlock.png differ diff --git a/data/skin_default/unlockBouquet.png b/data/skin_default/unlockBouquet.png new file mode 100644 index 00000000..c5d146d7 Binary files /dev/null and b/data/skin_default/unlockBouquet.png differ diff --git a/lib/python/Components/ParentalControl.py b/lib/python/Components/ParentalControl.py old mode 100755 new mode 100644 index d68e01ff..4830d20a --- a/lib/python/Components/ParentalControl.py +++ b/lib/python/Components/ParentalControl.py @@ -1,19 +1,34 @@ -from Components.config import config, ConfigSubsection, ConfigSelection, ConfigPIN, ConfigYesNo, ConfigSubList, ConfigInteger +from Components.config import config, ConfigSubsection, ConfigSelection, ConfigPIN, ConfigText, ConfigYesNo, ConfigSubList, ConfigInteger +#from Screens.ChannelSelection import service_types_tv from Screens.InputBox import PinInput from Screens.MessageBox import MessageBox from Tools.BoundFunction import boundFunction from ServiceReference import ServiceReference from Tools import Notifications from Tools.Directories import resolveFilename, SCOPE_CONFIG +from enigma import eTimer +import time + +TYPE_SERVICE = "SERVICE" +TYPE_BOUQUETSERVICE = "BOUQUETSERVICE" +TYPE_BOUQUET = "BOUQUET" +LIST_BLACKLIST = "blacklist" +LIST_WHITELIST = "whitelist" + +IMG_WHITESERVICE = LIST_WHITELIST + "-" + TYPE_SERVICE +IMG_WHITEBOUQUET = LIST_WHITELIST + "-" + TYPE_BOUQUET +IMG_BLACKSERVICE = LIST_BLACKLIST + "-" + TYPE_SERVICE +IMG_BLACKBOUQUET = LIST_BLACKLIST + "-" + TYPE_BOUQUET def InitParentalControl(): config.ParentalControl = ConfigSubsection() config.ParentalControl.configured = ConfigYesNo(default = False) config.ParentalControl.mode = ConfigSelection(default = "simple", choices = [("simple", _("simple")), ("complex", _("complex"))]) - config.ParentalControl.storeservicepin = ConfigSelection(default = "never", choices = [("never", _("never")), ("5_minutes", _("5 minutes")), ("30_minutes", _("30 minutes")), ("60_minutes", _("60 minutes")), ("restart", _("until restart"))]) + config.ParentalControl.storeservicepin = ConfigSelection(default = "never", choices = [("never", _("never")), ("5", _("5 minutes")), ("30", _("30 minutes")), ("60", _("60 minutes")), ("standby", _("until standby/restart"))]) + config.ParentalControl.storeservicepincancel = ConfigSelection(default = "never", choices = [("never", _("never")), ("5", _("5 minutes")), ("30", _("30 minutes")), ("60", _("60 minutes")), ("standby", _("until standby/restart"))]) config.ParentalControl.servicepinactive = ConfigYesNo(default = False) config.ParentalControl.setuppinactive = ConfigYesNo(default = False) - config.ParentalControl.type = ConfigSelection(default = "blacklist", choices = [("whitelist", _("whitelist")), ("blacklist", _("blacklist"))]) + config.ParentalControl.type = ConfigSelection(default = "blacklist", choices = [(LIST_WHITELIST, _("whitelist")), (LIST_BLACKLIST, _("blacklist"))]) config.ParentalControl.setuppin = ConfigPIN(default = -1) config.ParentalControl.retries = ConfigSubsection() @@ -39,40 +54,58 @@ def InitParentalControl(): class ParentalControl: def __init__(self): - self.open() + #Do not call open on init, because bouquets are not ready at that moment +# self.open() self.serviceLevel = {} - - def addWhitelistService(self, service): - self.whitelist.append(service) + #Instead: Use Flags to see, if we already initialized config and called open + self.configInitialized = False + self.filesOpened = False + #This is the timer that is used to see, if the time for caching the pin is over + #Of course we could also work without a timer and compare the times every + #time we call isServicePlayable. But this might probably slow down zapping, + #That's why I decided to use a timer + self.sessionPinTimer = eTimer() + self.sessionPinTimer.callback.append(self.resetSessionPin) - def addBlacklistService(self, service): - self.blacklist.append(service) - - def setServiceLevel(self, service, level): - self.serviceLevel[service] = level - - def deleteWhitelistService(self, service): - self.whitelist.remove(service) - if self.serviceLevel.has_key(service): - self.serviceLevel.remove(service) + def serviceMethodWrapper(self, service, method, *args): + #This method is used to call all functions that need a service as Parameter: + #It takes either a Service- Reference or a Bouquet- Reference and passes + #Either the service or all services contained in the bouquet to the method given + #That way all other functions do not need to distinguish between service and bouquet. + if "FROM BOUQUET" in service: + method( service , TYPE_BOUQUET , *args ) + servicelist = self.readServicesFromBouquet(service,"C") + for ref in servicelist: + sRef = str(ref[0]) + method( sRef , TYPE_BOUQUETSERVICE , *args ) + else: + ref = ServiceReference(service) + sRef = str(ref) + method( sRef , TYPE_SERVICE , *args ) - def deleteBlacklistService(self, service): - self.blacklist.remove(service) - if self.serviceLevel.has_key(service): - self.serviceLevel.remove(service) + def setServiceLevel(self, service, type, level): + self.serviceLevel[service] = level def isServicePlayable(self, ref, callback): if not config.ParentalControl.configured.value or not config.ParentalControl.servicepinactive.value: return True - #print "whitelist:", self.whitelist - #print "blacklist:", self.blacklist - #print "config.ParentalControl.type.value:", config.ParentalControl.type.value - #print "not in whitelist:", (service not in self.whitelist) - #print "checking parental control for service:", ref.toString() + #Check if we already read the whitelists and blacklists. If not: call open + if self.filesOpened == False: + self.open() + #Check if configuration has already been read or if the significant values have changed. + #If true: read the configuration + if self.configInitialized == False or self.storeServicePin != config.ParentalControl.storeservicepin.value or self.storeServicePinCancel != config.ParentalControl.storeservicepincancel.value: + self.getConfigValues() service = ref.toCompareString() - if (config.ParentalControl.type.value == "whitelist" and service not in self.whitelist) or (config.ParentalControl.type.value == "blacklist" and service in self.blacklist): + if (config.ParentalControl.type.value == LIST_WHITELIST and not self.whitelist.has_key(service)) or (config.ParentalControl.type.value == LIST_BLACKLIST and self.blacklist.has_key(service)): + #Check if the session pin is cached and return the cached value, if it is. + if self.sessionPinCached == True: + #As we can cache successful pin- entries as well as canceled pin- entries, + #We give back the last action + return self.sessionPinCachedValue self.callback = callback - #print "service:", ServiceReference(service).getServiceName() + #Someone started to implement different levels of protection. Seems they were never completed + #I did not throw out this code, although it is of no use at the moment levelNeeded = 0 if self.serviceLevel.has_key(service): levelNeeded = self.serviceLevel[service] @@ -83,103 +116,214 @@ class ParentalControl: return True def protectService(self, service): - #print "protect" - #print "config.ParentalControl.type.value:", config.ParentalControl.type.value - if config.ParentalControl.type.value == "whitelist": - if service in self.whitelist: - self.deleteWhitelistService(service) + if config.ParentalControl.type.value == LIST_WHITELIST: + if self.whitelist.has_key(service): + self.serviceMethodWrapper(service, self.removeServiceFromList, self.whitelist) + #self.deleteWhitelistService(service) else: # blacklist - if service not in self.blacklist: - self.addBlacklistService(service) + if not self.blacklist.has_key(service): + self.serviceMethodWrapper(service, self.addServiceToList, self.blacklist) + #self.addBlacklistService(service) #print "whitelist:", self.whitelist #print "blacklist:", self.blacklist - def unProtectService(self, service): #print "unprotect" #print "config.ParentalControl.type.value:", config.ParentalControl.type.value - if config.ParentalControl.type.value == "whitelist": - if service not in self.whitelist: - self.addWhitelistService(service) + if config.ParentalControl.type.value == LIST_WHITELIST: + if not self.whitelist.has_key(service): + self.serviceMethodWrapper(service, self.addServiceToList, self.whitelist) + #self.addWhitelistService(service) else: # blacklist - if service in self.blacklist: - self.deleteBlacklistService(service) + if self.blacklist.has_key(service): + self.serviceMethodWrapper(service, self.removeServiceFromList, self.blacklist) + #self.deleteBlacklistService(service) #print "whitelist:", self.whitelist #print "blacklist:", self.blacklist def getProtectionLevel(self, service): - if (config.ParentalControl.type.value == "whitelist" and service not in self.whitelist) or (config.ParentalControl.type.value == "blacklist" and service in self.blacklist): + if (config.ParentalControl.type.value == LIST_WHITELIST and not self.whitelist.has_key(service)) or (config.ParentalControl.type.value == LIST_BLACKLIST and self.blacklist.has_key(service)): if self.serviceLevel.has_key(service): return self.serviceLevel[service] else: return 0 else: return -1 + + def getProtectionType(self, service): + #New method used in ParentalControlList: This method does not only return + #if a service is protected or not, it also returns, why (whitelist or blacklist, service or bouquet) + if self.filesOpened == False: + self.open() + sImage = "" + if (config.ParentalControl.type.value == LIST_WHITELIST): + if self.whitelist.has_key(service): + if TYPE_SERVICE in self.whitelist[service]: + sImage = IMG_WHITESERVICE + else: + sImage = IMG_WHITEBOUQUET + elif (config.ParentalControl.type.value == LIST_BLACKLIST): + if self.blacklist.has_key(service): + if TYPE_SERVICE in self.blacklist[service]: + sImage = IMG_BLACKSERVICE + else: + sImage = IMG_BLACKBOUQUET + bLocked = self.getProtectionLevel(service) != -1 + return (bLocked,sImage) + + def getConfigValues(self): + #Read all values from configuration + self.checkPinInterval = False + self.checkPinIntervalCancel = False + self.checkSessionPin = False + self.checkSessionPinCancel = False + + self.sessionPinCached = False + self.pinIntervalSeconds = 0 + self.pinIntervalSecondsCancel = 0 + + self.storeServicePin = config.ParentalControl.storeservicepin.value + self.storeServicePinCancel = config.ParentalControl.storeservicepincancel.value + + if self.storeServicePin == "never": + pass + elif self.storeServicePin == "standby": + self.checkSessionPin = True + else: + self.checkPinInterval = True + iMinutes = float(self.storeServicePin) + iSeconds = iMinutes*60 + self.pinIntervalSeconds = iSeconds + + if self.storeServicePinCancel == "never": + pass + elif self.storeServicePinCancel == "standby": + self.checkSessionPinCancel = True + else: + self.checkPinIntervalCancel = True + iMinutes = float(self.storeServicePinCancel) + iSeconds = iMinutes*60 + self.pinIntervalSecondsCancel = iSeconds + self.configInitialized = True + # Reset PIN cache on standby: Use StandbyCounter- Config- Callback + config.misc.standbyCounter.addNotifier(self.standbyCounterCallback, initial_call = False) + + def standbyCounterCallback(self, configElement): + self.resetSessionPin() + + def resetSessionPin(self): + #Reset the session pin, stop the timer + self.sessionPinCached = False + self.sessionPinTimer.stop() + + def getCurrentTimeStamp(self): + return time.time() + def getPinList(self): return [ x.value for x in config.ParentalControl.servicepin ] - + def servicePinEntered(self, service, result): -# levelNeeded = 0 - #if self.serviceLevel.has_key(service): - #levelNeeded = self.serviceLevel[service] -# - #print "getPinList():", self.getPinList() - #pinList = self.getPinList()[:levelNeeded + 1] - #print "pinList:", pinList -# -# print "pin entered for service", service, "and pin was", pin - #if pin is not None and int(pin) in pinList: + if result is not None and result: - #print "pin ok, playing service" + #This is the new function of caching the service pin + #save last session and time of last entered pin... + if self.checkSessionPin == True: + self.sessionPinCached = True + self.sessionPinCachedValue = True + if self.checkPinInterval == True: + self.sessionPinCached = True + self.sessionPinCachedValue = True + self.sessionPinTimer.start(self.pinIntervalSeconds*1000,1) self.callback(ref = service) else: + #This is the new function of caching cancelling of service pin if result is not None: Notifications.AddNotification(MessageBox, _("The pin code you entered is wrong."), MessageBox.TYPE_ERROR) - #print "wrong pin entered" + else: + if self.checkSessionPinCancel == True: + self.sessionPinCached = True + self.sessionPinCachedValue = False + if self.checkPinIntervalCancel == True: + self.sessionPinCached = True + self.sessionPinCachedValue = False + self.sessionPinTimer.start(self.pinIntervalSecondsCancel*1000,1) - def saveWhitelist(self): - file = open(resolveFilename(SCOPE_CONFIG, "whitelist"), 'w') - for x in self.whitelist: - file.write(x + "\n") - file.close - - def openWhitelist(self): - self.whitelist = [] - try: - file = open(resolveFilename(SCOPE_CONFIG, "whitelist"), 'r') - lines = file.readlines() - for x in lines: - ref = ServiceReference(x.strip()) - self.whitelist.append(str(ref)) - file.close - except: - pass - - def saveBlacklist(self): - file = open(resolveFilename(SCOPE_CONFIG, "blacklist"), 'w') - for x in self.blacklist: - file.write(x + "\n") + def saveListToFile(self,sWhichList): + #Replaces saveWhiteList and saveBlackList: + #I don't like to have two functions with identical code... + if sWhichList == LIST_BLACKLIST: + vList = self.blacklist + else: + vList = self.whitelist + file = open(resolveFilename(SCOPE_CONFIG, sWhichList), 'w') + for sService,sType in vList.iteritems(): + #Only Services that are selected directly and Bouqets are saved. + #Services that are added by a bouquet are not saved. + #This is the reason for the change in self.whitelist and self.blacklist + if TYPE_SERVICE in sType or TYPE_BOUQUET in sType: + file.write(str(sService) + "\n") file.close - def openBlacklist(self): - self.blacklist = [] + def openListFromFile(self,sWhichList): + #Replaces openWhiteList and openBlackList: + #I don't like to have two functions with identical code... + if sWhichList == LIST_BLACKLIST: + self.blacklist = {} + vList = self.blacklist + else: + self.whitelist = {} + vList = self.whitelist try: - file = open(resolveFilename(SCOPE_CONFIG, "blacklist"), 'r') + file = open(resolveFilename(SCOPE_CONFIG, sWhichList ), 'r') lines = file.readlines() for x in lines: - ref = ServiceReference(x.strip()) - self.blacklist.append(str(ref)) + sPlain = x.strip() + self.serviceMethodWrapper(sPlain, self.addServiceToList, vList) file.close except: pass + + def addServiceToList(self, service, type, vList): + #Replaces addWhitelistService and addBlacklistService + #The lists are not only lists of service references any more. + #They are named lists with the service as key and an array of types as value: + + if vList.has_key(service): + if not type in vList[service]: + vList[service].append(type) + else: + vList[service] = [type] + + def removeServiceFromList(self, service, type, vList): + #Replaces deleteWhitelistService and deleteBlacklistService + if vList.has_key(service): + if type in vList[service]: + vList[service].remove(type) + if not vList[service]: + del vList[service] + if self.serviceLevel.has_key(service): + self.serviceLevel.remove(service) + + def readServicesFromBouquet(self,sBouquetSelection,formatstring): + #This method gives back a list of services for a given bouquet + from enigma import eServiceCenter, eServiceReference + from Screens.ChannelSelection import service_types_tv + serviceHandler = eServiceCenter.getInstance() + refstr = sBouquetSelection + root = eServiceReference(refstr) + list = serviceHandler.list(root) + if list is not None: + services = list.getContent("CN", True) #(servicecomparestring, name) + return services def save(self): - self.saveBlacklist() - self.saveWhitelist() + self.saveListToFile(LIST_BLACKLIST) + self.saveListToFile(LIST_WHITELIST) def open(self): - self.openBlacklist() - self.openWhitelist() + self.openListFromFile(LIST_BLACKLIST) + self.openListFromFile(LIST_WHITELIST) + self.filesOpened = True parentalControl = ParentalControl() diff --git a/lib/python/Components/ParentalControlList.py b/lib/python/Components/ParentalControlList.py index 128e6d3e..797ea391 100644 --- a/lib/python/Components/ParentalControlList.py +++ b/lib/python/Components/ParentalControlList.py @@ -1,19 +1,28 @@ from MenuList import MenuList -from Components.ParentalControl import parentalControl +from Components.ParentalControl import parentalControl, IMG_WHITESERVICE, IMG_WHITEBOUQUET, IMG_BLACKSERVICE, IMG_BLACKBOUQUET from Tools.Directories import SCOPE_SKIN_IMAGE, resolveFilename from enigma import eListboxPythonMultiContent, gFont, RT_HALIGN_LEFT from Tools.LoadPixmap import LoadPixmap -lockPicture = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/lock.png")) +#Now there is a list of pictures instead of one... +entryPicture = {} -def ParentalControlEntryComponent(service, name, locked = True): +entryPicture[IMG_BLACKSERVICE] = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/lock.png")) +entryPicture[IMG_BLACKBOUQUET] = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/lockBouquet.png")) +entryPicture[IMG_WHITESERVICE] = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/unlock.png")) +entryPicture[IMG_WHITEBOUQUET] = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/unlockBouquet.png")) + +def ParentalControlEntryComponent(service, name, protectionType): + locked = protectionType[0] + sImage = protectionType[1] res = [ (service, name, locked), (eListboxPythonMultiContent.TYPE_TEXT, 80, 5, 300, 50, 0, RT_HALIGN_LEFT, name) ] - if locked: - res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, 0, 0, 32, 32, lockPicture)) + #Changed logic: The image is defined by sImage, not by locked anymore + if sImage != "": + res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, 0, 0, 32, 32, entryPicture[sImage])) return res class ParentalControlList(MenuList): @@ -25,9 +34,11 @@ class ParentalControlList(MenuList): def toggleSelectedLock(self): print "self.l.getCurrentSelection():", self.l.getCurrentSelection() print "self.l.getCurrentSelectionIndex():", self.l.getCurrentSelectionIndex() - self.list[self.l.getCurrentSelectionIndex()] = ParentalControlEntryComponent(self.l.getCurrentSelection()[0][0], self.l.getCurrentSelection()[0][1], not self.l.getCurrentSelection()[0][2]); - if self.l.getCurrentSelection()[0][2]: - parentalControl.protectService(self.l.getCurrentSelection()[0][0]) + curSel = self.l.getCurrentSelection() + if curSel[0][2]: + parentalControl.unProtectService(self.l.getCurrentSelection()[0][0]) else: - parentalControl.unProtectService(self.l.getCurrentSelection()[0][0]) + parentalControl.protectService(self.l.getCurrentSelection()[0][0]) + #Instead of just negating the locked- flag, now I call the getProtectionType every time... + self.list[self.l.getCurrentSelectionIndex()] = ParentalControlEntryComponent(curSel[0][0], curSel[0][1], parentalControl.getProtectionType(curSel[0][0])) self.l.setList(self.list) diff --git a/lib/python/Screens/ParentalControlSetup.py b/lib/python/Screens/ParentalControlSetup.py old mode 100755 new mode 100644 index a123d2d3..2bf4841e --- a/lib/python/Screens/ParentalControlSetup.py +++ b/lib/python/Screens/ParentalControlSetup.py @@ -16,7 +16,7 @@ from operator import itemgetter class ProtectedScreen: def __init__(self): if self.isProtected(): - self.onFirstExecBegin.append(boundFunction(self.session.openWithCallback, self.pinEntered, PinInput, pinList = [self.protectedWithPin()], triesEntry = self.getTriesEntry(), title = self.getPinText(), windowTitle = _("Change pin code"))) + self.onFirstExecBegin.append(boundFunction(self.session.openWithCallback, self.pinEntered, PinInput, pinList = [self.protectedWithPin()], triesEntry = self.getTriesEntry(), title = self.getPinText(), windowTitle = _("Enter pin code"))) def getTriesEntry(self): return config.ParentalControl.retries.setuppin @@ -48,11 +48,11 @@ class ParentalControlSetup(Screen, ConfigListScreen, ProtectedScreen): self.list = [] ConfigListScreen.__init__(self, self.list, session = self.session, on_change = self.changedEntry) self.createSetup() - + self["actions"] = NumberActionMap(["SetupActions"], { - "cancel": self.keyCancel, - "save": self.keyCancel + "cancel": self.keyCancel, + "save": self.keyCancel }, -2) self["key_red"] = StaticText(_("Cancel")) self["key_green"] = StaticText(_("OK")) @@ -63,12 +63,12 @@ class ParentalControlSetup(Screen, ConfigListScreen, ProtectedScreen): def isProtected(self): return config.ParentalControl.setuppinactive.value and config.ParentalControl.configured.value - + def createSetup(self): self.editListEntry = None self.changePin = None self.changeSetupPin = None - + self.list = [] self.list.append(getConfigListEntry(_("Enable parental control"), config.ParentalControl.configured)) print "config.ParentalControl.configured.value", config.ParentalControl.configured.value @@ -87,10 +87,19 @@ class ParentalControlSetup(Screen, ConfigListScreen, ProtectedScreen): elif config.ParentalControl.mode.value == "simple": self.changePin = getConfigListEntry(_("Change service pin"), NoSave(ConfigNothing())) self.list.append(self.changePin) - #self.list.append(getConfigListEntry(_("Remember service pin"), config.ParentalControl.storeservicepin)) + #Added Option to remember the service pin + self.list.append(getConfigListEntry(_("Remember service pin"), config.ParentalControl.storeservicepin)) + #Added Option to remember the cancellation of service pin entry + self.list.append(getConfigListEntry(_("Remember service pin cancel"), config.ParentalControl.storeservicepincancel)) self.editListEntry = getConfigListEntry(_("Edit services list"), NoSave(ConfigNothing())) self.list.append(self.editListEntry) - + #New funtion: Possibility to add Bouquets to whitelist / blacklist + self.editBouquetListEntry = getConfigListEntry(_("Edit bouquets list"), NoSave(ConfigNothing())) + self.list.append(self.editBouquetListEntry) + #New option to reload service lists (for example if bouquets have changed) + self.reloadLists = getConfigListEntry(_("Reload Black-/Whitelists"), NoSave(ConfigNothing())) + self.list.append(self.reloadLists) + self["config"].list = self.list self["config"].setList(self.list) @@ -98,6 +107,8 @@ class ParentalControlSetup(Screen, ConfigListScreen, ProtectedScreen): print "self[\"config\"].l.getCurrentSelection()", self["config"].l.getCurrentSelection() if self["config"].l.getCurrentSelection() == self.editListEntry: self.session.open(ParentalControlEditor) + elif self["config"].l.getCurrentSelection() == self.editBouquetListEntry: + self.session.open(ParentalControlBouquetEditor) elif self["config"].l.getCurrentSelection() == self.changePin: if config.ParentalControl.mode.value == "complex": pass @@ -105,6 +116,8 @@ class ParentalControlSetup(Screen, ConfigListScreen, ProtectedScreen): self.session.open(ParentalControlChangePin, config.ParentalControl.servicepin[0], _("service pin")) elif self["config"].l.getCurrentSelection() == self.changeSetupPin: self.session.open(ParentalControlChangePin, config.ParentalControl.setuppin, _("setup pin")) + elif self["config"].l.getCurrentSelection() == self.reloadLists: + parentalControl.open() else: ConfigListScreen.keyRight(self) print "current selection:", self["config"].l.getCurrentSelection() @@ -149,6 +162,7 @@ class ParentalControlSetup(Screen, ConfigListScreen, ProtectedScreen): def keyNumberGlobal(self, number): pass + # for summary: def changedEntry(self): for x in self.onChangedEntry: @@ -224,13 +238,13 @@ class ParentalControlEditor(Screen): if not self.servicesList.has_key(key): self.servicesList[key] = [] self.servicesList[key].append(s) - + def chooseLetter(self): print "choose letter" mylist = [] for x in self.servicesList.keys(): if x == chr(SPECIAL_CHAR): - x = ("special characters", x) + x = (_("special characters"), x) else: x = (x, x) mylist.append(x) @@ -242,12 +256,51 @@ class ParentalControlEditor(Screen): if result is not None: print "result:", result self.currentLetter = result[1] - self.list = [ParentalControlEntryComponent(x[0], x[1], parentalControl.getProtectionLevel(x[0]) != -1) for x in self.servicesList[result[1]]] + #Replace getProtectionLevel by new getProtectionType + self.list = [ParentalControlEntryComponent(x[0], x[1], parentalControl.getProtectionType(x[0])) for x in self.servicesList[result[1]]] self.servicelist.setList(self.list) else: parentalControl.save() self.close() +class ParentalControlBouquetEditor(Screen): + #This new class allows adding complete bouquets to black- and whitelists + #The servicereference that is stored for bouquets is their refstr as listed in bouquets.tv + def __init__(self, session): + Screen.__init__(self, session) + self.skinName = "ParentalControlEditor" + self.list = [] + self.bouquetslist = ParentalControlList(self.list) + self["servicelist"] = self.bouquetslist; + self.readBouquetList() + self.onLayoutFinish.append(self.selectBouquet) + + self["actions"] = NumberActionMap(["DirectionActions", "ColorActions", "OkCancelActions"], + { + "ok": self.select, + "cancel": self.cancel + }, -1) + + def cancel(self): + parentalControl.save() + self.close() + + def select(self): + self.bouquetslist.toggleSelectedLock() + + def readBouquetList(self): + serviceHandler = eServiceCenter.getInstance() + refstr = '1:134:1:0:0:0:0:0:0:0:FROM BOUQUET \"bouquets.tv\" ORDER BY bouquet' + bouquetroot = eServiceReference(refstr) + self.bouquetlist = {} + list = serviceHandler.list(bouquetroot) + if list is not None: + self.bouquetlist = list.getContent("CN", True) + + def selectBouquet(self): + self.list = [ParentalControlEntryComponent(x[0], x[1], parentalControl.getProtectionType(x[0])) for x in self.bouquetlist] + self.bouquetslist.setList(self.list) + class ParentalControlChangePin(Screen, ConfigListScreen, ProtectedScreen): def __init__(self, session, pin, pinname): Screen.__init__(self, session) @@ -264,12 +317,12 @@ class ParentalControlChangePin(Screen, ConfigListScreen, ProtectedScreen): self.pin2.addEndNotifier(boundFunction(self.valueChanged, 2)) self.list.append(getConfigListEntry(_("New pin"), NoSave(self.pin1))) self.list.append(getConfigListEntry(_("Reenter new pin"), NoSave(self.pin2))) - ConfigListScreen.__init__(self, self.list, session = self.session, on_change = self.changedEntry) + ConfigListScreen.__init__(self, self.list) # print "old pin:", pin #if pin.value != "aaaa": #self.onFirstExecBegin.append(boundFunction(self.session.openWithCallback, self.pinEntered, PinInput, pinList = [self.pin.value], title = _("please enter the old pin"), windowTitle = _("Change pin code"))) ProtectedScreen.__init__(self) - + self["actions"] = NumberActionMap(["DirectionActions", "ColorActions", "OkCancelActions"], { "cancel": self.cancel, -- cgit v1.2.3 From 72bc8cf59d2f2192bcf1491758169a77b106190a Mon Sep 17 00:00:00 2001 From: Stefan Pluecken Date: Tue, 16 Feb 2010 14:53:12 +0100 Subject: fixes bug #445 show diseqc settings in NimSelection --- data/skin_default.xml | 6 +++--- lib/python/Screens/Satconfig.py | 18 +++++++++++++----- 2 files changed, 16 insertions(+), 8 deletions(-) (limited to 'data') diff --git a/data/skin_default.xml b/data/skin_default.xml index 56d53dc3..0114349b 100755 --- a/data/skin_default.xml +++ b/data/skin_default.xml @@ -626,14 +626,14 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y())) - + {"template": [ MultiContentEntryText(pos = (10, 5), size = (360, 30), flags = RT_HALIGN_LEFT, text = 1), # index 1 is the nim name, - MultiContentEntryText(pos = (50, 30), size = (320, 30), font = 1, flags = RT_HALIGN_LEFT, text = 2), # index 2 is a description of the nim settings, + MultiContentEntryText(pos = (50, 30), size = (320, 50), font = 1, flags = RT_HALIGN_LEFT, text = 2), # index 2 is a description of the nim settings, ], "fonts": [gFont("Regular", 20), gFont("Regular", 15)], - "itemHeight": 70 + "itemHeight": 80 } diff --git a/lib/python/Screens/Satconfig.py b/lib/python/Screens/Satconfig.py index 047bde23..647307d0 100644 --- a/lib/python/Screens/Satconfig.py +++ b/lib/python/Screens/Satconfig.py @@ -498,17 +498,25 @@ class NimSelection(Screen): text = _("nothing connected") elif nimConfig.configMode.value == "simple": if nimConfig.diseqcMode.value in ("single", "toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"): - text = _("Sats") + ": " + text = {"single": _("Single"), "toneburst_a_b": _("Toneburst A/B"), "diseqc_a_b": _("DiSEqC A/B"), "diseqc_a_b_c_d": _("DiSEqC A/B/C/D")}[nimConfig.diseqcMode.value] + "\n" + text += _("Sats") + ": " + satnames = [] if nimConfig.diseqcA.orbital_position != 3601: - text += nimmanager.getSatName(int(nimConfig.diseqcA.value)) + satnames.append(nimmanager.getSatName(int(nimConfig.diseqcA.value))) if nimConfig.diseqcMode.value in ("toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"): if nimConfig.diseqcB.orbital_position != 3601: - text += "," + nimmanager.getSatName(int(nimConfig.diseqcB.value)) + satnames.append(nimmanager.getSatName(int(nimConfig.diseqcB.value))) if nimConfig.diseqcMode.value == "diseqc_a_b_c_d": if nimConfig.diseqcC.orbital_position != 3601: - text += "," + nimmanager.getSatName(int(nimConfig.diseqcC.value)) + satnames.append(nimmanager.getSatName(int(nimConfig.diseqcC.value))) if nimConfig.diseqcD.orbital_position != 3601: - text += "," + nimmanager.getSatName(int(nimConfig.diseqcD.value)) + satnames.append(nimmanager.getSatName(int(nimConfig.diseqcD.value))) + if len(satnames) <= 2: + text += ", ".join(satnames) + elif len(satnames) > 2: + # we need a newline here, since multi content lists don't support automtic line wrapping + text += ", ".join(satnames[:2]) + ",\n" + text += " " + ", ".join(satnames[2:]) elif nimConfig.diseqcMode.value == "positioner": text = _("Positioner") + ":" if nimConfig.positionerMode.value == "usals": -- cgit v1.2.3 From c3da26752068a3059d2dc2356c8b7c1ab2b850ed Mon Sep 17 00:00:00 2001 From: Stefan Pluecken Date: Sat, 13 Mar 2010 14:44:06 +0100 Subject: fixes bug #444 replace "Das Erste" => "Das Erste HD" "ZDF" => "ZDF HD" "Arte" => "Arte HD" on HD boxes in default favourite bouquet --- configure.ac | 2 + data/defaults/Dream/Makefile.am | 5 +- data/defaults/Dream/dm500hd.info | 2 +- data/defaults/Dream/dm7025.info | 2 +- data/defaults/Dream/dm800.info | 2 +- data/defaults/Dream/dm8000.info | 2 +- data/defaults/Dream/hdbouquets/Makefile.am | 4 + .../Dream/hdbouquets/userbouquet.favourites.tv | 129 +++++++++++++++++++++ data/defaults/Dream/sdbouquets/Makefile.am | 4 + .../Dream/sdbouquets/userbouquet.favourites.tv | 127 ++++++++++++++++++++ data/defaults/Dream/userbouquet.favourites.tv | 127 -------------------- 11 files changed, 273 insertions(+), 133 deletions(-) create mode 100644 data/defaults/Dream/hdbouquets/Makefile.am create mode 100644 data/defaults/Dream/hdbouquets/userbouquet.favourites.tv create mode 100644 data/defaults/Dream/sdbouquets/Makefile.am create mode 100644 data/defaults/Dream/sdbouquets/userbouquet.favourites.tv delete mode 100644 data/defaults/Dream/userbouquet.favourites.tv (limited to 'data') diff --git a/configure.ac b/configure.ac index aa2fa3e3..d1b1d279 100755 --- a/configure.ac +++ b/configure.ac @@ -90,6 +90,8 @@ data/fonts/Makefile data/countries/Makefile data/defaults/Makefile data/defaults/Dream/Makefile +data/defaults/Dream/hdbouquets/Makefile +data/defaults/Dream/sdbouquets/Makefile data/extensions/Makefile data/skin_default/Makefile data/skin_default/menu/Makefile diff --git a/data/defaults/Dream/Makefile.am b/data/defaults/Dream/Makefile.am index 113442c0..31ba1c69 100644 --- a/data/defaults/Dream/Makefile.am +++ b/data/defaults/Dream/Makefile.am @@ -1,3 +1,5 @@ +SUBDIRS = hdbouquets sdbouquets + installdir = $(pkgdatadir)/defaults/Dream dist_install_DATA = \ @@ -9,5 +11,4 @@ dist_install_DATA = \ settings.500hd \ settings.7025 \ settings.800 \ - settings.8000 \ - userbouquet.favourites.tv + settings.8000 diff --git a/data/defaults/Dream/dm500hd.info b/data/defaults/Dream/dm500hd.info index fbf7888e..b1b4d53d 100644 --- a/data/defaults/Dream/dm500hd.info +++ b/data/defaults/Dream/dm500hd.info @@ -20,7 +20,7 @@ - + diff --git a/data/defaults/Dream/dm7025.info b/data/defaults/Dream/dm7025.info index 0461b686..a1585cfe 100644 --- a/data/defaults/Dream/dm7025.info +++ b/data/defaults/Dream/dm7025.info @@ -20,7 +20,7 @@ - + diff --git a/data/defaults/Dream/dm800.info b/data/defaults/Dream/dm800.info index 8c68349f..4793bd85 100644 --- a/data/defaults/Dream/dm800.info +++ b/data/defaults/Dream/dm800.info @@ -20,7 +20,7 @@ - + diff --git a/data/defaults/Dream/dm8000.info b/data/defaults/Dream/dm8000.info index 8b11946f..2ef2013a 100644 --- a/data/defaults/Dream/dm8000.info +++ b/data/defaults/Dream/dm8000.info @@ -20,7 +20,7 @@ - + diff --git a/data/defaults/Dream/hdbouquets/Makefile.am b/data/defaults/Dream/hdbouquets/Makefile.am new file mode 100644 index 00000000..843a07d6 --- /dev/null +++ b/data/defaults/Dream/hdbouquets/Makefile.am @@ -0,0 +1,4 @@ +installdir = $(pkgdatadir)/defaults/Dream/hdbouquets + +dist_install_DATA = \ + userbouquet.favourites.tv diff --git a/data/defaults/Dream/hdbouquets/userbouquet.favourites.tv b/data/defaults/Dream/hdbouquets/userbouquet.favourites.tv new file mode 100644 index 00000000..91536b10 --- /dev/null +++ b/data/defaults/Dream/hdbouquets/userbouquet.favourites.tv @@ -0,0 +1,129 @@ +#NAME Favourites (TV) +#SERVICE 1:0:19:2B5C:3F3:1:C00000:0:0:0: +#SERVICE 1:0:19:2B66:3F3:1:C00000:0:0:0: +#SERVICE 1:0:1:6DCC:44D:1:C00000:0:0:0: +#SERVICE 1:0:1:2EE3:441:1:C00000:0:0:0: +#SERVICE 1:0:1:445C:453:1:C00000:0:0:0: +#SERVICE 1:0:1:2EF4:441:1:C00000:0:0:0: +#SERVICE 1:0:1:445D:453:1:C00000:0:0:0: +#SERVICE 1:0:1:445E:453:1:C00000:0:0:0: +#SERVICE 1:0:1:33:21:85:C00000:0:0:0: +#SERVICE 1:0:1:701:5:85:C00000:0:0:0: +#SERVICE 1:0:1:2F1C:441:1:C00000:0:0:0: +#SERVICE 1:0:1:6D6E:437:1:C00000:0:0:0: +#SERVICE 1:0:1:2FC:5:85:C00000:0:0:0: +#SERVICE 1:0:1:F98:454:1:C00000:0:0:0: +#SERVICE 1:0:19:2B70:3F3:1:C00000:0:0:0: +#SERVICE 1:0:1:6D67:437:1:C00000:0:0:0: +#SERVICE 1:0:1:7031:41B:1:C00000:0:0:0: +#SERVICE 1:0:1:7032:41B:1:C00000:0:0:0: +#SERVICE 1:0:1:7033:41B:1:C00000:0:0:0: +#SERVICE 1:0:1:6E46:431:1:C00000:0:0:0: +#SERVICE 1:0:1:6DCE:44D:1:C00000:0:0:0: +#SERVICE 1:0:1:6DD1:44D:1:C00000:0:0:0: +#SERVICE 1:0:1:6DCF:44D:1:C00000:0:0:0: +#SERVICE 1:0:1:6E42:431:1:C00000:0:0:0: +#SERVICE 1:64:B:0:0:0:0:0:0:0::Doku/Wissen/Themen +#DESCRIPTION Doku/Wissen/Themen +#SERVICE 1:0:1:6DD0:44D:1:C00000:0:0:0: +#SERVICE 1:0:1:6D6B:437:1:C00000:0:0:0: +#SERVICE 1:0:1:2775:444:1:C00000:0:0:0: +#SERVICE 1:0:1:293:5:85:C00000:0:0:0: +#SERVICE 1:0:1:6D70:437:1:C00000:0:0:0: +#SERVICE 1:0:1:277B:444:1:C00000:0:0:0: +#SERVICE 1:0:1:332D:45B:1:C00000:0:0:0: +#SERVICE 1:0:1:3139:459:1:C00000:0:0:0: +#SERVICE 1:0:1:2F5A:454:1:C00000:0:0:0: +#SERVICE 1:64:A:0:0:0:0:0:0:0::Sport +#DESCRIPTION Sport +#SERVICE 1:0:1:384:21:85:C00000:0:0:0: +#SERVICE 1:0:1:79E0:443:1:C00000:0:0:0: +#SERVICE 1:64:1:0:0:0:0:0:0:0::Kinder +#DESCRIPTION Kinder +#SERVICE 1:0:1:2F08:441:1:C00000:0:0:0: +#SERVICE 1:0:1:6D68:437:1:C00000:0:0:0: +#SERVICE 1:0:1:7008:436:1:C00000:0:0:0: +#SERVICE 1:0:1:6FE0:443:1:C00000:0:0:0: +#SERVICE 1:64:2:0:0:0:0:0:0:0::Nachrichten +#DESCRIPTION Nachrichten +#SERVICE 1:0:1:2F3A:441:1:C00000:0:0:0: +#SERVICE 1:0:1:445F:453:1:C00000:0:0:0: +#SERVICE 1:0:1:79F4:443:1:C00000:0:0:0: +#SERVICE 1:0:1:2753:402:1:C00000:0:0:0: +#SERVICE 1:0:1:7035:41B:1:C00000:0:0:0: +#SERVICE 1:64:3:0:0:0:0:0:0:0::Regional +#DESCRIPTION Regional +#SERVICE 1:0:1:3146:459:1:C00000:0:0:0: +#SERVICE 1:0:1:300:7:85:C00000:0:0:0: +#SERVICE 1:0:1:2778:444:1:C00000:0:0:0: +#SERVICE 1:0:1:277A:444:1:C00000:0:0:0: +#SERVICE 1:0:1:2779:444:1:C00000:0:0:0: +#SERVICE 1:0:1:2777:444:1:C00000:0:0:0: +#SERVICE 1:0:1:32D6:45D:1:C00000:0:0:0: +#SERVICE 1:0:1:277D:444:1:C00000:0:0:0: +#SERVICE 1:64:4:0:0:0:0:0:0:0::Musik +#DESCRIPTION Musik +#SERVICE 1:0:1:2774:444:1:C00000:0:0:0: +#SERVICE 1:0:1:7004:436:1:C00000:0:0:0: +#SERVICE 1:0:1:7001:436:1:C00000:0:0:0: +#SERVICE 1:0:1:6FE1:443:1:C00000:0:0:0: +#SERVICE 1:0:1:2FD:7:85:C00000:0:0:0: +#SERVICE 1:0:1:32D5:45D:1:C00000:0:0:0: +#SERVICE 1:0:1:332E:45B:1:C00000:0:0:0: +#SERVICE 1:0:1:304:5:85:C00000:0:0:0: +#SERVICE 1:0:1:702:5:85:C00000:0:0:0: +#SERVICE 1:64:5:0:0:0:0:0:0:0::Reisen +#DESCRIPTION Reisen +#SERVICE 1:0:1:20:21:85:C00000:0:0:0: +#SERVICE 1:64:9:0:0:0:0:0:0:0::Beratung +#DESCRIPTION Beratung +#SERVICE 1:0:1:295:21:85:C00000:0:0:0: +#SERVICE 1:64:6:0:0:0:0:0:0:0::Einkaufen +#DESCRIPTION Einkaufen +#SERVICE 1:0:1:301:7:85:C00000:0:0:0: +#SERVICE 1:0:1:28:21:85:C00000:0:0:0: +#SERVICE 1:0:1:79EA:443:1:C00000:0:0:0: +#SERVICE 1:0:1:2F44:454:1:C00000:0:0:0: +#SERVICE 1:0:1:3148:459:1:C00000:0:0:0: +#SERVICE 1:0:1:36:7:85:C00000:0:0:0: +#SERVICE 1:0:1:307:7:85:C00000:0:0:0: +#SERVICE 1:0:1:296:5:85:C00000:0:0:0: +#SERVICE 1:0:1:383:21:85:C00000:0:0:0: +#SERVICE 1:0:1:313C:459:1:C00000:0:0:0: +#SERVICE 1:0:1:3159:459:1:C00000:0:0:0: +#SERVICE 1:0:1:2E:21:85:C00000:0:0:0: +#SERVICE 1:0:1:381:21:85:C00000:0:0:0: +#SERVICE 1:64:7:0:0:0:0:0:0:0::High Definition +#DESCRIPTION High Definition +#SERVICE 1:0:19:6EEC:4B1:1:C00000:0:0:0: +#SERVICE 1:0:19:EF12:421:1:C00000:0:0:0: +#SERVICE 1:0:19:EF13:421:1:C00000:0:0:0: +#SERVICE 1:64:0:0:0:0:0:0:0:0::Alternativen +#DESCRIPTION Alternativen +#SERVICE 1:0:1:6DCB:44D:1:C00000:0:0:0: +#SERVICE 1:0:1:6E44:431:1:C00000:0:0:0: +#SERVICE 1:0:1:6E45:431:1:C00000:0:0:0: +#SERVICE 1:0:1:6E41:431:1:C00000:0:0:0: +#SERVICE 1:0:1:6E40:431:1:C00000:0:0:0: +#SERVICE 1:0:1:6E43:431:1:C00000:0:0:0: +#SERVICE 1:0:1:6EE1:4B1:1:C00000:0:0:0: +#SERVICE 1:0:1:6E2D:431:1:C00000:0:0:0: +#SERVICE 1:0:1:6E2E:431:1:C00000:0:0:0: +#SERVICE 1:0:1:6F46:445:1:C00000:0:0:0: +#SERVICE 1:0:1:6E47:431:1:C00000:0:0:0: +#SERVICE 1:0:1:6F76:457:1:C00000:0:0:0: +#SERVICE 1:0:1:6E92:4B1:1:C00000:0:0:0: +#SERVICE 1:0:1:6E93:4B1:1:C00000:0:0:0: +#SERVICE 1:0:1:6F78:457:1:C00000:0:0:0: +#SERVICE 1:0:1:6F79:457:1:C00000:0:0:0: +#SERVICE 1:0:1:6E94:4B1:1:C00000:0:0:0: +#SERVICE 1:0:1:6F77:457:1:C00000:0:0:0: +#SERVICE 1:0:1:6EEB:4B1:1:C00000:0:0:0: +#SERVICE 1:0:1:6E97:4B1:1:C00000:0:0:0: +#SERVICE 1:0:1:6E96:4B1:1:C00000:0:0:0: +#SERVICE 1:0:1:6E95:4B1:1:C00000:0:0:0: +#SERVICE 1:64:8:0:0:0:0:0:0:0::Alternative SD services +#DESCRIPTION Alternative SD services +#SERVICE 1:0:1:6DCA:44D:1:C00000:0:0:0: +#SERVICE 1:0:1:6D66:437:1:C00000:0:0:0: +#SERVICE 1:0:1:7034:41B:1:C00000:0:0:0: diff --git a/data/defaults/Dream/sdbouquets/Makefile.am b/data/defaults/Dream/sdbouquets/Makefile.am new file mode 100644 index 00000000..50328e55 --- /dev/null +++ b/data/defaults/Dream/sdbouquets/Makefile.am @@ -0,0 +1,4 @@ +installdir = $(pkgdatadir)/defaults/Dream/sdbouquets + +dist_install_DATA = \ + userbouquet.favourites.tv diff --git a/data/defaults/Dream/sdbouquets/userbouquet.favourites.tv b/data/defaults/Dream/sdbouquets/userbouquet.favourites.tv new file mode 100644 index 00000000..5f89c48a --- /dev/null +++ b/data/defaults/Dream/sdbouquets/userbouquet.favourites.tv @@ -0,0 +1,127 @@ +#NAME Favourites (TV) +#SERVICE 1:0:1:6DCA:44D:1:C00000:0:0:0: +#SERVICE 1:0:1:6D66:437:1:C00000:0:0:0: +#SERVICE 1:0:1:6DCC:44D:1:C00000:0:0:0: +#SERVICE 1:0:1:2EE3:441:1:C00000:0:0:0: +#SERVICE 1:0:1:445C:453:1:C00000:0:0:0: +#SERVICE 1:0:1:2EF4:441:1:C00000:0:0:0: +#SERVICE 1:0:1:445D:453:1:C00000:0:0:0: +#SERVICE 1:0:1:445E:453:1:C00000:0:0:0: +#SERVICE 1:0:1:33:21:85:C00000:0:0:0: +#SERVICE 1:0:1:701:5:85:C00000:0:0:0: +#SERVICE 1:0:1:2F1C:441:1:C00000:0:0:0: +#SERVICE 1:0:1:6D6E:437:1:C00000:0:0:0: +#SERVICE 1:0:1:2FC:5:85:C00000:0:0:0: +#SERVICE 1:0:1:F98:454:1:C00000:0:0:0: +#SERVICE 1:0:1:7034:41B:1:C00000:0:0:0: +#SERVICE 1:0:1:6D67:437:1:C00000:0:0:0: +#SERVICE 1:0:1:7031:41B:1:C00000:0:0:0: +#SERVICE 1:0:1:7032:41B:1:C00000:0:0:0: +#SERVICE 1:0:1:7033:41B:1:C00000:0:0:0: +#SERVICE 1:0:1:6E46:431:1:C00000:0:0:0: +#SERVICE 1:0:1:6DCE:44D:1:C00000:0:0:0: +#SERVICE 1:0:1:6DD1:44D:1:C00000:0:0:0: +#SERVICE 1:0:1:6DCF:44D:1:C00000:0:0:0: +#SERVICE 1:0:1:6E42:431:1:C00000:0:0:0: +#SERVICE 1:64:B:0:0:0:0:0:0:0::Doku/Wissen/Themen +#DESCRIPTION Doku/Wissen/Themen +#SERVICE 1:0:1:6DD0:44D:1:C00000:0:0:0: +#SERVICE 1:0:1:6D6B:437:1:C00000:0:0:0: +#SERVICE 1:0:1:2775:444:1:C00000:0:0:0: +#SERVICE 1:0:1:293:5:85:C00000:0:0:0: +#SERVICE 1:0:1:6D70:437:1:C00000:0:0:0: +#SERVICE 1:0:1:277B:444:1:C00000:0:0:0: +#SERVICE 1:0:1:332D:45B:1:C00000:0:0:0: +#SERVICE 1:0:1:3139:459:1:C00000:0:0:0: +#SERVICE 1:0:1:2F5A:454:1:C00000:0:0:0: +#SERVICE 1:64:A:0:0:0:0:0:0:0::Sport +#DESCRIPTION Sport +#SERVICE 1:0:1:384:21:85:C00000:0:0:0: +#SERVICE 1:0:1:79E0:443:1:C00000:0:0:0: +#SERVICE 1:64:1:0:0:0:0:0:0:0::Kinder +#DESCRIPTION Kinder +#SERVICE 1:0:1:2F08:441:1:C00000:0:0:0: +#SERVICE 1:0:1:6D68:437:1:C00000:0:0:0: +#SERVICE 1:0:1:7008:436:1:C00000:0:0:0: +#SERVICE 1:0:1:6FE0:443:1:C00000:0:0:0: +#SERVICE 1:64:2:0:0:0:0:0:0:0::Nachrichten +#DESCRIPTION Nachrichten +#SERVICE 1:0:1:2F3A:441:1:C00000:0:0:0: +#SERVICE 1:0:1:445F:453:1:C00000:0:0:0: +#SERVICE 1:0:1:79F4:443:1:C00000:0:0:0: +#SERVICE 1:0:1:2753:402:1:C00000:0:0:0: +#SERVICE 1:0:1:7035:41B:1:C00000:0:0:0: +#SERVICE 1:64:3:0:0:0:0:0:0:0::Regional +#DESCRIPTION Regional +#SERVICE 1:0:1:3146:459:1:C00000:0:0:0: +#SERVICE 1:0:1:300:7:85:C00000:0:0:0: +#SERVICE 1:0:1:2778:444:1:C00000:0:0:0: +#SERVICE 1:0:1:277A:444:1:C00000:0:0:0: +#SERVICE 1:0:1:2779:444:1:C00000:0:0:0: +#SERVICE 1:0:1:2777:444:1:C00000:0:0:0: +#SERVICE 1:0:1:32D6:45D:1:C00000:0:0:0: +#SERVICE 1:0:1:277D:444:1:C00000:0:0:0: +#SERVICE 1:64:4:0:0:0:0:0:0:0::Musik +#DESCRIPTION Musik +#SERVICE 1:0:1:2774:444:1:C00000:0:0:0: +#SERVICE 1:0:1:7004:436:1:C00000:0:0:0: +#SERVICE 1:0:1:7001:436:1:C00000:0:0:0: +#SERVICE 1:0:1:6FE1:443:1:C00000:0:0:0: +#SERVICE 1:0:1:2FD:7:85:C00000:0:0:0: +#SERVICE 1:0:1:32D5:45D:1:C00000:0:0:0: +#SERVICE 1:0:1:332E:45B:1:C00000:0:0:0: +#SERVICE 1:0:1:304:5:85:C00000:0:0:0: +#SERVICE 1:0:1:702:5:85:C00000:0:0:0: +#SERVICE 1:64:5:0:0:0:0:0:0:0::Reisen +#DESCRIPTION Reisen +#SERVICE 1:0:1:20:21:85:C00000:0:0:0: +#SERVICE 1:64:9:0:0:0:0:0:0:0::Beratung +#DESCRIPTION Beratung +#SERVICE 1:0:1:295:21:85:C00000:0:0:0: +#SERVICE 1:64:6:0:0:0:0:0:0:0::Einkaufen +#DESCRIPTION Einkaufen +#SERVICE 1:0:1:301:7:85:C00000:0:0:0: +#SERVICE 1:0:1:28:21:85:C00000:0:0:0: +#SERVICE 1:0:1:79EA:443:1:C00000:0:0:0: +#SERVICE 1:0:1:2F44:454:1:C00000:0:0:0: +#SERVICE 1:0:1:3148:459:1:C00000:0:0:0: +#SERVICE 1:0:1:36:7:85:C00000:0:0:0: +#SERVICE 1:0:1:307:7:85:C00000:0:0:0: +#SERVICE 1:0:1:296:5:85:C00000:0:0:0: +#SERVICE 1:0:1:383:21:85:C00000:0:0:0: +#SERVICE 1:0:1:313C:459:1:C00000:0:0:0: +#SERVICE 1:0:1:3159:459:1:C00000:0:0:0: +#SERVICE 1:0:1:2E:21:85:C00000:0:0:0: +#SERVICE 1:0:1:381:21:85:C00000:0:0:0: +#SERVICE 1:64:7:0:0:0:0:0:0:0::High Definition +#DESCRIPTION High Definition +#SERVICE 1:0:19:2B5C:3F3:1:C00000:0:0:0: +#SERVICE 1:0:19:2B66:3F3:1:C00000:0:0:0: +#SERVICE 1:0:19:2B70:3F3:1:C00000:0:0:0: +#SERVICE 1:0:19:6EEC:4B1:1:C00000:0:0:0: +#SERVICE 1:0:19:EF12:421:1:C00000:0:0:0: +#SERVICE 1:0:19:EF13:421:1:C00000:0:0:0: +#SERVICE 1:64:0:0:0:0:0:0:0:0::Alternativen +#DESCRIPTION Alternativen +#SERVICE 1:0:1:6DCB:44D:1:C00000:0:0:0: +#SERVICE 1:0:1:6E44:431:1:C00000:0:0:0: +#SERVICE 1:0:1:6E45:431:1:C00000:0:0:0: +#SERVICE 1:0:1:6E41:431:1:C00000:0:0:0: +#SERVICE 1:0:1:6E40:431:1:C00000:0:0:0: +#SERVICE 1:0:1:6E43:431:1:C00000:0:0:0: +#SERVICE 1:0:1:6EE1:4B1:1:C00000:0:0:0: +#SERVICE 1:0:1:6E2D:431:1:C00000:0:0:0: +#SERVICE 1:0:1:6E2E:431:1:C00000:0:0:0: +#SERVICE 1:0:1:6F46:445:1:C00000:0:0:0: +#SERVICE 1:0:1:6E47:431:1:C00000:0:0:0: +#SERVICE 1:0:1:6F76:457:1:C00000:0:0:0: +#SERVICE 1:0:1:6E92:4B1:1:C00000:0:0:0: +#SERVICE 1:0:1:6E93:4B1:1:C00000:0:0:0: +#SERVICE 1:0:1:6F78:457:1:C00000:0:0:0: +#SERVICE 1:0:1:6F79:457:1:C00000:0:0:0: +#SERVICE 1:0:1:6E94:4B1:1:C00000:0:0:0: +#SERVICE 1:0:1:6F77:457:1:C00000:0:0:0: +#SERVICE 1:0:1:6EEB:4B1:1:C00000:0:0:0: +#SERVICE 1:0:1:6E97:4B1:1:C00000:0:0:0: +#SERVICE 1:0:1:6E96:4B1:1:C00000:0:0:0: +#SERVICE 1:0:1:6E95:4B1:1:C00000:0:0:0: diff --git a/data/defaults/Dream/userbouquet.favourites.tv b/data/defaults/Dream/userbouquet.favourites.tv deleted file mode 100644 index 5f89c48a..00000000 --- a/data/defaults/Dream/userbouquet.favourites.tv +++ /dev/null @@ -1,127 +0,0 @@ -#NAME Favourites (TV) -#SERVICE 1:0:1:6DCA:44D:1:C00000:0:0:0: -#SERVICE 1:0:1:6D66:437:1:C00000:0:0:0: -#SERVICE 1:0:1:6DCC:44D:1:C00000:0:0:0: -#SERVICE 1:0:1:2EE3:441:1:C00000:0:0:0: -#SERVICE 1:0:1:445C:453:1:C00000:0:0:0: -#SERVICE 1:0:1:2EF4:441:1:C00000:0:0:0: -#SERVICE 1:0:1:445D:453:1:C00000:0:0:0: -#SERVICE 1:0:1:445E:453:1:C00000:0:0:0: -#SERVICE 1:0:1:33:21:85:C00000:0:0:0: -#SERVICE 1:0:1:701:5:85:C00000:0:0:0: -#SERVICE 1:0:1:2F1C:441:1:C00000:0:0:0: -#SERVICE 1:0:1:6D6E:437:1:C00000:0:0:0: -#SERVICE 1:0:1:2FC:5:85:C00000:0:0:0: -#SERVICE 1:0:1:F98:454:1:C00000:0:0:0: -#SERVICE 1:0:1:7034:41B:1:C00000:0:0:0: -#SERVICE 1:0:1:6D67:437:1:C00000:0:0:0: -#SERVICE 1:0:1:7031:41B:1:C00000:0:0:0: -#SERVICE 1:0:1:7032:41B:1:C00000:0:0:0: -#SERVICE 1:0:1:7033:41B:1:C00000:0:0:0: -#SERVICE 1:0:1:6E46:431:1:C00000:0:0:0: -#SERVICE 1:0:1:6DCE:44D:1:C00000:0:0:0: -#SERVICE 1:0:1:6DD1:44D:1:C00000:0:0:0: -#SERVICE 1:0:1:6DCF:44D:1:C00000:0:0:0: -#SERVICE 1:0:1:6E42:431:1:C00000:0:0:0: -#SERVICE 1:64:B:0:0:0:0:0:0:0::Doku/Wissen/Themen -#DESCRIPTION Doku/Wissen/Themen -#SERVICE 1:0:1:6DD0:44D:1:C00000:0:0:0: -#SERVICE 1:0:1:6D6B:437:1:C00000:0:0:0: -#SERVICE 1:0:1:2775:444:1:C00000:0:0:0: -#SERVICE 1:0:1:293:5:85:C00000:0:0:0: -#SERVICE 1:0:1:6D70:437:1:C00000:0:0:0: -#SERVICE 1:0:1:277B:444:1:C00000:0:0:0: -#SERVICE 1:0:1:332D:45B:1:C00000:0:0:0: -#SERVICE 1:0:1:3139:459:1:C00000:0:0:0: -#SERVICE 1:0:1:2F5A:454:1:C00000:0:0:0: -#SERVICE 1:64:A:0:0:0:0:0:0:0::Sport -#DESCRIPTION Sport -#SERVICE 1:0:1:384:21:85:C00000:0:0:0: -#SERVICE 1:0:1:79E0:443:1:C00000:0:0:0: -#SERVICE 1:64:1:0:0:0:0:0:0:0::Kinder -#DESCRIPTION Kinder -#SERVICE 1:0:1:2F08:441:1:C00000:0:0:0: -#SERVICE 1:0:1:6D68:437:1:C00000:0:0:0: -#SERVICE 1:0:1:7008:436:1:C00000:0:0:0: -#SERVICE 1:0:1:6FE0:443:1:C00000:0:0:0: -#SERVICE 1:64:2:0:0:0:0:0:0:0::Nachrichten -#DESCRIPTION Nachrichten -#SERVICE 1:0:1:2F3A:441:1:C00000:0:0:0: -#SERVICE 1:0:1:445F:453:1:C00000:0:0:0: -#SERVICE 1:0:1:79F4:443:1:C00000:0:0:0: -#SERVICE 1:0:1:2753:402:1:C00000:0:0:0: -#SERVICE 1:0:1:7035:41B:1:C00000:0:0:0: -#SERVICE 1:64:3:0:0:0:0:0:0:0::Regional -#DESCRIPTION Regional -#SERVICE 1:0:1:3146:459:1:C00000:0:0:0: -#SERVICE 1:0:1:300:7:85:C00000:0:0:0: -#SERVICE 1:0:1:2778:444:1:C00000:0:0:0: -#SERVICE 1:0:1:277A:444:1:C00000:0:0:0: -#SERVICE 1:0:1:2779:444:1:C00000:0:0:0: -#SERVICE 1:0:1:2777:444:1:C00000:0:0:0: -#SERVICE 1:0:1:32D6:45D:1:C00000:0:0:0: -#SERVICE 1:0:1:277D:444:1:C00000:0:0:0: -#SERVICE 1:64:4:0:0:0:0:0:0:0::Musik -#DESCRIPTION Musik -#SERVICE 1:0:1:2774:444:1:C00000:0:0:0: -#SERVICE 1:0:1:7004:436:1:C00000:0:0:0: -#SERVICE 1:0:1:7001:436:1:C00000:0:0:0: -#SERVICE 1:0:1:6FE1:443:1:C00000:0:0:0: -#SERVICE 1:0:1:2FD:7:85:C00000:0:0:0: -#SERVICE 1:0:1:32D5:45D:1:C00000:0:0:0: -#SERVICE 1:0:1:332E:45B:1:C00000:0:0:0: -#SERVICE 1:0:1:304:5:85:C00000:0:0:0: -#SERVICE 1:0:1:702:5:85:C00000:0:0:0: -#SERVICE 1:64:5:0:0:0:0:0:0:0::Reisen -#DESCRIPTION Reisen -#SERVICE 1:0:1:20:21:85:C00000:0:0:0: -#SERVICE 1:64:9:0:0:0:0:0:0:0::Beratung -#DESCRIPTION Beratung -#SERVICE 1:0:1:295:21:85:C00000:0:0:0: -#SERVICE 1:64:6:0:0:0:0:0:0:0::Einkaufen -#DESCRIPTION Einkaufen -#SERVICE 1:0:1:301:7:85:C00000:0:0:0: -#SERVICE 1:0:1:28:21:85:C00000:0:0:0: -#SERVICE 1:0:1:79EA:443:1:C00000:0:0:0: -#SERVICE 1:0:1:2F44:454:1:C00000:0:0:0: -#SERVICE 1:0:1:3148:459:1:C00000:0:0:0: -#SERVICE 1:0:1:36:7:85:C00000:0:0:0: -#SERVICE 1:0:1:307:7:85:C00000:0:0:0: -#SERVICE 1:0:1:296:5:85:C00000:0:0:0: -#SERVICE 1:0:1:383:21:85:C00000:0:0:0: -#SERVICE 1:0:1:313C:459:1:C00000:0:0:0: -#SERVICE 1:0:1:3159:459:1:C00000:0:0:0: -#SERVICE 1:0:1:2E:21:85:C00000:0:0:0: -#SERVICE 1:0:1:381:21:85:C00000:0:0:0: -#SERVICE 1:64:7:0:0:0:0:0:0:0::High Definition -#DESCRIPTION High Definition -#SERVICE 1:0:19:2B5C:3F3:1:C00000:0:0:0: -#SERVICE 1:0:19:2B66:3F3:1:C00000:0:0:0: -#SERVICE 1:0:19:2B70:3F3:1:C00000:0:0:0: -#SERVICE 1:0:19:6EEC:4B1:1:C00000:0:0:0: -#SERVICE 1:0:19:EF12:421:1:C00000:0:0:0: -#SERVICE 1:0:19:EF13:421:1:C00000:0:0:0: -#SERVICE 1:64:0:0:0:0:0:0:0:0::Alternativen -#DESCRIPTION Alternativen -#SERVICE 1:0:1:6DCB:44D:1:C00000:0:0:0: -#SERVICE 1:0:1:6E44:431:1:C00000:0:0:0: -#SERVICE 1:0:1:6E45:431:1:C00000:0:0:0: -#SERVICE 1:0:1:6E41:431:1:C00000:0:0:0: -#SERVICE 1:0:1:6E40:431:1:C00000:0:0:0: -#SERVICE 1:0:1:6E43:431:1:C00000:0:0:0: -#SERVICE 1:0:1:6EE1:4B1:1:C00000:0:0:0: -#SERVICE 1:0:1:6E2D:431:1:C00000:0:0:0: -#SERVICE 1:0:1:6E2E:431:1:C00000:0:0:0: -#SERVICE 1:0:1:6F46:445:1:C00000:0:0:0: -#SERVICE 1:0:1:6E47:431:1:C00000:0:0:0: -#SERVICE 1:0:1:6F76:457:1:C00000:0:0:0: -#SERVICE 1:0:1:6E92:4B1:1:C00000:0:0:0: -#SERVICE 1:0:1:6E93:4B1:1:C00000:0:0:0: -#SERVICE 1:0:1:6F78:457:1:C00000:0:0:0: -#SERVICE 1:0:1:6F79:457:1:C00000:0:0:0: -#SERVICE 1:0:1:6E94:4B1:1:C00000:0:0:0: -#SERVICE 1:0:1:6F77:457:1:C00000:0:0:0: -#SERVICE 1:0:1:6EEB:4B1:1:C00000:0:0:0: -#SERVICE 1:0:1:6E97:4B1:1:C00000:0:0:0: -#SERVICE 1:0:1:6E96:4B1:1:C00000:0:0:0: -#SERVICE 1:0:1:6E95:4B1:1:C00000:0:0:0: -- cgit v1.2.3 From a1bc57b365d18ce91c63bf43db037e389bebe53b Mon Sep 17 00:00:00 2001 From: ghost Date: Mon, 22 Mar 2010 09:27:20 +0100 Subject: data/encoding.conf: set default encoding for cze/ces/slo/slk to ISO6397 --- data/encoding.conf | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'data') diff --git a/data/encoding.conf b/data/encoding.conf index 3f09b564..a3cefe6e 100644 --- a/data/encoding.conf +++ b/data/encoding.conf @@ -6,6 +6,10 @@ gre ISO8859-7 pol ISO8859-2 rus ISO8859-5 bul ISO8859-5 +cze ISO6397 +ces ISO6397 +slo ISO6397 +slk ISO6397 #Sorry for that.. in DVB Spec this is the default behavior #when no other encoding is given in dvb-texts.. #but this breaks too much providers yet.. -- cgit v1.2.3 From 1398385cff4a4fc4d770afa1e9d1f6d560431b23 Mon Sep 17 00:00:00 2001 From: ghost Date: Wed, 24 Mar 2010 15:17:39 +0100 Subject: add support for event progressbar per service in channelselection default this is disabled.. you can enable it in the Usage config this fixes bug #486 (patch by Dr.Best) --- data/setup.xml | 1 + data/skin_default/Makefile.am | 1 + data/skin_default/celserviceeventprogressbar.png | Bin 0 -> 1056 bytes lib/python/Components/ServiceList.py | 29 ++++++++-- lib/python/Components/UsageConfig.py | 2 + lib/service/listboxservice.cpp | 65 ++++++++++++++++++++--- lib/service/listboxservice.h | 6 +++ 7 files changed, 93 insertions(+), 11 deletions(-) create mode 100644 data/skin_default/celserviceeventprogressbar.png mode change 100755 => 100644 lib/python/Components/ServiceList.py (limited to 'data') diff --git a/data/setup.xml b/data/setup.xml index 92bbc0f1..705eaf33 100644 --- a/data/setup.xml +++ b/data/setup.xml @@ -34,6 +34,7 @@ config.usage.on_short_powerpress config.usage.infobar_timeout config.usage.output_12V + config.usage.show_event_progress_in_servicelist config.usage.show_infobar_on_zap config.usage.show_infobar_on_skip config.usage.show_infobar_on_event_change diff --git a/data/skin_default/Makefile.am b/data/skin_default/Makefile.am index 85bb800d..6038c2e9 100755 --- a/data/skin_default/Makefile.am +++ b/data/skin_default/Makefile.am @@ -23,6 +23,7 @@ dist_install_DATA = \ b_tl.png \ b_t.png \ b_tr.png \ + celserviceeventprogressbar.png \ div-h.png \ div-v.png \ epg_more.png \ diff --git a/data/skin_default/celserviceeventprogressbar.png b/data/skin_default/celserviceeventprogressbar.png new file mode 100644 index 00000000..7bf5c658 Binary files /dev/null and b/data/skin_default/celserviceeventprogressbar.png differ diff --git a/lib/python/Components/ServiceList.py b/lib/python/Components/ServiceList.py old mode 100755 new mode 100644 index 6095812a..3452e27d --- a/lib/python/Components/ServiceList.py +++ b/lib/python/Components/ServiceList.py @@ -7,6 +7,8 @@ from Tools.LoadPixmap import LoadPixmap from Tools.Directories import resolveFilename, SCOPE_CURRENT_SKIN +from Components.config import config + class ServiceList(HTMLComponent, GUIComponent): MODE_NORMAL = 0 MODE_FAVOURITES = 1 @@ -62,6 +64,18 @@ class ServiceList(HTMLComponent, GUIComponent): self.l.setColor(eListboxServiceContent.markedBackgroundSelected, parseColor(value)) elif attrib == "foregroundColorServiceNotAvail": self.l.setColor(eListboxServiceContent.serviceNotAvail, parseColor(value)) + elif attrib == "colorEventProgressbar": + self.l.setColor(eListboxServiceContent.serviceEventProgressbarColor, parseColor(value)) + elif attrib == "colorEventProgressbarSelected": + self.l.setColor(eListboxServiceContent.serviceEventProgressbarColorSelected, parseColor(value)) + elif attrib == "colorEventProgressbarBorder": + self.l.setColor(eListboxServiceContent.serviceEventProgressbarBorderColor, parseColor(value)) + elif attrib == "colorEventProgressbarBorderSelected": + self.l.setColor(eListboxServiceContent.serviceEventProgressbarBorderColorSelected, parseColor(value)) + elif attrib == "picServiceEventProgressbar": + pic = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, value)) + if pic: + self.l.setPixmap(self.l.picServiceEventProgressbar, pic) elif attrib == "serviceItemHeight": self.ItemHeight = int(value) elif attrib == "serviceNameFont": @@ -213,17 +227,24 @@ class ServiceList(HTMLComponent, GUIComponent): def setMode(self, mode): self.mode = mode + self.l.setItemHeight(self.ItemHeight) + self.l.setVisualMode(eListboxServiceContent.visModeComplex) if mode == self.MODE_NORMAL: - self.l.setItemHeight(self.ItemHeight) - self.l.setVisualMode(eListboxServiceContent.visModeComplex) + if config.usage.show_event_progress_in_servicelist.value: + self.l.setElementPosition(self.l.celServiceEventProgressbar, eRect(0, 0, 52, self.ItemHeight)) + else: + self.l.setElementPosition(self.l.celServiceEventProgressbar, eRect(0, 0, 0, 0)) self.l.setElementFont(self.l.celServiceName, self.ServiceNameFont) self.l.setElementPosition(self.l.celServiceName, eRect(0, 0, self.instance.size().width(), self.ItemHeight)) self.l.setElementFont(self.l.celServiceInfo, self.ServiceInfoFont) else: - self.l.setItemHeight(self.ItemHeight) - self.l.setVisualMode(eListboxServiceContent.visModeComplex) + if config.usage.show_event_progress_in_servicelist.value: + self.l.setElementPosition(self.l.celServiceEventProgressbar, eRect(60, 0, 52, self.ItemHeight)) + else: + self.l.setElementPosition(self.l.celServiceEventProgressbar, eRect(60, 0, 0, 0)) self.l.setElementFont(self.l.celServiceNumber, self.ServiceNumberFont) self.l.setElementPosition(self.l.celServiceNumber, eRect(0, 0, 50, self.ItemHeight)) self.l.setElementFont(self.l.celServiceName, self.ServiceNameFont) self.l.setElementPosition(self.l.celServiceName, eRect(60, 0, self.instance.size().width()-60, self.ItemHeight)) self.l.setElementFont(self.l.celServiceInfo, self.ServiceInfoFont) + diff --git a/lib/python/Components/UsageConfig.py b/lib/python/Components/UsageConfig.py index 21478e90..b86c1a13 100644 --- a/lib/python/Components/UsageConfig.py +++ b/lib/python/Components/UsageConfig.py @@ -68,6 +68,8 @@ def InitUsageConfig(): ("4", "DVB-T/-C/-S"), ("5", "DVB-T/-S/-C") ]) + config.usage.show_event_progress_in_servicelist = ConfigYesNo(default = False) + config.usage.blinking_display_clock_during_recording = ConfigYesNo(default = False) config.usage.show_message_when_recording_starts = ConfigYesNo(default = True) diff --git a/lib/service/listboxservice.cpp b/lib/service/listboxservice.cpp index 05aaf731..faee1ee6 100644 --- a/lib/service/listboxservice.cpp +++ b/lib/service/listboxservice.cpp @@ -526,7 +526,9 @@ void eListboxServiceContent::paint(gPainter &painter, eWindowStyle &style, const ePtr service_info; m_service_center->info(*m_cursor, service_info); eServiceReference ref = *m_cursor; - bool isPlayable = !(ref.flags & eServiceReference::isDirectory || ref.flags & eServiceReference::isMarker); + bool isMarker = ref.flags & eServiceReference::isMarker; + bool isPlayable = !(ref.flags & eServiceReference::isDirectory || isMarker); + ePtr evt; if (!marked && isPlayable && service_info && m_is_playable_ignore.valid() && !service_info->isPlayable(*m_cursor, m_is_playable_ignore)) { @@ -539,7 +541,7 @@ void eListboxServiceContent::paint(gPainter &painter, eWindowStyle &style, const if (selected && local_style && local_style->m_selection) painter.blit(local_style->m_selection, offset, eRect(), gPainter::BT_ALPHATEST); - int xoffset=0; // used as offset when painting the folder/marker symbol + int xoffset=0; // used as offset when painting the folder/marker symbol or the serviceevent progress for (int e = 0; e < celElements; ++e) { @@ -583,8 +585,7 @@ void eListboxServiceContent::paint(gPainter &painter, eWindowStyle &style, const } case celServiceInfo: { - ePtr evt; - if ( isPlayable && service_info && !service_info->getEvent(*m_cursor, evt) ) + if ( isPlayable && evt ) { std::string name = evt->getEventName(); if (!name.length()) @@ -608,9 +609,9 @@ void eListboxServiceContent::paint(gPainter &painter, eWindowStyle &style, const { eRect bbox = para->getBoundBox(); int name_width = bbox.width()+8; - m_element_position[celServiceInfo].setLeft(area.left()+name_width); + m_element_position[celServiceInfo].setLeft(area.left()+name_width+xoffs); m_element_position[celServiceInfo].setTop(area.top()); - m_element_position[celServiceInfo].setWidth(area.width()-name_width); + m_element_position[celServiceInfo].setWidth(area.width()-(name_width+xoffs)); m_element_position[celServiceInfo].setHeight(area.height()); } @@ -678,8 +679,58 @@ void eListboxServiceContent::paint(gPainter &painter, eWindowStyle &style, const painter.clippop(); } } + else if (e == celServiceEventProgressbar) + { + int p = celServiceEventProgressbar; + eRect area = m_element_position[p]; + if (area.width() > 0 && (isPlayable || isMarker)) + { + + if ( isPlayable && service_info && !service_info->getEvent(*m_cursor, evt) ) + { + if (!selected && m_color_set[serviceEventProgressbarBorderColor]) + painter.setForegroundColor(m_color[serviceEventProgressbarBorderColor]); + else if (selected && m_color_set[serviceEventProgressbarBorderColorSelected]) + painter.setForegroundColor(m_color[serviceEventProgressbarBorderColorSelected]); + + int border = 1; + int progressH = 6; + int progressX = area.left() + offset.x(); + int progressW = area.width() - 2 * border; + int progressT = offset.y() + (m_itemsize.height() - progressH - 2*border) / 2; + + // paint progressbar frame + painter.fill(eRect(progressX, progressT, area.width(), border)); + painter.fill(eRect(progressX, progressT + border, border, progressH)); + painter.fill(eRect(progressX, progressT + progressH + border, area.width(), border)); + painter.fill(eRect(progressX + area.width() - border, progressT + border, border, progressH)); + + // calculate value + time_t now = time(0); + int value = progressW * (now - evt->getBeginTime()) / evt->getDuration(); + + eRect tmp = eRect(progressX + border, progressT + border, value, progressH); + ePtr &pixmap = m_pixmaps[picServiceEventProgressbar]; + if (pixmap) + { + area.moveBy(offset); + painter.clip(area); + painter.blit(pixmap, ePoint(progressX + border, progressT + border), tmp, gPainter::BT_ALPHATEST); + painter.clippop(); + } + else + { + if (!selected && m_color_set[serviceEventProgressbarColor]) + painter.setForegroundColor(m_color[serviceEventProgressbarColor]); + else if (selected && m_color_set[serviceEventProgressbarColorSelected]) + painter.setForegroundColor(m_color[serviceEventProgressbarColorSelected]); + painter.fill(tmp); + } + } + xoffset = area.width() + 10; + } + } } - if (selected && (!local_style || !local_style->m_selection)) style.drawFrame(painter, eRect(offset, m_itemsize), eWindowStyle::frameListboxEntry); } diff --git a/lib/service/listboxservice.h b/lib/service/listboxservice.h index 5228a2f2..982d7e14 100644 --- a/lib/service/listboxservice.h +++ b/lib/service/listboxservice.h @@ -49,6 +49,7 @@ public: celServiceNumber, celMarkerPixmap, celFolderPixmap, + celServiceEventProgressbar, celServiceName, celServiceTypePixmap, celServiceInfo, // "now" event @@ -62,6 +63,7 @@ public: picServiceGroup, picFolder, picMarker, + picServiceEventProgressbar, picElements }; @@ -84,6 +86,10 @@ public: markedBackground, markedBackgroundSelected, serviceNotAvail, + serviceEventProgressbarColor, + serviceEventProgressbarColorSelected, + serviceEventProgressbarBorderColor, + serviceEventProgressbarBorderColorSelected, colorElements }; -- cgit v1.2.3 From 445b7f371df0fc4e7bcdf8a013b892e35e90c893 Mon Sep 17 00:00:00 2001 From: Stefan Pluecken Date: Thu, 29 Apr 2010 01:49:20 +0200 Subject: resize InfoBarSummary for 96x64 displays --- configure.ac | 1 + data/Makefile.am | 2 +- data/dm800se/Makefile.am | 4 + data/dm800se/skin.xml | 350 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 356 insertions(+), 1 deletion(-) create mode 100644 data/dm800se/Makefile.am create mode 100644 data/dm800se/skin.xml (limited to 'data') diff --git a/configure.ac b/configure.ac index 05c3a8eb..ecde57d6 100755 --- a/configure.ac +++ b/configure.ac @@ -92,6 +92,7 @@ data/defaults/Makefile data/defaults/Dream/Makefile data/defaults/Dream/hdbouquets/Makefile data/defaults/Dream/sdbouquets/Makefile +data/dm800se/Makefile data/extensions/Makefile data/skin_default/Makefile data/skin_default/menu/Makefile diff --git a/data/Makefile.am b/data/Makefile.am index 84a59897..67f2ad25 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = countries fonts defaults extensions skin_default +SUBDIRS = countries fonts defaults extensions skin_default dm800se dist_pkgdata_DATA = \ defaultsatlists.xml \ diff --git a/data/dm800se/Makefile.am b/data/dm800se/Makefile.am new file mode 100644 index 00000000..11eb2d00 --- /dev/null +++ b/data/dm800se/Makefile.am @@ -0,0 +1,4 @@ +installdir = $(pkgdatadir)/dm800se + +dist_install_DATA = \ + skin.xml diff --git a/data/dm800se/skin.xml b/data/dm800se/skin.xml new file mode 100644 index 00000000..556d43d8 --- /dev/null +++ b/data/dm800se/skin.xml @@ -0,0 +1,350 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + <color name="Background" color="#25062748" /> + <color name="LabelForeground" color="#ffffff" /> + <color name="ListboxBackground" color="#25062748" /> + <color name="ListboxForeground" color="#ffffff" /> + <color name="ListboxSelectedBackground" color="#254f7497" /> + <color name="ListboxSelectedForeground" color="#ffffff" /> + <color name="ListboxMarkedBackground" color="#ff0000" /> + <color name="ListboxMarkedForeground" color="#ffffff" /> + <color name="ListboxMarkedAndSelectedBackground" color="#800000" /> + <color name="ListboxMarkedAndSelectedForeground" color="#ffffff" /> + <color name="WindowTitleForeground" color="#ffffff" /> + <color name="WindowTitleBackground" color="#25062748" /> + <!-- Main screen border png's --> + <borderset name="bsWindow"> + <pixmap pos="bpTopLeft" filename="skin_default/b_tl.png" /> + <pixmap pos="bpTop" filename="skin_default/b_t.png" /> + <pixmap pos="bpTopRight" filename="skin_default/b_tr.png" /> + <pixmap pos="bpLeft" filename="skin_default/b_l.png" /> + <pixmap pos="bpRight" filename="skin_default/b_r.png" /> + <pixmap pos="bpBottomLeft" filename="skin_default/b_bl.png" /> + <pixmap pos="bpBottom" filename="skin_default/b_b.png" /> + <pixmap pos="bpBottomRight" filename="skin_default/b_br.png" /> + </borderset> + </windowstyle> + <!-- Main screen colors (id=1 LCD) --> + <windowstyle type="skinned" id="1"> + <color name="Background" color="#000000" /> + <color name="LabelForeground" color="#ffffff" /> + <color name="ListboxBackground" color="#000000" /> + <color name="ListboxForeground" color="#ffffff" /> + <color name="ListboxSelectedBackground" color="#000000" /> + <color name="ListboxSelectedForeground" color="#ffffff" /> + <color name="ListboxMarkedBackground" color="#000000" /> + <color name="ListboxMarkedForeground" color="#ffffff" /> + <color name="ListboxMarkedAndSelectedBackground" color="#000000" /> + <color name="ListboxMarkedAndSelectedForeground" color="#ffffff" /> + <color name="WindowTitleForeground" color="#ffffff" /> + <color name="WindowTitleBackground" color="#000000" /> + </windowstyle> + <!-- Fonts --> + <fonts> + <!-- <font filename="md_khmurabi_10.ttf" name="Regular" scale="90" /> --> + <font filename="nmsbd.ttf" name="Regular" scale="90" /> + <font filename="lcd.ttf" name="LCD" scale="100" /> + <font filename="ae_AlMateen.ttf" name="Replacement" scale="90" replacement="1" /> + <font filename="tuxtxt.ttf" name="Console" scale="100" /> + </fonts> + <!-- Subtitle effects --> + <subtitles> + <sub name="Subtitle_TTX" font="Regular;30" shadowColor="#40101010" shadowOffset="3,3" /> + <sub name="Subtitle_Regular" font="Regular;30" foregroundColor="#DCDCDC" shadowColor="#40101010" shadowOffset="3,3" /> + <sub name="Subtitle_Bold" font="Replacement;30" foregroundColor="#DCDCDC" shadowColor="#40101010" shadowOffset="3,3" /> + <sub name="Subtitle_Italic" font="Regular;30" foregroundColor="#DCAAAA" shadowColor="#40101010" shadowOffset="3,3" /> + <!-- omitting foregroundColor attribute will enable auto-assignment of color --> + </subtitles> + <!-- Main infobar --> + <screen name="InfoBar" flags="wfNoBorder" position="0,380" size="720,160" title="InfoBar" backgroundColor="transparent"> + <!-- Background --> + <ePixmap position="0,0" zPosition="-1" size="720,160" pixmap="skin_default/info-bg.png" /> + <ePixmap position="27,73" size="665,71" pixmap="skin_default/screws.png" alphatest="on" transparent="1" /> + <!-- Signal Quality --> + <eLabel text="SNR" position="205,3" size="40,22" font="Regular;16" backgroundColor="#102e59" foregroundColor="#cccccc" shadowColor="#27384f" shadowOffset="-1,-1" transparent="1" /> + <widget source="session.FrontendStatus" render="Label" position="242,3" size="80,22" font="Regular;16" backgroundColor="#102e59" foregroundColor="#e7e7e7" shadowColor="#27384f" shadowOffset="-1,-1" transparent="1"> + <convert type="FrontendInfo">SNRdB</convert> + </widget> + <!-- Bit error rate --> + <eLabel text="BER" position="317,3" size="40,22" font="Regular;16" backgroundColor="#102e59" foregroundColor="#cccccc" shadowColor="#27384f" shadowOffset="-1,-1" transparent="1" noWrap="1" /> + <widget source="session.FrontendStatus" render="Label" position="355,3" size="43,22" font="Regular;16" backgroundColor="#102e59" foregroundColor="#e7e7e7" shadowColor="#27384f" shadowOffset="-1,-1" transparent="1" noWrap="1"> + <convert type="FrontendInfo">BER</convert> + </widget> + <!-- Channellogo (Picon) --> + <widget source="session.CurrentService" render="Picon" position="49,4" zPosition="1" size="70,53" alphatest="on"> + <convert type="ServiceName">Reference</convert> + </widget> + <!-- Service name --> + <widget source="session.CurrentService" render="Label" position="130,30" size="360,27" font="Regular;21" valign="center" halign="right" noWrap="1" backgroundColor="#263c59" shadowColor="#1d354c" shadowOffset="-1,-1" transparent="1"> + <convert type="ServiceName">Name</convert> + </widget> + <!-- Time --> + <ePixmap pixmap="skin_default/icons/clock.png" position="600,23" size="14,14" alphatest="on" /> + <widget source="global.CurrentTime" render="Label" position="615,21" size="55,24" font="Regular;21" halign="right" backgroundColor="#4e5a74" transparent="1"> + <convert type="ClockToText">Default</convert> + </widget> + <!-- tuners in use? --> + <widget source="session.FrontendInfo" render="Pixmap" position="142,6" size="8,9" pixmap="skin_default/nim_active.png" alphatest="on"> + <convert type="FrontendInfo">NUMBER</convert> + <convert type="ValueRange">0,0</convert> + <convert type="ConditionalShowHide" /> + </widget> + <widget source="session.FrontendInfo" render="Pixmap" position="142,19" size="8,9" pixmap="skin_default/nim_active.png" alphatest="on"> + <convert type="FrontendInfo">NUMBER</convert> + <convert type="ValueRange">1,1</convert> + <convert type="ConditionalShowHide" /> + </widget> + <widget source="session.FrontendInfo" render="Pixmap" position="142,32" size="8,9" pixmap="skin_default/nim_active.png" alphatest="on"> + <convert type="FrontendInfo">NUMBER</convert> + <convert type="ValueRange">2,2</convert> + <convert type="ConditionalShowHide" /> + </widget> + <widget source="session.FrontendInfo" render="Pixmap" position="142,45" size="8,9" pixmap="skin_default/nim_active.png" alphatest="on"> + <convert type="FrontendInfo">NUMBER</convert> + <convert type="ValueRange">3,3</convert> + <convert type="ConditionalShowHide" /> + </widget> + <widget source="session.TunerInfo" render="FixedLabel" text="A" position="129,4" size="15,13" font="Regular;14" backgroundColor="#4e5a74" transparent="1"> + <convert type="TunerInfo">TunerUseMask</convert> + <convert type="ValueBitTest">1</convert> + <convert type="ConditionalShowHide" /> + </widget> + <widget source="session.TunerInfo" render="FixedLabel" text="B" position="129,17" size="15,13" font="Regular;14" backgroundColor="#4e5a74" transparent="1"> + <convert type="TunerInfo">TunerUseMask</convert> + <convert type="ValueBitTest">2</convert> + <convert type="ConditionalShowHide" /> + </widget> + <widget source="session.TunerInfo" render="FixedLabel" text="C" position="129,30" size="15,13" font="Regular;14" backgroundColor="#4e5a74" transparent="1"> + <convert type="TunerInfo">TunerUseMask</convert> + <convert type="ValueBitTest">4</convert> + <convert type="ConditionalShowHide" /> + </widget> + <widget source="session.TunerInfo" render="FixedLabel" text="D" position="129,43" size="15,13" font="Regular;14" backgroundColor="#4e5a74" transparent="1"> + <convert type="TunerInfo">TunerUseMask</convert> + <convert type="ValueBitTest">8</convert> + <convert type="ConditionalShowHide" /> + </widget> + <!-- Crypt icon (encrypted service?) --> + <ePixmap position="563,48" zPosition="0" size="107,15" pixmap="skin_default/icons/icons_off.png" /> + <widget source="session.CurrentService" render="Pixmap" pixmap="skin_default/icons/icon_crypt.png" position="563,48" zPosition="1" size="12,16" alphatest="on"> + <convert type="ServiceInfo">IsCrypted</convert> + <convert type="ConditionalShowHide" /> + </widget> + <!-- Teletext icon (is teletext available?) --> + <widget source="session.CurrentService" render="Pixmap" pixmap="skin_default/icons/icon_txt.png" position="580,48" zPosition="1" size="26,16" alphatest="on"> + <convert type="ServiceInfo">HasTelext</convert> + <convert type="ConditionalShowHide" /> + </widget> + <!-- Videoformat icon (16:9?) --> + <widget source="session.CurrentService" render="Pixmap" pixmap="skin_default/icons/icon_format.png" position="611,48" zPosition="1" size="29,16" alphatest="on"> + <convert type="ServiceInfo">IsWidescreen</convert> + <convert type="ConditionalShowHide" /> + </widget> + <!-- Audio icon (is there multichannel audio?) --> + <widget source="session.CurrentService" render="Pixmap" pixmap="skin_default/icons/icon_dolby.png" position="645,48" zPosition="1" size="26,16" alphatest="on"> + <convert type="ServiceInfo">IsMultichannel</convert> + <convert type="ConditionalShowHide" /> + </widget> + <!-- Progressbar (current event duration)--> + <ePixmap pixmap="skin_default/progress_bg.png" position="48,77" size="84,7" transparent="1" alphatest="on" /> + <widget source="session.Event_Now" render="Progress" pixmap="skin_default/progress_small.png" position="50,78" zPosition="1" size="80,5" transparent="1"> + <convert type="EventTime">Progress</convert> + </widget> + <!-- Blinking pixmap (recording in progress?) --> + <ePixmap pixmap="skin_default/icons/icon_rec_off.png" position="561,21" size="34,21" /> + <widget source="session.RecordState" render="Pixmap" pixmap="skin_default/icons/icon_rec.png" position="561,21" zPosition="1" size="34,21"> + <convert type="ConditionalShowHide">Blink</convert> + </widget> + <!-- Event (now) --> + <ePixmap pixmap="skin_default/icons/icon_event.png" position="182,78" size="15,10" alphatest="on" /> + <widget source="session.Event_Now" render="Label" position="205,73" size="60,24" font="Regular;20" backgroundColor="#34406f" shadowColor="#1d354c" shadowOffset="-1,-1" transparent="1"> + <convert type="EventTime">StartTime</convert> + <convert type="ClockToText">Default</convert> + </widget> + <widget source="session.Event_Now" render="Label" position="265,73" size="320,24" font="Regular;20" noWrap="1" backgroundColor="#34406f" shadowColor="#1d354c" shadowOffset="-1,-1" transparent="1"> + <convert type="EventName">Name</convert> + </widget> + <widget source="session.Event_Now" render="Label" position="585,73" size="85,24" font="Regular;20" backgroundColor="#34406f" shadowColor="#1d354c" shadowOffset="-1,-1" halign="right" transparent="1"> + <convert type="EventTime">Remaining</convert> + <convert type="RemainingToText">InMinutes</convert> + </widget> + <!-- Event (next) --> + <widget source="session.Event_Next" render="Label" position="205,97" size="60,24" font="Regular;20" backgroundColor="#071f38" foregroundColor="#c3c3c9" transparent="1"> + <convert type="EventTime">StartTime</convert> + <convert type="ClockToText">Default</convert> + </widget> + <widget source="session.Event_Next" render="Label" position="265,97" size="320,24" font="Regular;20" noWrap="1" backgroundColor="#071f38" foregroundColor="#c3c3c9" transparent="1"> + <convert type="EventName">Name</convert> + </widget> + <widget source="session.Event_Next" render="Label" position="585,97" size="85,24" font="Regular;20" backgroundColor="#071f38" foregroundColor="#c3c3c9" halign="right" transparent="1"> + <convert type="EventTime">Duration</convert> + <convert type="ClockToText">InMinutes</convert> + </widget> + <!-- Red button (is recording possible?) --> + <ePixmap pixmap="skin_default/buttons/button_red_off.png" position="212,130" size="15,16" alphatest="on" /> + <widget source="RecordingPossible" render="Pixmap" pixmap="skin_default/buttons/button_red.png" position="212,130" zPosition="1" size="15,16" alphatest="on"> + <convert type="ConditionalShowHide" /> + </widget> + <!--eLabel text="Record" position="232,130" size="80,22" font="Regular;16" foregroundColor="#7f848d" backgroundColor="#182946" transparent="1" /--> + <widget source="ShowRecordOnRed" render="FixedLabel" text="Record" position="232,130" zPosition="1" size="80,22" font="Regular;16" foregroundColor="#7f848d" backgroundColor="#182946" transparent="1"> + <convert type="ConditionalShowHide" /> + </widget> + <widget source="RecordingPossible" render="FixedLabel" text="Record" position="232,130" zPosition="1" size="80,22" font="Regular;16" backgroundColor="#182946" shadowColor="#1d354c" shadowOffset="-1,-1" transparent="1"> + <convert type="ConditionalShowHide" /> + </widget> + <!-- Green button (is subservices available?) --> + <ePixmap pixmap="skin_default/buttons/button_green_off.png" position="315,130" size="15,16" alphatest="on" /> + <widget source="session.CurrentService" render="Pixmap" pixmap="skin_default/buttons/button_green.png" position="315,130" zPosition="1" size="15,16" alphatest="on"> + <convert type="ServiceInfo">SubservicesAvailable</convert> + <convert type="ConditionalShowHide" /> + </widget> + <eLabel text="Subservices" position="335,130" size="100,22" font="Regular;16" foregroundColor="#7f848d" backgroundColor="#182946" transparent="1" /> + <widget source="session.CurrentService" render="FixedLabel" text="Subservices" position="335,130" zPosition="1" size="100,22" font="Regular;16" backgroundColor="#182946" shadowColor="#1d354c" shadowOffset="-1,-1" transparent="1"> + <convert type="ServiceInfo">SubservicesAvailable</convert> + <convert type="ConditionalShowHide" /> + </widget> + <!-- Yellow button (is timeshift possible?) --> + <ePixmap pixmap="skin_default/buttons/button_yellow_off.png" position="440,130" size="15,16" alphatest="on" /> + <widget source="TimeshiftPossible" render="Pixmap" pixmap="skin_default/buttons/button_yellow.png" position="440,130" zPosition="1" size="15,16" alphatest="on"> + <convert type="ConditionalShowHide" /> + </widget> + <widget source="ShowTimeshiftOnYellow" render="FixedLabel" text="Timeshift" position="460,130" zPosition="1" size="85,22" font="Regular;16" foregroundColor="#7f848d" backgroundColor="#182946" shadowOffset="-1,-1" transparent="1"> + <convert type="ConditionalShowHide" /> + </widget> + <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" /> + </widget> + <widget source="ShowAudioOnYellow" render="FixedLabel" text="Audio" position="460,130" zPosition="1" size="85,22" font="Regular;16" backgroundColor="#182946" shadowColor="#1d354c" shadowOffset="-1,-1" transparent="1"> + <convert type="ConditionalShowHide" /> + </widget> + <!-- Blue button (is extensions available?) --> + <ePixmap pixmap="skin_default/buttons/button_blue_off.png" position="545,130" size="15,16" alphatest="on" /> + <widget source="ExtensionsAvailable" render="Pixmap" pixmap="skin_default/buttons/button_blue.png" position="545,130" zPosition="1" size="15,16" alphatest="on"> + <convert type="ConditionalShowHide" /> + </widget> + <eLabel text="Extensions" position="565,130" size="110,22" font="Regular;16" foregroundColor="#7f848d" backgroundColor="#182946" transparent="1" /> + <widget source="ExtensionsAvailable" render="FixedLabel" text="Extensions" position="565,130" zPosition="1" size="110,22" font="Regular;16" backgroundColor="#182946" shadowColor="#1d354c" shadowOffset="-1,-1" transparent="1"> + <convert type="ConditionalShowHide" /> + </widget> + </screen> + <!-- Main menu --> + <screen name="menu_mainmenu" position="center,center" size="380,285" title="Main menu"> + <widget source="title" render="Label" position="170,10" size="200,35" font="Regular;23" /> + <widget source="menu" render="Listbox" position="170,55" size="200,225" scrollbarMode="showOnDemand"> + <convert type="StringList" /> + </widget> + <widget source="menu" render="Pixmap" pixmap="skin_default/menu/shutdown.png" position="20,20" size="128,128" alphatest="on"> + <convert type="MenuEntryCompare">standby_restart_list</convert> + <convert type="ConditionalShowHide" /> + </widget> + <widget source="menu" render="Pixmap" pixmap="skin_default/menu/setup.png" position="20,20" size="128,128" alphatest="on"> + <convert type="MenuEntryCompare">setup_selection</convert> + <convert type="ConditionalShowHide" /> + </widget> + <widget source="menu" render="Pixmap" pixmap="skin_default/menu/plugins.png" position="20,20" size="128,128" alphatest="on"> + <convert type="MenuEntryCompare">plugin_selection</convert> + <convert type="ConditionalShowHide" /> + </widget> + <widget source="menu" render="Pixmap" pixmap="skin_default/menu/information.png" position="20,20" size="128,128" alphatest="on"> + <convert type="MenuEntryCompare">info_screen</convert> + <convert type="ConditionalShowHide" /> + </widget> + <widget source="menu" render="Pixmap" pixmap="skin_default/menu/scart.png" position="20,20" size="128,128" alphatest="on"> + <convert type="MenuEntryCompare">scart_switch</convert> + <convert type="ConditionalShowHide" /> + </widget> + <widget source="menu" render="Pixmap" pixmap="skin_default/menu/timer.png" position="20,20" size="128,128" alphatest="on"> + <convert type="MenuEntryCompare">timer_edit</convert> + <convert type="ConditionalShowHide" /> + </widget> + <widget source="menu" render="Pixmap" pixmap="skin_default/menu/media_player.png" position="20,20" size="128,128" alphatest="on"> + <convert type="MenuEntryCompare">media_player</convert> + <convert type="ConditionalShowHide" /> + </widget> + <widget source="menu" render="Pixmap" pixmap="skin_default/menu/dvd_player.png" position="20,20" size="128,128" alphatest="on"> + <convert type="MenuEntryCompare">dvd_player</convert> + <convert type="ConditionalShowHide" /> + </widget> + <widget source="menu" render="Pixmap" pixmap="skin_default/menu/subtitles.png" position="20,20" size="128,128" alphatest="on"> + <convert type="MenuEntryCompare">subtitle_selection</convert> + <convert type="ConditionalShowHide"/> + </widget> + </screen> + <!-- Movieplayer infobar --> + <screen name="MoviePlayer" flags="wfNoBorder" position="0,380" size="720,160" title="InfoBar" backgroundColor="transparent"> + <!-- Background --> + <ePixmap position="0,0" pixmap="skin_default/info-bg_mp.png" zPosition="-1" size="720,160" /> + <ePixmap position="29,40" pixmap="skin_default/screws_mp.png" size="665,104" alphatest="on" /> + <!-- colorbuttons --> + <ePixmap position="48,70" pixmap="skin_default/icons/mp_buttons.png" size="108,13" alphatest="on" /> + <!-- Servicename --> + <ePixmap pixmap="skin_default/icons/icon_event.png" position="207,78" size="15,10" alphatest="on" /> + <widget source="session.CurrentService" render="Label" position="230,73" size="360,40" font="Regular;20" backgroundColor="#263c59" shadowColor="#1d354c" shadowOffset="-1,-1" transparent="1"> + <convert type="ServiceName">Name</convert> + </widget> + <!-- movie length --> + <widget source="session.CurrentService" render="Label" position="580,73" size="90,24" font="Regular;20" halign="right" backgroundColor="#4e5a74" transparent="1"> + <convert type="ServicePosition">Length</convert> + </widget> + <!-- Elapsed time --> + <widget source="session.CurrentService" render="Label" position="205,129" size="100,20" font="Regular;18" halign="center" valign="center" backgroundColor="#06224f" shadowColor="#1d354c" shadowOffset="-1,-1" transparent="1"> + <convert type="ServicePosition">Position</convert> + </widget> + <!-- Progressbar (movie position)--> + <widget source="session.CurrentService" render="PositionGauge" position="300,133" size="270,10" zPosition="2" pointer="skin_default/position_pointer.png:540,0" transparent="1" foregroundColor="#20224f"> + <convert type="ServicePosition">Gauge</convert> + </widget> + <!-- Remaining time --> + <widget source="session.CurrentService" render="Label" position="576,129" size="100,20" font="Regular;18" halign="center" valign="center" backgroundColor="#06224f" shadowColor="#1d354c" shadowOffset="-1,-1" transparent="1"> + <convert type="ServicePosition">Remaining,Negate</convert> + </widget> + </screen> + + <!-- LCD screen (main) --> + <screen name="InfoBarSummary" position="0,0" size="132,64"> + <widget source="session.CurrentService" render="Label" position="3,0" size="90,25" font="Regular;14" halign="center" valign="center" > + <convert type="ServiceName">Name</convert> + </widget> + <widget source="session.Event_Now" render="Progress" position="8,27" size="80,5" borderWidth="1"> + <convert type="EventTime">Progress</convert> + </widget> + <widget source="global.CurrentTime" render="Label" position="3,32" size="65,32" font="Regular;26" halign="right" valign="top"> + <convert type="ClockToText">Format:%H:%M</convert> + </widget> + <widget source="global.CurrentTime" render="Label" position="70,34" zPosition="1" size="26,30" font="Regular;14" valign="top"> + <convert type="ClockToText">Format:%S</convert> + </widget> + <widget source="session.RecordState" render="FixedLabel" text=" " position="6,30" zPosition="1" size="120,34"> + <convert type="ConfigEntryTest">config.usage.blinking_display_clock_during_recording,True,CheckSourceBoolean</convert> + <convert type="ConditionalShowHide">Blink</convert> + </widget> + </screen> +</skin> -- cgit v1.2.3 From 4b90fd4ce866b21a60ca5962b23c550e54d4f6d8 Mon Sep 17 00:00:00 2001 From: Stefan Pluecken <stefan.pluecken@multimedia-labs.de> Date: Thu, 29 Apr 2010 02:02:24 +0200 Subject: resize ChannelSelection_summary to fit on 96x64 displays --- data/dm800se/skin.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'data') diff --git a/data/dm800se/skin.xml b/data/dm800se/skin.xml index 556d43d8..e5ff26cd 100644 --- a/data/dm800se/skin.xml +++ b/data/dm800se/skin.xml @@ -347,4 +347,20 @@ <convert type="ConditionalShowHide">Blink</convert> </widget> </screen> + + <!-- LCD screen (channelselection) --> + <screen name="ChannelSelection_summary" position="0,0" size="132,64"> + <widget source="parent.ServiceEvent" render="Label" position="3,0" size="90,25" font="Regular;14" halign="center" valign="center" > + <convert type="ServiceName">Name</convert> + </widget> + <widget source="parent.ServiceEvent" render="Progress" position="8,27" size="80,5" borderWidth="1"> + <convert type="EventTime">Progress</convert> + </widget> + <widget source="global.CurrentTime" render="Label" position="3,32" size="65,32" font="Regular;26" halign="right" valign="top"> + <convert type="ClockToText">Format:%H:%M</convert> + </widget> + <widget source="global.CurrentTime" render="Label" position="70,34" zPosition="1" size="26,30" font="Regular;14" valign="top"> + <convert type="ClockToText">Format:%S</convert> + </widget> + </screen> </skin> -- cgit v1.2.3 From 56f2ffeb0301567710eb8f08a92a73ce67a40ef5 Mon Sep 17 00:00:00 2001 From: ghost <andreas.monzner@multimedia-labs.de> Date: Thu, 29 Apr 2010 18:29:07 +0200 Subject: dm800se support --- data/defaults/Dream/Makefile.am | 2 ++ data/defaults/Dream/dm800se.info | 26 ++++++++++++++++++++++ data/defaults/Dream/settings.800se | 1 + lib/dvb/dvb.cpp | 4 +++- lib/dvb/dvb.h | 2 +- .../SystemPlugins/Videomode/VideoHardware.py | 4 ++-- .../Plugins/SystemPlugins/Videomode/VideoWizard.py | 4 ++-- 7 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 data/defaults/Dream/dm800se.info create mode 100644 data/defaults/Dream/settings.800se (limited to 'data') diff --git a/data/defaults/Dream/Makefile.am b/data/defaults/Dream/Makefile.am index 31ba1c69..cda55835 100644 --- a/data/defaults/Dream/Makefile.am +++ b/data/defaults/Dream/Makefile.am @@ -4,10 +4,12 @@ installdir = $(pkgdatadir)/defaults/Dream dist_install_DATA = \ bouquets.tv \ + dm800se.info \ dm500hd.info \ dm7025.info \ dm8000.info \ dm800.info \ + settings.800se \ settings.500hd \ settings.7025 \ settings.800 \ diff --git a/data/defaults/Dream/dm800se.info b/data/defaults/Dream/dm800se.info new file mode 100644 index 00000000..6974b120 --- /dev/null +++ b/data/defaults/Dream/dm800se.info @@ -0,0 +1,26 @@ +<default> + <prerequisites> + <!-- hardware can occur more than once --> + <hardware type="dm800se" /> + </prerequisites> + + <info> + <author>Dream Multimedia GmbH</author> + <name>Dream Multimedia Default</name> + </info> + + <!-- available types: "directories" --> + <files type="directories"> + <!--file type="skin" directory="test_skin/" flag="default" name="Default Skin" /--> + <file type="config" name="settings.800se" /> + <!--file type="services" name="lamedb.192"> + <prerequisites> + <bcastsystem type="DVB-S" /> + <satellite type="192" /> + </prerequisites> + </file--> + <file type="favourites" directory="" name="bouquets.tv" /> + <file type="favourites" directory="hdbouquets/" name="userbouquet.favourites.tv" /> + <!--file type="package" directory="packages/" name="small-test_1.0_mipsel.ipk" /--> + </files> +</default> diff --git a/data/defaults/Dream/settings.800se b/data/defaults/Dream/settings.800se new file mode 100644 index 00000000..ae2963bb --- /dev/null +++ b/data/defaults/Dream/settings.800se @@ -0,0 +1 @@ +config.misc.rcused=1 \ No newline at end of file diff --git a/lib/dvb/dvb.cpp b/lib/dvb/dvb.cpp index 836851c5..40d44186 100644 --- a/lib/dvb/dvb.cpp +++ b/lib/dvb/dvb.cpp @@ -96,6 +96,8 @@ eDVBResourceManager::eDVBResourceManager() m_boxtype = DM800; else if (!strncmp(tmp, "dm500hd\n", rd)) m_boxtype = DM500HD; + else if (!strncmp(tmp, "dm800se\n", rd)) + m_boxtype = DM800SE; else { eDebug("boxtype detection via /proc/stb/info not possible... use fallback via demux count!\n"); if (m_demux.size() == 3) @@ -455,7 +457,7 @@ RESULT eDVBResourceManager::allocateDemux(eDVBRegisteredFrontend *fe, ePtr<eDVBA ePtr<eDVBRegisteredDemux> unused; - if (m_boxtype == DM800 || m_boxtype == DM500HD) // dm800 / 500hd + if (m_boxtype == DM800 || m_boxtype == DM500HD || m_boxtype == DM800SE) // dm800 / 500hd { cap |= capHoldDecodeReference; // this is checked in eDVBChannel::getDemux for (; i != m_demux.end(); ++i, ++n) diff --git a/lib/dvb/dvb.h b/lib/dvb/dvb.h index 405bd557..fb925807 100644 --- a/lib/dvb/dvb.h +++ b/lib/dvb/dvb.h @@ -135,7 +135,7 @@ class eDVBResourceManager: public iObject, public Object DECLARE_REF(eDVBResourceManager); int avail, busy; - enum { DM7025, DM800, DM500HD, DM8000 }; + enum { DM7025, DM800, DM500HD, DM800SE, DM8000 }; int m_boxtype; diff --git a/lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py b/lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py index e3b902f0..59c50476 100644 --- a/lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py +++ b/lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py @@ -239,9 +239,9 @@ class VideoHardware: portlist = self.getPortList() for port in portlist: descr = port - if descr == 'DVI' and hw_type == 'dm500hd': + if descr == 'DVI' and hw_type in ('dm500hd', 'dm800se'): descr = 'HDMI' - elif descr == 'DVI-PC' and hw_type == 'dm500hd': + elif descr == 'DVI-PC' and hw_type in ('dm500hd', 'dm800se'): descr = 'HDMI-PC' lst.append((port, descr)) diff --git a/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py b/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py index 15f4d516..3c76685e 100644 --- a/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py +++ b/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py @@ -82,7 +82,7 @@ class VideoWizard(WizardLanguage, Rc): for port in self.hw.getPortList(): if self.hw.isPortUsed(port): descr = port - if descr == 'DVI' and hw_type == 'dm500hd': + if descr == 'DVI' and hw_type in ('dm500hd', 'dm800se'): descr = 'HDMI' if port != "DVI-PC": list.append((descr,port)) @@ -100,7 +100,7 @@ class VideoWizard(WizardLanguage, Rc): self.inputSelect(self.selection) if self["portpic"].instance is not None: picname = self.selection - if picname == "DVI" and HardwareInfo().get_device_name() == "dm500hd": + if picname == "DVI" and HardwareInfo().get_device_name() in ("dm500hd", "dm800se"): picname = "HDMI" self["portpic"].instance.setPixmapFromFile(resolveFilename(SCOPE_PLUGINS, "SystemPlugins/Videomode/" + picname + ".png")) -- cgit v1.2.3 From 995cb7dd936b2ec22ea414182a227ed8b2da867c Mon Sep 17 00:00:00 2001 From: acid-burn <acid-burn@opendreambox.org> Date: Thu, 6 May 2010 14:24:22 +0200 Subject: Network.py,NetworkSetup.py,skin_default.xml: * Introduce new unified naming for network interfaces. * Redesign NetworkadapterSelection Screen. * small cleanups. Refs #137 , Fixes #418 --- data/skin_default.xml | 14 +++- data/skin_default/icons/Makefile.am | 6 ++ data/skin_default/icons/network_wired-active.png | Bin 0 -> 2771 bytes data/skin_default/icons/network_wired-inactive.png | Bin 0 -> 2745 bytes data/skin_default/icons/network_wired.png | Bin 0 -> 2477 bytes .../skin_default/icons/network_wireless-active.png | Bin 0 -> 2821 bytes .../icons/network_wireless-inactive.png | Bin 0 -> 2745 bytes data/skin_default/icons/network_wireless.png | Bin 0 -> 2539 bytes lib/python/Components/Network.py | 51 ++++++++++-- lib/python/Screens/NetworkSetup.py | 90 ++++++++++++--------- 10 files changed, 114 insertions(+), 47 deletions(-) mode change 100644 => 100755 data/skin_default/icons/Makefile.am create mode 100755 data/skin_default/icons/network_wired-active.png create mode 100755 data/skin_default/icons/network_wired-inactive.png create mode 100755 data/skin_default/icons/network_wired.png create mode 100755 data/skin_default/icons/network_wireless-active.png create mode 100755 data/skin_default/icons/network_wireless-inactive.png create mode 100755 data/skin_default/icons/network_wireless.png (limited to 'data') diff --git a/data/skin_default.xml b/data/skin_default.xml index 0114349b..497d33ac 100755 --- a/data/skin_default.xml +++ b/data/skin_default.xml @@ -577,7 +577,19 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y())) <widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" /> <widget source="key_yellow" render="Label" position="280,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#a08500" transparent="1" /> <widget source="key_blue" render="Label" position="420,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#18188b" transparent="1" /> - <widget name="list" position="5,50" size="550,280" scrollbarMode="showOnDemand" zPosition="10"/> + <widget source="list" render="Listbox" position="5,50" size="550,280" zPosition="10" scrollbarMode="showOnDemand"> + <convert type="TemplatedMultiContent"> <!-- iface, name, description, interfacepng, defaultpng, activepng, divpng --> + {"template": [ + MultiContentEntryText(pos = (85, 6), size = (440, 28), font=0, flags = RT_HALIGN_LEFT|RT_VALIGN_TOP, text = 1), # index 1 is the interfacename + MultiContentEntryText(pos = (85, 43), size = (440, 20), font=1, flags = RT_HALIGN_LEFT|RT_VALIGN_BOTTOM, text = 2), # index 2 is the description + MultiContentEntryPixmapAlphaTest(pos = (2, 8), size = (54, 54), png = 3), # index 3 is the interface pixmap + MultiContentEntryPixmapAlphaTest(pos = (63, 46), size = (15, 16), png = 4), # index 4 is the default pixmap + ], + "fonts": [gFont("Regular", 28),gFont("Regular", 20)], + "itemHeight": 70 + } + </convert> + </widget> <ePixmap pixmap="skin_default/div-h.png" position="0,340" zPosition="1" size="560,2" /> <widget source="introduction" render="Label" position="0,350" size="560,50" zPosition="10" font="Regular;21" halign="center" valign="center" backgroundColor="#25062748" transparent="1" /> </screen> diff --git a/data/skin_default/icons/Makefile.am b/data/skin_default/icons/Makefile.am old mode 100644 new mode 100755 index 8e2052b0..088556a6 --- a/data/skin_default/icons/Makefile.am +++ b/data/skin_default/icons/Makefile.am @@ -34,6 +34,12 @@ dist_install_DATA = \ lock.png \ marker.png \ mp_buttons.png \ + network_wired.png \ + network_wired-active.png \ + network_wired-inactive.png \ + network_wireless.png \ + network_wireless-active.png \ + network_wireless-inactive.png \ plugin.png \ rass_logo.png \ rass_page1.png \ diff --git a/data/skin_default/icons/network_wired-active.png b/data/skin_default/icons/network_wired-active.png new file mode 100755 index 00000000..d8efc9c8 Binary files /dev/null and b/data/skin_default/icons/network_wired-active.png differ diff --git a/data/skin_default/icons/network_wired-inactive.png b/data/skin_default/icons/network_wired-inactive.png new file mode 100755 index 00000000..18f2c70f Binary files /dev/null and b/data/skin_default/icons/network_wired-inactive.png differ diff --git a/data/skin_default/icons/network_wired.png b/data/skin_default/icons/network_wired.png new file mode 100755 index 00000000..db695ad5 Binary files /dev/null and b/data/skin_default/icons/network_wired.png differ diff --git a/data/skin_default/icons/network_wireless-active.png b/data/skin_default/icons/network_wireless-active.png new file mode 100755 index 00000000..07a21874 Binary files /dev/null and b/data/skin_default/icons/network_wireless-active.png differ diff --git a/data/skin_default/icons/network_wireless-inactive.png b/data/skin_default/icons/network_wireless-inactive.png new file mode 100755 index 00000000..5bd69f9d Binary files /dev/null and b/data/skin_default/icons/network_wireless-inactive.png differ diff --git a/data/skin_default/icons/network_wireless.png b/data/skin_default/icons/network_wireless.png new file mode 100755 index 00000000..629a05a6 Binary files /dev/null and b/data/skin_default/icons/network_wireless.png differ diff --git a/lib/python/Components/Network.py b/lib/python/Components/Network.py index b9da48d8..e8a3d459 100755 --- a/lib/python/Components/Network.py +++ b/lib/python/Components/Network.py @@ -26,6 +26,9 @@ class Network: self.DnsConsole = Console() self.PingConsole = Console() self.config_ready = None + self.friendlyNames = {} + self.lan_interfaces = [] + self.wlan_interfaces = [] self.getInterfaces() def onRemoteRootFS(self): @@ -309,13 +312,47 @@ class Network: return len(self.ifaces) def getFriendlyAdapterName(self, x): - # maybe this needs to be replaced by an external list. - friendlyNames = { - "eth0": _("Integrated Ethernet"), - "wlan0": _("Wireless"), - "ath0": _("Integrated Wireless") - } - return friendlyNames.get(x, x) # when we have no friendly name, use adapter name + if x in self.friendlyNames.keys(): + return self.friendlyNames.get(x, x) + else: + self.friendlyNames[x] = self.getFriendlyAdapterNaming(x) + return self.friendlyNames.get(x, x) # when we have no friendly name, use adapter name + + def getFriendlyAdapterNaming(self, iface): + if iface.startswith('eth'): + if iface not in self.lan_interfaces and len(self.lan_interfaces) == 0: + self.lan_interfaces.append(iface) + return _("LAN connection") + elif iface not in self.lan_interfaces and len(self.lan_interfaces) >= 1: + self.lan_interfaces.append(iface) + return _("LAN connection") + " " + str(len(self.lan_interfaces)) + else: + if iface not in self.wlan_interfaces and len(self.wlan_interfaces) == 0: + self.wlan_interfaces.append(iface) + return _("WLAN connection") + elif iface not in self.wlan_interfaces and len(self.wlan_interfaces) >= 1: + self.wlan_interfaces.append(iface) + return _("WLAN connection") + " " + str(len(self.wlan_interfaces)) + + def getFriendlyAdapterDescription(self, iface): + if iface == 'eth0': + return _("Internal LAN adapter.") + else: + classdir = "/sys/class/net/" + iface + "/device/" + driverdir = "/sys/class/net/" + iface + "/device/driver/" + if os_path.exists(classdir): + files = listdir(classdir) + if 'driver' in files: + if os_path.realpath(driverdir).endswith('ath_pci'): + return _("Atheros")+ " " + str(os_path.basename(os_path.realpath(driverdir))) + " " + _("WLAN adapter.") + elif os_path.realpath(driverdir).endswith('zd1211b'): + return _("Zydas")+ " " + str(os_path.basename(os_path.realpath(driverdir))) + " " + _("WLAN adapter.") + elif os_path.realpath(driverdir).endswith('rt73'): + return _("Ralink")+ " " + str(os_path.basename(os_path.realpath(driverdir))) + " " + _("WLAN adapter.") + else: + return _("Unknown network adapter.") + else: + return _("Unknown network adapter.") def getAdapterName(self, iface): return iface diff --git a/lib/python/Screens/NetworkSetup.py b/lib/python/Screens/NetworkSetup.py index c0037f81..2e33ac3b 100755 --- a/lib/python/Screens/NetworkSetup.py +++ b/lib/python/Screens/NetworkSetup.py @@ -7,6 +7,7 @@ from Screens.HelpMenu import HelpableScreen from Components.Network import iNetwork from Components.Sources.StaticText import StaticText from Components.Sources.Boolean import Boolean +from Components.Sources.List import List from Components.Label import Label,MultiColorLabel from Components.Pixmap import Pixmap,MultiPixmap from Components.MenuList import MenuList @@ -23,32 +24,6 @@ from os import path as os_path, system as os_system, unlink from re import compile as re_compile, search as re_search -class InterfaceList(MenuList): - def __init__(self, list, enableWrapAround=False): - MenuList.__init__(self, list, enableWrapAround, eListboxPythonMultiContent) - self.l.setFont(0, gFont("Regular", 20)) - self.l.setItemHeight(30) - -def InterfaceEntryComponent(index,name,default,active ): - res = [ - (index), - MultiContentEntryText(pos=(80, 5), size=(430, 25), font=0, text=name) - ] - num_configured_if = len(iNetwork.getConfiguredAdapters()) - if num_configured_if >= 2: - if default is True: - png = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/buttons/button_blue.png")) - if default is False: - png = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/buttons/button_blue_off.png")) - res.append(MultiContentEntryPixmapAlphaTest(pos=(10, 5), size=(25, 25), png = png)) - if active is True: - png2 = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/lock_on.png")) - if active is False: - png2 = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/lock_error.png")) - res.append(MultiContentEntryPixmapAlphaTest(pos=(40, 1), size=(25, 25), png = png2)) - return res - - class NetworkAdapterSelection(Screen,HelpableScreen): def __init__(self, session): Screen.__init__(self, session) @@ -91,13 +66,49 @@ class NetworkAdapterSelection(Screen,HelpableScreen): }) self.list = [] - self["list"] = InterfaceList(self.list) + self["list"] = List(self.list) self.updateList() if len(self.adapters) == 1: self.onFirstExecBegin.append(self.okbuttonClick) self.onClose.append(self.cleanup) + def buildInterfaceList(self,iface,name,default,active ): + divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/div-h.png")) + defaultpng = None + activepng = None + description = None + interfacepng = None + + if iface in iNetwork.lan_interfaces: + if active is True: + interfacepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/network_wired-active.png")) + elif active is False: + interfacepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/network_wired-inactive.png")) + else: + interfacepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/network_wired.png")) + elif iface in iNetwork.wlan_interfaces: + if active is True: + interfacepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/network_wireless-active.png")) + elif active is False: + interfacepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/network_wireless-inactive.png")) + else: + interfacepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/network_wireless.png")) + + num_configured_if = len(iNetwork.getConfiguredAdapters()) + if num_configured_if >= 2: + if default is True: + defaultpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/buttons/button_blue.png")) + elif default is False: + defaultpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/buttons/button_blue_off.png")) + if active is True: + activepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/lock_on.png")) + elif active is False: + activepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/lock_error.png")) + + description = iNetwork.getFriendlyAdapterDescription(iface) + + return((iface, name, description, interfacepng, defaultpng, activepng, divpng)) def updateList(self): self.list = [] @@ -122,7 +133,7 @@ class NetworkAdapterSelection(Screen,HelpableScreen): default_gw = result if len(self.adapters) == 0: # no interface available => display only eth0 - self.list.append(InterfaceEntryComponent("eth0",iNetwork.getFriendlyAdapterName('eth0'),True,True )) + self.list.append(self.buildInterfaceList("eth0",iNetwork.getFriendlyAdapterName('eth0'),True,True )) else: for x in self.adapters: if x[1] == default_gw: @@ -133,11 +144,11 @@ class NetworkAdapterSelection(Screen,HelpableScreen): active_int = True else: active_int = False - self.list.append(InterfaceEntryComponent(index = x[1],name = _(x[0]),default=default_int,active=active_int )) + self.list.append(self.buildInterfaceList(x[1],_(x[0]),default_int,active_int )) if os_path.exists(resolveFilename(SCOPE_PLUGINS, "SystemPlugins/NetworkWizard/networkwizard.xml")): self["key_blue"].setText(_("NetworkWizard")) - self["list"].l.setList(self.list) + self["list"].setList(self.list) def setDefaultInterface(self): selection = self["list"].getCurrent() @@ -253,7 +264,7 @@ class NameserverSetup(Screen, ConfigListScreen, HelpableScreen): self.list = [] ConfigListScreen.__init__(self, self.list) self.createSetup() - + def createConfig(self): self.nameservers = iNetwork.getNameserverList() self.nameserverEntries = [ NoSave(ConfigIP(default=nameserver)) for nameserver in self.nameservers] @@ -412,7 +423,7 @@ class AdapterSetup(Screen, ConfigListScreen, HelpableScreen): self.wsconfig = None self.default = None - if self.iface == "wlan0" or self.iface == "ath0" : + if self.iface in iNetwork.wlan_interfaces: from Plugins.SystemPlugins.WirelessLan.Wlan import wpaSupplicant,Wlan self.w = Wlan(self.iface) self.ws = wpaSupplicant() @@ -535,7 +546,7 @@ class AdapterSetup(Screen, ConfigListScreen, HelpableScreen): self.createSetup() if self["config"].getCurrent() == self.gatewayEntry: self.createSetup() - if self.iface == "wlan0" or self.iface == "ath0" : + if self.iface in iNetwork.wlan_interfaces: if self["config"].getCurrent() == self.wlanSSID: self.createSetup() if self["config"].getCurrent() == self.encryptionEnabled: @@ -731,7 +742,7 @@ class AdapterSetupConfiguration(Screen, HelpableScreen): def ok(self): self.cleanup() if self["menulist"].getCurrent()[1] == 'edit': - if self.iface == 'wlan0' or self.iface == 'ath0': + if self.iface in iNetwork.wlan_interfaces: try: from Plugins.SystemPlugins.WirelessLan.plugin import WlanScan from Plugins.SystemPlugins.WirelessLan.iwlibs import Wireless @@ -817,7 +828,7 @@ class AdapterSetupConfiguration(Screen, HelpableScreen): if self["menulist"].getCurrent()[1] == 'dns': self["description"].setText(_("Edit the Nameserver configuration of your Dreambox.\n" ) + self.oktext ) if self["menulist"].getCurrent()[1] == 'scanwlan': - self["description"].setText(_("Scan your network for wireless Access Points and connect to them using your selected wireless device.\n" ) + self.oktext ) + self["description"].setText(_("Scan your network for wireless access points and connect to them using your selected wireless device.\n" ) + self.oktext ) if self["menulist"].getCurrent()[1] == 'wlanstatus': self["description"].setText(_("Shows the state of your wireless LAN connection.\n" ) + self.oktext ) if self["menulist"].getCurrent()[1] == 'lanrestart': @@ -834,7 +845,7 @@ class AdapterSetupConfiguration(Screen, HelpableScreen): self["IF"].setText(iNetwork.getFriendlyAdapterName(self.iface)) self["Statustext"].setText(_("Link:")) - if self.iface == 'wlan0' or self.iface == 'ath0': + if self.iface in iNetwork.wlan_interfaces: try: from Plugins.SystemPlugins.WirelessLan.Wlan import iStatus except: @@ -884,7 +895,7 @@ class AdapterSetupConfiguration(Screen, HelpableScreen): def AdapterSetupClosed(self, *ret): if ret is not None and len(ret): - if ret[0] == 'ok' and (self.iface == 'wlan0' or self.iface == 'ath0') and iNetwork.getAdapterAttribute(self.iface, "up") is True: + if ret[0] == 'ok' and (self.iface in iNetwork.wlan_interfaces) and iNetwork.getAdapterAttribute(self.iface, "up") is True: try: from Plugins.SystemPlugins.WirelessLan.plugin import WlanStatus from Plugins.SystemPlugins.WirelessLan.iwlibs import Wireless @@ -1263,6 +1274,7 @@ class NetworkAdapterTest(Screen): self.nextStepTimer.stop() def layoutFinished(self): + self.setTitle(_("Network test: ") + iNetwork.getFriendlyAdapterName(self.iface) ) self["shortcutsyellow"].setEnabled(False) self["AdapterInfo_OK"].hide() self["NetworkInfo_Check"].hide() @@ -1282,7 +1294,7 @@ class NetworkAdapterTest(Screen): self["AdapterInfo_Text"] = MultiColorLabel(_("Show Info")) self["AdapterInfo_OK"] = Pixmap() - if self.iface == 'wlan0' or self.iface == 'ath0': + if self.iface in iNetwork.wlan_interfaces: self["Networktext"] = MultiColorLabel(_("Wireless Network")) else: self["Networktext"] = MultiColorLabel(_("Local Network")) @@ -1321,7 +1333,7 @@ class NetworkAdapterTest(Screen): self["InfoText"] = Label() def getLinkState(self,iface): - if iface == 'wlan0' or iface == 'ath0': + if iface in iNetwork.wlan_interfaces: try: from Plugins.SystemPlugins.WirelessLan.Wlan import iStatus,Status except: -- cgit v1.2.3 From 283d43dd710131dce4f596ebcc3d65896a7cd860 Mon Sep 17 00:00:00 2001 From: ghost <andreas.monzner@multimedia-labs.de> Date: Fri, 7 May 2010 12:33:19 +0200 Subject: fixed not visible padlock icon in parental control lists this fixes bug #531 --- data/skin_default/Makefile.am | 4 ---- data/skin_default/icons/Makefile.am | 5 ++++- data/skin_default/icons/lock.png | Bin 1729 -> 1053 bytes data/skin_default/icons/lockBouquet.png | Bin 0 -> 1176 bytes data/skin_default/icons/unlock.png | Bin 0 -> 965 bytes data/skin_default/icons/unlockBouquet.png | Bin 0 -> 1141 bytes data/skin_default/lock.png | Bin 1053 -> 0 bytes data/skin_default/lockBouquet.png | Bin 1176 -> 0 bytes data/skin_default/unlock.png | Bin 965 -> 0 bytes data/skin_default/unlockBouquet.png | Bin 1141 -> 0 bytes 10 files changed, 4 insertions(+), 5 deletions(-) create mode 100644 data/skin_default/icons/lockBouquet.png create mode 100644 data/skin_default/icons/unlock.png create mode 100644 data/skin_default/icons/unlockBouquet.png delete mode 100644 data/skin_default/lock.png delete mode 100644 data/skin_default/lockBouquet.png delete mode 100644 data/skin_default/unlock.png delete mode 100644 data/skin_default/unlockBouquet.png (limited to 'data') diff --git a/data/skin_default/Makefile.am b/data/skin_default/Makefile.am index 6038c2e9..30b04f91 100755 --- a/data/skin_default/Makefile.am +++ b/data/skin_default/Makefile.am @@ -33,8 +33,6 @@ dist_install_DATA = \ expanded-plugins.png \ info-bg_mp.png \ info-bg.png \ - lock.png \ - lockBouquet.png \ mediaplayer_bg.png \ mute.png \ nim_active.png \ @@ -55,8 +53,6 @@ dist_install_DATA = \ timeline-now.png \ timeline.png \ unhandled-key.png \ - unlock.png \ - unlockBouquet.png \ verticalline-plugins.png \ vkey_backspace.png \ vkey_bg.png \ diff --git a/data/skin_default/icons/Makefile.am b/data/skin_default/icons/Makefile.am index 088556a6..61c00593 100755 --- a/data/skin_default/icons/Makefile.am +++ b/data/skin_default/icons/Makefile.am @@ -32,6 +32,7 @@ dist_install_DATA = \ lock_off.png \ lock_on.png \ lock.png \ + lockBouquet.png \ marker.png \ mp_buttons.png \ network_wired.png \ @@ -53,4 +54,6 @@ dist_install_DATA = \ scan-c.png \ scan-s.png \ scan-t.png \ - selectioncross.png + selectioncross.png \ + unlock.png \ + unlockBouquet.png diff --git a/data/skin_default/icons/lock.png b/data/skin_default/icons/lock.png index cfee1ba8..d0ae7f64 100644 Binary files a/data/skin_default/icons/lock.png and b/data/skin_default/icons/lock.png differ diff --git a/data/skin_default/icons/lockBouquet.png b/data/skin_default/icons/lockBouquet.png new file mode 100644 index 00000000..d503dd2b Binary files /dev/null and b/data/skin_default/icons/lockBouquet.png differ diff --git a/data/skin_default/icons/unlock.png b/data/skin_default/icons/unlock.png new file mode 100644 index 00000000..bd4486e9 Binary files /dev/null and b/data/skin_default/icons/unlock.png differ diff --git a/data/skin_default/icons/unlockBouquet.png b/data/skin_default/icons/unlockBouquet.png new file mode 100644 index 00000000..c5d146d7 Binary files /dev/null and b/data/skin_default/icons/unlockBouquet.png differ diff --git a/data/skin_default/lock.png b/data/skin_default/lock.png deleted file mode 100644 index d0ae7f64..00000000 Binary files a/data/skin_default/lock.png and /dev/null differ diff --git a/data/skin_default/lockBouquet.png b/data/skin_default/lockBouquet.png deleted file mode 100644 index d503dd2b..00000000 Binary files a/data/skin_default/lockBouquet.png and /dev/null differ diff --git a/data/skin_default/unlock.png b/data/skin_default/unlock.png deleted file mode 100644 index bd4486e9..00000000 Binary files a/data/skin_default/unlock.png and /dev/null differ diff --git a/data/skin_default/unlockBouquet.png b/data/skin_default/unlockBouquet.png deleted file mode 100644 index c5d146d7..00000000 Binary files a/data/skin_default/unlockBouquet.png and /dev/null differ -- cgit v1.2.3 From bea4946ae09bcab368696c50031e29c635017585 Mon Sep 17 00:00:00 2001 From: acid-burn <acid-burn@opendreambox.org> Date: Wed, 12 May 2010 16:03:30 +0200 Subject: RecordTimer.py,RecordingConfig.py,setup.xml: *add possibility to change the default recording filename composition in expert mode. This allows now to have shorter recording filenames (Date-Name) or longer (DateTime-Channel-Name-Shortdescription) beside the default. This fixes #345 --- RecordTimer.py | 8 ++++++++ data/setup.xml | 1 + lib/python/Components/RecordingConfig.py | 6 +++++- 3 files changed, 14 insertions(+), 1 deletion(-) mode change 100644 => 100755 RecordTimer.py mode change 100644 => 100755 data/setup.xml mode change 100644 => 100755 lib/python/Components/RecordingConfig.py (limited to 'data') diff --git a/RecordTimer.py b/RecordTimer.py old mode 100644 new mode 100755 index f670417a..04c3ff12 --- a/RecordTimer.py +++ b/RecordTimer.py @@ -129,6 +129,7 @@ class RecordTimerEntry(timer.TimerEntry, object): def calculateFilename(self): service_name = self.service_ref.getServiceName() begin_date = strftime("%Y%m%d %H%M", localtime(self.begin)) + begin_shortdate = strftime("%Y%m%d", localtime(self.begin)) print "begin_date: ", begin_date print "service_name: ", service_name @@ -138,6 +139,13 @@ class RecordTimerEntry(timer.TimerEntry, object): filename = begin_date + " - " + service_name if self.name: filename += " - " + self.name + if config.usage.setup_level.index >= 2: # expert+ + if config.recording.filename_composition.value == "short": + filename = begin_shortdate + " - " + self.name + elif config.recording.filename_composition.value == "long": + filename = begin_date + " - " + service_name + " - " + self.name + " - " + self.description + else: + filename += " - " + self.name # standard if config.recording.ascii_filenames.value: filename = ASCIItranslit.legacyEncode(filename) diff --git a/data/setup.xml b/data/setup.xml old mode 100644 new mode 100755 index 705eaf33..f5dea734 --- a/data/setup.xml +++ b/data/setup.xml @@ -72,6 +72,7 @@ <item level="2" text="Behavior of 0 key in PiP-mode">config.usage.pip_zero_button</item> <item level="2" text="Alternative services tuner priority">config.usage.alternatives_priority</item> <item level="2" text="Limited character set for recording filenames">config.recording.ascii_filenames</item> + <item level="2" text="Composition of the recording filenames">config.recording.filename_composition</item> </setup> <setup key="harddisk" title="Harddisk setup" > <item level="0" text="Harddisk standby after">config.usage.hdd_standby</item> diff --git a/lib/python/Components/RecordingConfig.py b/lib/python/Components/RecordingConfig.py old mode 100644 new mode 100755 index fe9284d9..40dfb2ca --- a/lib/python/Components/RecordingConfig.py +++ b/lib/python/Components/RecordingConfig.py @@ -1,4 +1,4 @@ -from config import ConfigNumber, ConfigYesNo, ConfigSubsection, config +from config import ConfigNumber, ConfigYesNo, ConfigSubsection, ConfigSelection, config def InitRecordingConfig(): config.recording = ConfigSubsection(); @@ -8,3 +8,7 @@ def InitRecordingConfig(): config.recording.margin_after = ConfigNumber(default=0) config.recording.debug = ConfigYesNo(default = False) config.recording.ascii_filenames = ConfigYesNo(default = False) + config.recording.filename_composition = ConfigSelection(default = "standard", choices = [ + ("standard", _("standard")), + ("short", _("Short filenames")), + ("long", _("Long filenames")) ] ) \ No newline at end of file -- cgit v1.2.3 From 276d3d52d86a1b1701b42b998dd658374431d3b8 Mon Sep 17 00:00:00 2001 From: Fraxinas <andreas.frisch@multimedia-labs.de> Date: Tue, 25 May 2010 10:43:10 +0200 Subject: experimentally merge audio + subtitle streams selection dialogs into one --- data/menu.xml | 1 - data/skin_default.xml | 47 +++++- lib/python/Screens/AudioSelection.py | 308 ++++++++++++++++++++++++++++++++++ lib/python/Screens/InfoBarGenerics.py | 125 +------------- lib/python/Screens/Makefile.am | 6 +- lib/python/Screens/Subtitles.py | 103 ------------ 6 files changed, 359 insertions(+), 231 deletions(-) create mode 100644 lib/python/Screens/AudioSelection.py delete mode 100644 lib/python/Screens/Subtitles.py (limited to 'data') diff --git a/data/menu.xml b/data/menu.xml index b437fbc7..0d874718 100755 --- a/data/menu.xml +++ b/data/menu.xml @@ -17,7 +17,6 @@ <item text="Network setup" entryID="network_setup">self.openSetup("network")</item>--> <!--<item text="CI"><screen module="Ci" screen="CiSelection" /></item>--> <!--<item text="Radio"><code>print "radio mode"</code></item>--> - <item level="0" text="Subtitles" entryID="subtitle_selection" weight="40"><screen module="Subtitles" screen="Subtitles" /></item> <item level="0" text="Timer" entryID="timer_edit"><screen module="TimerEdit" screen="TimerEditList" /></item> <item level="1" text="VCR scart" entryID="scart_switch" requires="ScartSwitch"><code>self.session.scart.VCRSbChanged(3)</code></item> diff --git a/data/skin_default.xml b/data/skin_default.xml index 0114349b..396515e9 100755 --- a/data/skin_default.xml +++ b/data/skin_default.xml @@ -62,8 +62,47 @@ <widget name="statuspic" pixmaps="skin_default/buttons/button_green.png,skin_default/buttons/button_green_off.png" position="130,380" zPosition="10" size="15,16" transparent="1" alphatest="on"/> </screen> <!-- Audio selection --> - <screen name="AudioSelection" position="center,center" size="300,170" title="Audio"> - <widget name="tracks" position="20,10" size="260,150" scrollbarMode="showOnDemand" /> + <screen name="AudioSelection" position="center,center" size="420,330" title="Audio"> + <widget name="config" position="50,10" size="360,110" scrollbarMode="showOnDemand" /> + + <widget source="key_red" render="Pixmap" pixmap="skin_default/buttons/key_red.png" position="10,10" size="35,25" alphatest="on"> + <convert type="ConditionalShowHide" /> + </widget> + <widget source="key_green" render="Pixmap" pixmap="skin_default/buttons/key_green.png" position="10,35" size="35,25" alphatest="on"> + <convert type="ConditionalShowHide" /> + </widget> + <widget source="key_yellow" render="Pixmap" pixmap="skin_default/buttons/key_yellow.png" position="10,60" size="35,25" alphatest="on"> + <convert type="ConditionalShowHide" /> + </widget> + <widget source="key_blue" render="Pixmap" pixmap="skin_default/buttons/key_blue.png" position="10,85" size="35,25" alphatest="on"> + <convert type="ConditionalShowHide" /> + </widget> + + <ePixmap pixmap="skin_default/div-h.png" position="10,112" zPosition="10" size="360,2" /> + + <widget source="streams" render="Listbox" scrollbarMode="showOnDemand" position="10,120" size="400,200" zPosition="3" transparent="1" > + <convert type="TemplatedMultiContent"> + {"templates": + {"default": (25, [ + MultiContentEntryText(pos = (0, 0), size = (35, 25), font = 0, flags = RT_HALIGN_LEFT, text = 1), # key, + MultiContentEntryText(pos = (40, 0), size = (55, 25), font = 0, flags = RT_HALIGN_LEFT, text = 2), # number, + MultiContentEntryText(pos = (100, 0), size = (80, 25), font = 0, flags = RT_HALIGN_LEFT, text = 3), # description, + MultiContentEntryText(pos = (190, 0), size = (140, 25), font = 0, flags = RT_HALIGN_LEFT, text = 4), # language, + MultiContentEntryText(pos = (340, 4), size = (60, 25), font = 1, flags = RT_HALIGN_RIGHT, text = 5), # selection, + ], True, "showNever"), + "notselected": (25, [ + MultiContentEntryText(pos = (0, 0), size = (35, 25), font = 0, flags = RT_HALIGN_LEFT, text = 1), # key, + MultiContentEntryText(pos = (40, 0), size = (55, 25), font = 0, flags = RT_HALIGN_LEFT, text = 2), # number, + MultiContentEntryText(pos = (100, 0), size = (80, 25), font = 0, flags = RT_HALIGN_LEFT, text = 3), # description, + MultiContentEntryText(pos = (190, 0), size = (140, 25), font = 0, flags = RT_HALIGN_LEFT, text = 4), # language, + MultiContentEntryText(pos = (340, 4), size = (60, 25), font = 1, flags = RT_HALIGN_RIGHT, text = 5), # selection, + ], False, "showNever") + }, + "fonts": [gFont("Regular", 20), gFont("Regular", 16)], + "itemHeight": 25 + } + </convert> + </widget> </screen> <!-- Bouquet selector --> <screen name="BouquetSelector" position="center,center" size="300,240" title="Choose bouquet"> @@ -935,9 +974,9 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y())) </widget> </screen> <!-- Subtitle selection --> - <screen name="Subtitles" position="center,center" size="380,285" title="Subtitle selection"> +<!-- <screen name="Subtitles" position="center,center" size="380,285" title="Subtitle selection"> <widget name="config" position="10,10" zPosition="1" size="360,275" scrollbarMode="showOnDemand" /> - </screen> + </screen>--> <!-- Subtitle area --> <screen name="SubtitleDisplay" position="0,0" size="720,576" zPosition="-1" flags="wfNoBorder" backgroundColor="transparent" /> <!-- TextBox --> diff --git a/lib/python/Screens/AudioSelection.py b/lib/python/Screens/AudioSelection.py new file mode 100644 index 00000000..b97c25b2 --- /dev/null +++ b/lib/python/Screens/AudioSelection.py @@ -0,0 +1,308 @@ +from Screen import Screen +from Components.ServiceEventTracker import ServiceEventTracker +from Components.ActionMap import ActionMap +from Components.ConfigList import ConfigListScreen +from Components.ChoiceList import ChoiceList, ChoiceEntryComponent +from Components.config import config, ConfigSubsection, getConfigListEntry, ConfigNothing, ConfigSelection, ConfigOnOff +from Components.MultiContent import MultiContentEntryText +from Components.Sources.List import List +from Components.Sources.Boolean import Boolean +from Components.SystemInfo import SystemInfo + +from enigma import iPlayableService + +from Tools.ISO639 import LanguageCodes +from Tools.BoundFunction import boundFunction +FOCUS_CONFIG, FOCUS_STREAMS = range(2) + +class AudioSelection(Screen, ConfigListScreen): + def __init__(self, session, infobar=None): + Screen.__init__(self, session) + + self["streams"] = List([]) + self["key_red"] = Boolean(False) + self["key_green"] = Boolean(False) + self["key_yellow"] = Boolean(True) + self["key_blue"] = Boolean(False) + + ConfigListScreen.__init__(self, []) + self.infobar = infobar or self.session.infobar + + self.__event_tracker = ServiceEventTracker(screen=self, eventmap= + { + iPlayableService.evUpdatedInfo: self.__updatedInfo + }) + self.cached_subtitle_checked = False + self.__selected_subtitle = None + + self["actions"] = ActionMap(["ColorActions", "SetupActions", "DirectionActions"], + { + "red": self.keyRed, + "green": self.keyGreen, + "yellow": self.keyYellow, + "blue": self.keyBlue, + "ok": self.keyOk, + "cancel": self.cancel, + "up": self.keyUp, + "down": self.keyDown, + }, -3) + + self.settings = ConfigSubsection() + choicelist = [("audio",_("audio tracks")), ("subtitles",_("Subtitles"))] + self.settings.menupage = ConfigSelection(choices = choicelist) + self.settings.menupage.addNotifier(self.fillList) + self.onLayoutFinish.append(self.__layoutFinished) + + def __layoutFinished(self): + self["config"].instance.setSelectionEnable(False) + self.focus = FOCUS_STREAMS + + def fillList(self, arg=None): + streams = [] + conflist = [] + selectedidx = 0 + + service = self.session.nav.getCurrentService() + self.audioTracks = audio = service and service.audioTracks() + n = audio and audio.getNumberOfTracks() or 0 + + if self.settings.menupage.getValue() == "audio": + self.setTitle(_("Select audio track")) + if SystemInfo["CanDownmixAC3"]: + print "config.av.downmix_ac3.value=", config.av.downmix_ac3.value + self.settings.downmix = ConfigOnOff(default=config.av.downmix_ac3.value) + self.settings.downmix.addNotifier(self.changeAC3Downmix, initial_call = False) + conflist.append(getConfigListEntry(_("AC3 downmix"), self.settings.downmix)) + self["key_red"] = Boolean(True) + + if n > 0: + self.audioChannel = service.audioChannel() + print "self.audioChannel.getCurrentChannel()", self.audioChannel.getCurrentChannel() + choicelist = [("0",_("left")), ("1",_("stereo")), ("2", _("right"))] + self.settings.channelmode = ConfigSelection(choices = choicelist, default = str(self.audioChannel.getCurrentChannel())) + self.settings.channelmode.addNotifier(self.changeMode, initial_call = False) + conflist.append(getConfigListEntry(_("Channel"), self.settings.channelmode)) + self["key_green"] = Boolean(True) + + selectedAudio = self.audioTracks.getCurrentTrack() + print "selectedAudio:", selectedAudio + + for x in range(n): + number = str(x) + i = audio.getTrackInfo(x) + languages = i.getLanguage().split('/') + description = i.getDescription() or _("<unknown>") + selected = "" + language = "" + + if selectedAudio == x: + selected = _("Running") + selectedidx = x + + cnt = 0 + for lang in languages: + if cnt: + language += ' / ' + if LanguageCodes.has_key(lang): + language += LanguageCodes[lang][0] + elif lang == "und": + _("<unknown>") + else: + language += lang + cnt += 1 + + streams.append((x, "", number, description, language, selected)) + + #if hasattr(self, "runPlugin"): + #class PluginCaller: + #def __init__(self, fnc, *args): + #self.fnc = fnc + #self.args = args + #def __call__(self, *args, **kwargs): + #self.fnc(*self.args) + + #Plugins = [ (p.name, PluginCaller(self.runPlugin, p)) for p in plugins.getPlugins(where = PluginDescriptor.WHERE_AUDIOMENU) ] + + #for p in Plugins: + #selection += 1 + #flist.append((p[0], "CALLFUNC", p[1])) + #if availableKeys: + #usedKeys.append(availableKeys[0]) + #del availableKeys[0] + #else: + #usedKeys.append("") + else: + streams = [(None, "", "", _("none"), "")] + + elif self.settings.menupage.getValue() == "subtitles": + self.setTitle(_("Subtitle selection")) + + self.settings.dummy = ConfigNothing() + conflist.append(getConfigListEntry("", self.settings.dummy)) + conflist.append(getConfigListEntry("", self.settings.dummy)) + + if self.subtitlesEnabled(): + sel = self.infobar.selected_subtitle + else: + sel = None + + idx = 0 + + subtitlelist = self.getSubtitleList() + + if len(subtitlelist): + for x in subtitlelist: + number = str(x[1]) + description = "?" + language = _("<unknown>") + selected = "" + + if sel and x[:4] == sel[:4]: + selected = _("Running") + selectedidx = idx + + if x[4] != "und": + if LanguageCodes.has_key(x[4]): + language = LanguageCodes[x[4]][0] + else: + language = x[4] + + if x[0] == 0: + description = "DVB" + number = "%x" % (x[1]) + + elif x[0] == 1: + description = "TTX" + number = "%x%02x" % (x[3],x[2]) + + elif x[0] == 2: + types = (" UTF-8 text "," SSA / AAS "," .SRT file ") + description = types[x[2]] + + streams.append((x, "", number, description, language, selected)) + idx += 1 + + else: + streams = [(None, "", "", _("none"), "")] + + conflist.append(getConfigListEntry(_("Menu"), self.settings.menupage)) + self["config"].list = conflist + self["config"].l.setList(conflist) + + self["streams"].list = streams + self["streams"].setIndex(selectedidx) + + def __updatedInfo(self): + self.fillList() + + def getSubtitleList(self): + s = self.infobar and self.infobar.getCurrentServiceSubtitle() + l = s and s.getSubtitleList() or [ ] + return l + + def subtitlesEnabled(self): + return self.infobar.subtitles_enabled + + def enableSubtitle(self, subtitles): + print "[enableSubtitle]", subtitles + if self.infobar.selected_subtitle != subtitles: + self.infobar.subtitles_enabled = False + self.infobar.selected_subtitle = subtitles + if subtitles: + self.infobar.subtitles_enabled = True + + def changeAC3Downmix(self, downmix): + print "changeAC3Downmix config.av.downmix_ac3.value=", config.av.downmix_ac3.value, downmix.getValue() + if downmix.getValue() == True: + config.av.downmix_ac3.value = True + else: + config.av.downmix_ac3.value = False + config.av.downmix_ac3.save() + + def changeMode(self, mode): + print "changeMode", mode, mode.getValue() + if mode is not None: + self.audioChannel.selectChannel(int(mode.getValue())) + + def changeAudio(self, audio): + print "changeAudio", audio, "self.session.nav.getCurrentService().audioTracks().getNumberOfTracks():", self.session.nav.getCurrentService().audioTracks().getNumberOfTracks() + track = int(audio) + if isinstance(track, int): + if self.session.nav.getCurrentService().audioTracks().getNumberOfTracks() > track: + self.audioTracks.selectTrack(track) + + def keyLeft(self): + if self.focus == FOCUS_CONFIG: + ConfigListScreen.keyLeft(self) + elif self.focus == FOCUS_STREAMS: + self["streams"].setIndex(0) + + def keyRight(self): + if self.focus == FOCUS_CONFIG: + ConfigListScreen.keyRight(self) + elif self.focus == FOCUS_STREAMS and self["streams"].count(): + self["streams"].setIndex(self["streams"].count()-1) + + def keyRed(self): + self.colorkey(0) + + def keyGreen(self): + self.colorkey(1) + + def keyYellow(self): + self.colorkey(2) + + def keyBlue(self): + pass + + def colorkey(self, idx): + self["config"].setCurrentIndex(idx) + ConfigListScreen.keyRight(self) + + def keyUp(self): + print "[keyUp]", self["streams"].getIndex() + if self.focus == FOCUS_CONFIG: + self["config"].instance.moveSelection(self["config"].instance.moveUp) + elif self.focus == FOCUS_STREAMS: + if self["streams"].getIndex() == 0: + self["config"].instance.setSelectionEnable(True) + self["streams"].style = "notselected" + self["config"].setCurrentIndex(len(self["config"].getList())-1) + self.focus = FOCUS_CONFIG + else: + self["streams"].selectPrevious() + + def keyDown(self): + print "[keyDown]", self["config"].getCurrentIndex(), len(self["config"].getList())-1 + if self.focus == FOCUS_CONFIG: + if self["config"].getCurrentIndex() < len(self["config"].getList())-1: + self["config"].instance.moveSelection(self["config"].instance.moveDown) + else: + self["config"].instance.setSelectionEnable(False) + self["streams"].style = "default" + self.focus = FOCUS_STREAMS + elif self.focus == FOCUS_STREAMS: + self["streams"].selectNext() + + def keyOk(self): + print "[keyok]", self["streams"].list, self["streams"].getCurrent() + if self.focus == FOCUS_STREAMS and self["streams"].list: + cur = self["streams"].getCurrent() + if self.settings.menupage.getValue() == "audio" and cur[0]: + self.changeAudio(cur[2]) + self.__updatedInfo() + if self.settings.menupage.getValue() == "subtitles" and cur[0]: + if self.infobar.selected_subtitle == cur[0]: + self.enableSubtitle(None) + selectedidx = self["streams"].getIndex() + self.__updatedInfo() + self["streams"].setIndex(selectedidx) + else: + self.enableSubtitle(cur[0]) + self.__updatedInfo() + #self.close() + elif self.focus == FOCUS_CONFIG: + self.keyRight() + + def cancel(self): + self.close() diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py index 1c577eec..6fa89112 100644 --- a/lib/python/Screens/InfoBarGenerics.py +++ b/lib/python/Screens/InfoBarGenerics.py @@ -1673,126 +1673,11 @@ class InfoBarAudioSelection: }) def audioSelection(self): - service = self.session.nav.getCurrentService() - self.audioTracks = audio = service and service.audioTracks() - n = audio and audio.getNumberOfTracks() or 0 - tlist = [] - if n > 0: - self.audioChannel = service.audioChannel() - - idx = 0 - while idx < n: - cnt = 0 - i = audio.getTrackInfo(idx) - languages = i.getLanguage().split('/') - description = i.getDescription() - language = "" - - for lang in languages: - if cnt: - language += ' / ' - if LanguageCodes.has_key(lang): - language += LanguageCodes[lang][0] - else: - language += lang - cnt += 1 - - if len(description): - description += " (" + language + ")" - else: - description = language - - tlist.append((description, idx)) - idx += 1 - - tlist.sort(key=lambda x: x[0]) - - selectedAudio = self.audioTracks.getCurrentTrack() - - selection = 0 - - for x in tlist: - if x[1] != selectedAudio: - selection += 1 - else: - break - - availableKeys = [] - usedKeys = [] - - if SystemInfo["CanDownmixAC3"]: - flist = [(_("AC3 downmix") + " - " +(_("Off"), _("On"))[config.av.downmix_ac3.value and 1 or 0], "CALLFUNC", self.changeAC3Downmix), - ((_("Left"), _("Stereo"), _("Right"))[self.audioChannel.getCurrentChannel()], "mode")] - usedKeys.extend(["red", "green"]) - availableKeys.extend(["yellow", "blue"]) - selection += 2 - else: - flist = [((_("Left"), _("Stereo"), _("Right"))[self.audioChannel.getCurrentChannel()], "mode")] - usedKeys.extend(["red"]) - availableKeys.extend(["green", "yellow", "blue"]) - selection += 1 - - if hasattr(self, "runPlugin"): - class PluginCaller: - def __init__(self, fnc, *args): - self.fnc = fnc - self.args = args - def __call__(self, *args, **kwargs): - self.fnc(*self.args) - - Plugins = [ (p.name, PluginCaller(self.runPlugin, p)) for p in plugins.getPlugins(where = PluginDescriptor.WHERE_AUDIOMENU) ] - - for p in Plugins: - selection += 1 - flist.append((p[0], "CALLFUNC", p[1])) - if availableKeys: - usedKeys.append(availableKeys[0]) - del availableKeys[0] - else: - usedKeys.append("") - - flist.append(("--", "")) - usedKeys.append("") - selection += 1 - - keys = usedKeys + [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "0" ] + [""] * n - self.session.openWithCallback(self.audioSelected, ChoiceBox, title=_("Select audio track"), list = flist + tlist, selection = selection, keys = keys, skin_name = "AudioTrackSelection") - else: - del self.audioTracks - - def changeAC3Downmix(self, arg): - choicelist = self.session.current_dialog["list"] - list = choicelist.list - t = list[0][1] - list[0][1]=(t[0], t[1], t[2], t[3], t[4], t[5], t[6], - _("AC3 downmix") + " - " + (_("On"), _("Off"))[config.av.downmix_ac3.value and 1 or 0]) - choicelist.setList(list) - if config.av.downmix_ac3.value: - config.av.downmix_ac3.value = False - else: - config.av.downmix_ac3.value = True - config.av.downmix_ac3.save() - - def audioSelected(self, audio): - if audio is not None: - if isinstance(audio[1], str): - if audio[1] == "mode": - keys = ["red", "green", "yellow"] - selection = self.audioChannel.getCurrentChannel() - tlist = ((_("left"), 0), (_("stereo"), 1), (_("right"), 2)) - self.session.openWithCallback(self.modeSelected, ChoiceBox, title=_("Select audio mode"), list = tlist, selection = selection, keys = keys, skin_name ="AudioModeSelection") - else: - del self.audioChannel - if self.session.nav.getCurrentService().audioTracks().getNumberOfTracks() > audio[1]: - self.audioTracks.selectTrack(audio[1]) - else: - del self.audioChannel - del self.audioTracks - - def modeSelected(self, mode): - if mode is not None: - self.audioChannel.selectChannel(mode[1]) - del self.audioChannel + from Screens.AudioSelection import AudioSelection + self.session.openWithCallback(self.audioSelected, AudioSelection, infobar=self) + + def audioSelected(self, ret=None): + print "[infobar::audioSelected]", ret class InfoBarSubserviceSelection: def __init__(self): diff --git a/lib/python/Screens/Makefile.am b/lib/python/Screens/Makefile.am index d96b491e..5cec5127 100755 --- a/lib/python/Screens/Makefile.am +++ b/lib/python/Screens/Makefile.am @@ -1,13 +1,13 @@ installdir = $(pkglibdir)/python/Screens install_PYTHON = \ - ChannelSelection.py ClockDisplay.py ConfigMenu.py InfoBar.py Menu.py \ - MessageBox.py Screen.py ServiceScan.py TimerEdit.py \ + AudioSelection.py ChannelSelection.py ClockDisplay.py ConfigMenu.py InfoBar.py \ + Menu.py MessageBox.py Screen.py ServiceScan.py TimerEdit.py \ MovieSelection.py Setup.py About.py HarddiskSetup.py FixedMenu.py \ Satconfig.py ScanSetup.py NetworkSetup.py Ci.py TimerEntry.py Volume.py \ EpgSelection.py EventView.py Mute.py Standby.py ServiceInfo.py \ InfoBarGenerics.py HelpMenu.py Wizard.py __init__.py \ - Dish.py LanguageSelection.py StartWizard.py PiPSetup.py Subtitles.py \ + Dish.py LanguageSelection.py StartWizard.py PiPSetup.py \ TutorialWizard.py PluginBrowser.py MinuteInput.py Scart.py PVRState.py \ Console.py InputBox.py ChoiceBox.py SimpleSummary.py \ TimerSelection.py PictureInPicture.py TimeDateInput.py \ diff --git a/lib/python/Screens/Subtitles.py b/lib/python/Screens/Subtitles.py deleted file mode 100644 index 9ba7e0a5..00000000 --- a/lib/python/Screens/Subtitles.py +++ /dev/null @@ -1,103 +0,0 @@ -from Screen import Screen -from Components.ServiceEventTracker import ServiceEventTracker -from Components.ActionMap import ActionMap -from Components.ConfigList import ConfigListScreen -from Components.config import config, getConfigListEntry, ConfigNothing -from enigma import iPlayableService - -from Tools.ISO639 import LanguageCodes - -class Subtitles(Screen, ConfigListScreen): - def __init__(self, session, infobar=None): - Screen.__init__(self, session) - - self["actions"] = ActionMap(["SetupActions"], - { - "ok": self.ok, - "cancel": self.cancel, - }, -2) - - self.list = [] - ConfigListScreen.__init__(self, self.list) - self.infobar = infobar or self.session.infobar - self.fillList() - - self.__event_tracker = ServiceEventTracker(screen=self, eventmap= - { - iPlayableService.evUpdatedInfo: self.__updatedInfo - }) - self.cached_subtitle_checked = False - self.__selected_subtitle = None - - def fillList(self): - list = self.list - del list[:] - print "self.list", list - if self.subtitlesEnabled(): - list.append(getConfigListEntry(_("Disable Subtitles"), ConfigNothing(), None)) - sel = self.infobar.selected_subtitle - else: - sel = None - for x in self.getSubtitleList(): - if sel and sel[:4] == x[:4]: #ignore Language code in compare - text = _("Running") - else: - text = _("Enable") - if x[0] == 0: - if LanguageCodes.has_key(x[4]): - list.append(getConfigListEntry(text+" DVB "+LanguageCodes[x[4]][0], ConfigNothing(), x)) - else: - list.append(getConfigListEntry(text+" DVB "+x[4], ConfigNothing(), x)) - elif x[0] == 1: - if x[4] == 'und': #undefined - list.append(getConfigListEntry(text+" TTX "+_("Page")+" %x%02x"%(x[3],x[2]), ConfigNothing(), x)) - else: - if LanguageCodes.has_key(x[4]): - list.append(getConfigListEntry(text+" TTX "+_("Page")+" %x%02x"%(x[3],x[2])+" "+LanguageCodes[x[4]][0], ConfigNothing(), x)) - else: - list.append(getConfigListEntry(text+" TTX "+_("Page")+" %x%02x"%(x[3],x[2])+" "+x[4], ConfigNothing(), x)) - elif x[0] == 2: - types = (" UTF-8 text "," SSA / AAS "," .SRT file ") - if x[4] == 'und': #undefined - list.append(getConfigListEntry(text+types[x[2]]+_("Subtitles")+" %d" % x[1], ConfigNothing(), x)) - else: - if LanguageCodes.has_key(x[4]): - list.append(getConfigListEntry(text+types[x[2]]+_("Subtitles") + ' ' + LanguageCodes[x[4]][0], ConfigNothing(), x)) - else: - list.append(getConfigListEntry(text+types[x[2]]+_("Subtitles")+" %d " % x[1] +x[4], ConfigNothing(), x)) -# return _("Disable subtitles") - self["config"].list = list - self["config"].l.setList(list) - - def __updatedInfo(self): - self.fillList() - - def getSubtitleList(self): - s = self.infobar and self.infobar.getCurrentServiceSubtitle() - l = s and s.getSubtitleList() or [ ] - return l - - def subtitlesEnabled(self): - return self.infobar.subtitles_enabled - - def enableSubtitle(self, subtitles): - if self.infobar.selected_subtitle != subtitles: - self.infobar.subtitles_enabled = False - self.infobar.selected_subtitle = subtitles - if subtitles: - self.infobar.subtitles_enabled = True - - def keyLeft(self): - ConfigListScreen.keyLeft(self) - - def keyRight(self): - ConfigListScreen.keyRight(self) - - def ok(self): - if self.list: - cur = self["config"].getCurrent() - self.enableSubtitle(cur[2]) - self.close(1) - - def cancel(self): - self.close() -- cgit v1.2.3 From 05b454322d04bc7fa35e5a05fcdebba7fa8e942a Mon Sep 17 00:00:00 2001 From: Fraxinas <andreas.frisch@multimedia-labs.de> Date: Wed, 2 Jun 2010 15:03:52 +0200 Subject: Extend AudioSelection width, fix mediaplayer subtitle selection key --- data/skin_default.xml | 24 +++++++++--------- .../Plugins/Extensions/MediaPlayer/plugin.py | 8 +++--- lib/python/Screens/AudioSelection.py | 29 ++++++++++++++-------- 3 files changed, 35 insertions(+), 26 deletions(-) (limited to 'data') diff --git a/data/skin_default.xml b/data/skin_default.xml index 9fb2fc27..ea0e29f2 100755 --- a/data/skin_default.xml +++ b/data/skin_default.xml @@ -62,8 +62,8 @@ <widget name="statuspic" pixmaps="skin_default/buttons/button_green.png,skin_default/buttons/button_green_off.png" position="130,380" zPosition="10" size="15,16" transparent="1" alphatest="on"/> </screen> <!-- Audio selection --> - <screen name="AudioSelection" position="center,center" size="420,330" title="Audio"> - <widget name="config" position="50,10" size="360,110" scrollbarMode="showOnDemand" /> + <screen name="AudioSelection" position="center,center" size="560,330" title="Audio"> + <widget name="config" position="50,10" size="500,110" scrollbarMode="showOnDemand" /> <widget source="key_red" render="Pixmap" pixmap="skin_default/buttons/key_red.png" position="10,10" size="35,25" alphatest="on"> <convert type="ConditionalShowHide" /> @@ -78,24 +78,24 @@ <convert type="ConditionalShowHide" /> </widget> - <ePixmap pixmap="skin_default/div-h.png" position="10,112" zPosition="10" size="360,2" /> + <ePixmap pixmap="skin_default/div-h.png" position="10,112" zPosition="10" size="540,2" /> - <widget source="streams" render="Listbox" scrollbarMode="showOnDemand" position="10,120" size="400,200" zPosition="3" transparent="1" > + <widget source="streams" render="Listbox" scrollbarMode="showOnDemand" position="10,120" size="540,200" zPosition="3" transparent="1" > <convert type="TemplatedMultiContent"> {"templates": {"default": (25, [ MultiContentEntryText(pos = (0, 0), size = (35, 25), font = 0, flags = RT_HALIGN_LEFT, text = 1), # key, - MultiContentEntryText(pos = (40, 0), size = (55, 25), font = 0, flags = RT_HALIGN_LEFT, text = 2), # number, - MultiContentEntryText(pos = (100, 0), size = (80, 25), font = 0, flags = RT_HALIGN_LEFT, text = 3), # description, - MultiContentEntryText(pos = (190, 0), size = (140, 25), font = 0, flags = RT_HALIGN_LEFT, text = 4), # language, - MultiContentEntryText(pos = (340, 4), size = (60, 25), font = 1, flags = RT_HALIGN_RIGHT, text = 5), # selection, + MultiContentEntryText(pos = (40, 0), size = (60, 25), font = 0, flags = RT_HALIGN_LEFT, text = 2), # number, + MultiContentEntryText(pos = (110, 0), size = (120, 25), font = 0, flags = RT_HALIGN_LEFT, text = 3), # description, + MultiContentEntryText(pos = (240, 0), size = (210, 25), font = 0, flags = RT_HALIGN_LEFT, text = 4), # language, + MultiContentEntryText(pos = (460, 4), size = (80, 25), font = 1, flags = RT_HALIGN_RIGHT, text = 5), # selection, ], True, "showNever"), "notselected": (25, [ MultiContentEntryText(pos = (0, 0), size = (35, 25), font = 0, flags = RT_HALIGN_LEFT, text = 1), # key, - MultiContentEntryText(pos = (40, 0), size = (55, 25), font = 0, flags = RT_HALIGN_LEFT, text = 2), # number, - MultiContentEntryText(pos = (100, 0), size = (80, 25), font = 0, flags = RT_HALIGN_LEFT, text = 3), # description, - MultiContentEntryText(pos = (190, 0), size = (140, 25), font = 0, flags = RT_HALIGN_LEFT, text = 4), # language, - MultiContentEntryText(pos = (340, 4), size = (60, 25), font = 1, flags = RT_HALIGN_RIGHT, text = 5), # selection, + MultiContentEntryText(pos = (40, 0), size = (60, 25), font = 0, flags = RT_HALIGN_LEFT, text = 2), # number, + MultiContentEntryText(pos = (110, 0), size = (120, 25), font = 0, flags = RT_HALIGN_LEFT, text = 3), # description, + MultiContentEntryText(pos = (240, 0), size = (210, 25), font = 0, flags = RT_HALIGN_LEFT, text = 4), # language, + MultiContentEntryText(pos = (460, 4), size = (80, 25), font = 1, flags = RT_HALIGN_RIGHT, text = 5), # selection, ], False, "showNever") }, "fonts": [gFont("Regular", 20), gFont("Regular", 16)], diff --git a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py index 0fc78fb1..15806e8c 100755 --- a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py +++ b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py @@ -901,11 +901,11 @@ class MediaPlayer(Screen, InfoBarBase, InfoBarSeek, InfoBarAudioSelection, InfoB def unPauseService(self): self.setSeekState(self.SEEK_STATE_PLAY) - + def subtitleSelection(self): - from Screens.Subtitles import Subtitles - self.session.open(Subtitles, self) - + from Screens.AudioSelection import SubtitleSelection + self.session.open(SubtitleSelection, self) + def hotplugCB(self, dev, media_state): if dev == harddiskmanager.getCD(): if media_state == "1": diff --git a/lib/python/Screens/AudioSelection.py b/lib/python/Screens/AudioSelection.py index 2cae1de9..2dd6ad90 100644 --- a/lib/python/Screens/AudioSelection.py +++ b/lib/python/Screens/AudioSelection.py @@ -14,9 +14,10 @@ from enigma import iPlayableService from Tools.ISO639 import LanguageCodes from Tools.BoundFunction import boundFunction FOCUS_CONFIG, FOCUS_STREAMS = range(2) +[PAGE_AUDIO, PAGE_SUBTITLES] = ["audio", "subtitles"] class AudioSelection(Screen, ConfigListScreen): - def __init__(self, session, infobar=None): + def __init__(self, session, infobar=None, page=PAGE_AUDIO): Screen.__init__(self, session) self["streams"] = List([]) @@ -48,8 +49,8 @@ class AudioSelection(Screen, ConfigListScreen): }, -3) self.settings = ConfigSubsection() - choicelist = [("audio",_("audio tracks")), ("subtitles",_("Subtitles"))] - self.settings.menupage = ConfigSelection(choices = choicelist) + choicelist = [(PAGE_AUDIO,_("audio tracks")), (PAGE_SUBTITLES,_("Subtitles"))] + self.settings.menupage = ConfigSelection(choices = choicelist, default=page) self.settings.menupage.addNotifier(self.fillList) self.onLayoutFinish.append(self.__layoutFinished) @@ -66,7 +67,7 @@ class AudioSelection(Screen, ConfigListScreen): self.audioTracks = audio = service and service.audioTracks() n = audio and audio.getNumberOfTracks() or 0 - if self.settings.menupage.getValue() == "audio": + if self.settings.menupage.getValue() == PAGE_AUDIO: self.setTitle(_("Select audio track")) if SystemInfo["CanDownmixAC3"]: print "config.av.downmix_ac3.value=", config.av.downmix_ac3.value @@ -115,8 +116,11 @@ class AudioSelection(Screen, ConfigListScreen): else: streams = [] + self.settings.dummy = ConfigNothing() + conflist.append(getConfigListEntry("", self.settings.dummy)) + self["key_green"].setBoolean(False) - elif self.settings.menupage.getValue() == "subtitles": + elif self.settings.menupage.getValue() == PAGE_SUBTITLES: self.setTitle(_("Subtitle selection")) self.settings.dummy = ConfigNothing() @@ -158,9 +162,9 @@ class AudioSelection(Screen, ConfigListScreen): elif x[0] == 1: description = "TTX" number = "%x%02x" % (x[3],x[2]) - + elif x[0] == 2: - types = (" UTF-8 text "," SSA / AAS "," .SRT file ") + types = ("UTF-8 text","SSA / AAS",".SRT file") description = types[x[2]] streams.append((x, "", number, description, language, selected)) @@ -252,7 +256,7 @@ class AudioSelection(Screen, ConfigListScreen): ConfigListScreen.keyRight(self) elif hasattr(self, "plugincallfunc"): self.plugincallfunc() - if self.focus == FOCUS_STREAMS and self["streams"].count(): + if self.focus == FOCUS_STREAMS and self["streams"].count() and config == False: self["streams"].setIndex(self["streams"].count()-1) def keyRed(self): @@ -305,10 +309,10 @@ class AudioSelection(Screen, ConfigListScreen): print "[keyok]", self["streams"].list, self["streams"].getCurrent() if self.focus == FOCUS_STREAMS and self["streams"].list: cur = self["streams"].getCurrent() - if self.settings.menupage.getValue() == "audio" and cur[0] is not None: + if self.settings.menupage.getValue() == PAGE_AUDIO and cur[0] is not None: self.changeAudio(cur[2]) self.__updatedInfo() - if self.settings.menupage.getValue() == "subtitles" and cur[0] is not None: + if self.settings.menupage.getValue() == PAGE_SUBTITLES and cur[0] is not None: if self.infobar.selected_subtitle == cur[0]: self.enableSubtitle(None) selectedidx = self["streams"].getIndex() @@ -323,3 +327,8 @@ class AudioSelection(Screen, ConfigListScreen): def cancel(self): self.close(0) + +class SubtitleSelection(AudioSelection): + def __init__(self, session, infobar=None): + AudioSelection.__init__(self, session, infobar, page=PAGE_SUBTITLES) + self.skinName = ["AudioSelection"] -- cgit v1.2.3 From c95ebd0688c39d4fa6e22e85d84fe7d80e3da013 Mon Sep 17 00:00:00 2001 From: ghost <andreas.monzner@multimedia-labs.de> Date: Tue, 8 Jun 2010 14:28:29 +0200 Subject: update unicable stuff (by adenin) --- data/Makefile.am | 3 +- data/unicable.xml | 172 ++++++++++++++++++++++++++++++++++ lib/dvb/frontend.cpp | 91 +++++++++--------- lib/dvb/frontend.h | 8 +- lib/dvb/idvb.h | 5 +- lib/dvb/sec.cpp | 82 +++++++++++++--- lib/dvb/sec.h | 13 ++- lib/python/Components/NimManager.py | 182 ++++++++++++++++++++++++------------ lib/python/Components/config.py | 3 +- lib/python/Screens/Satconfig.py | 15 ++- 10 files changed, 444 insertions(+), 130 deletions(-) create mode 100644 data/unicable.xml (limited to 'data') diff --git a/data/Makefile.am b/data/Makefile.am index 67f2ad25..fcc29a8d 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -14,4 +14,5 @@ dist_pkgdata_DATA = \ skin_default.xml \ skin.xml \ startwizard.xml \ - tutorialwizard.xml + tutorialwizard.xml \ + unicable.xml diff --git a/data/unicable.xml b/data/unicable.xml new file mode 100644 index 00000000..33951d7f --- /dev/null +++ b/data/unicable.xml @@ -0,0 +1,172 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<unicable version="20100522"> +<!-- +structur of tree +unicable (version) + | + |\ + | \ + | lnb + | | + | |\ + | | \ + | | manufacturer (name) + | | |\ + | | | \ + | | | product (name, position, sc11-scr8. lofl, lofh, loft) + | | | + | | |\ + | | | \ + | | | product + | | + | |\ + | | \ + | | manufacturer + | | |\ + | | | \ + | | | product + | | | + | | |\ + | | | \ + | | | product + | + \ + \ + matrix + | + |\ + | \ + | manufacturer + | |\ + | | \ + | | product + | | + | |\ + | | \ + | | product + | + |\ + | \ + | manufacturer + | |\ + | | \ + | | product + | | + | |\ + | | \ + | | product + +--> + + <lnb> + <manufacturer name="DUR-line"> + <product name="Unicable LNB" scr1="1210" scr2="1420" scr3="1680" scr4="2040"/> + </manufacturer> + <manufacturer name="G-STAR"> + <product name="GS-404-L1" scr1="1280" scr2="1382" scr3="1484"/> + <product name="GS-406-L1" scr1="1280" scr2="1382" scr3="1484" scr4="1586" scr5="1688" scr6="1790"/> + </manufacturer> + <manufacturer name="Humax"> + <product name="150 SCR" scr1="1210" scr2="1420" scr3="1680" scr4="2040"/> + </manufacturer> + <manufacturer name="Inverto"> + <product name="IDLP-40UNIQD+S" scr1="1680" scr2="1420" scr3="2040" scr4="1210"/> + <product name="IDLB-QUDL-UNI2L-OPP" scr1="1210" scr2="1420" scr3="1680" scr4="2040"/> + </manufacturer> + <manufacturer name="Kathrein"> + <product name="UAS481" lofl="10200" lofh="10200" scr1="1400" scr2="1516" scr3="1632" scr4="1748"/> + </manufacturer> + <manufacturer name="Kreiling"> + <product name="KR1440" scr1="1680" scr2="1420" scr3="2040" scr4="1210"/> + </manufacturer> + <manufacturer name="Radix"> + <product name="Unicable LNB" scr1="1680" scr2="1420" scr3="2040" scr4="1210"/> + </manufacturer> + <manufacturer name="Wisi"> + <product name="OC 05" scr1="1210" scr2="1420" scr3="1680" scr4="2040"/> + </manufacturer> + </lnb> + <matrix> + <manufacturer name="Ankaro"> + <product name="UCS 51440" scr1="1400" scr2="1632" scr3="1284" scr4="1516"/> + <product name="UCS 51820" scr1="1400" scr2="1632" scr3="1284" scr4="1516" scr5="1864" scr6="2096" scr7="1748" scr8="1980"/> + <product name="UCS 51840" scr1="1400" scr2="1632" scr3="1284" scr4="1516" scr5="1864" scr6="2096" scr7="1748" scr8="1980"/> + <product name="UCS 52240" scr1="1400" scr2="1632"/> + <product name="UCS 52420" scr1="1400" scr2="1632" scr3="1284" scr4="1516"/> + <product name="UCS 52440" scr1="1400" scr2="1632" scr3="1284" scr4="1516"/> + <product name="UCS 91440" positions="2" scr1="1400" scr2="1632" scr3="1284" scr4="1516"/> + <product name="UCS 91820" positions="2" scr1="1400" scr2="1632" scr3="1284" scr4="1516" scr5="1864" scr6="2096" scr7="1748" scr8="1980"/> + <product name="UCS 91840" positions="2" scr1="1400" scr2="1632" scr3="1284" scr4="1516" scr5="1864" scr6="2096" scr7="1748" scr8="1980"/> + <product name="UCS 92240" positions="2" scr1="1400" scr2="1632"/> + <product name="UCS 92420" positions="2" scr1="1400" scr2="1632" scr3="1284" scr4="1516"/> + <product name="UCS 92440" positions="2" scr1="1400" scr2="1632" scr3="1284" scr4="1516"/> + </manufacturer> + <manufacturer name="DCT Delta"> + <product name="SUM518" scr1="1284" scr2="1400" scr3="1516" scr4="1632" scr5="1748" scr6="1864" scr7="1980" scr8="2096"/> + <product name="SUM918" positions="2" scr1="1284" scr2="1400" scr3="1516" scr4="1632" scr5="1748" scr6="1864" scr7="1980" scr8="2096"/> + <product name="SUM928" positions="2" scr1="1284" scr2="1400" scr3="1516" scr4="1632" scr5="1748" scr6="1864" scr7="1980" scr8="2096"/> + </manufacturer> + <manufacturer name="Dura-Sat"> + <product name="UCP18" scr1="1284" scr2="1400" scr3="1516" scr4="1632" scr5="1748" scr6="1864" scr7="1980" scr8="2096"/> + <product name="VDU543NT" scr1="1280" scr2="1382" scr3="1484"/> + <product name="VDU563NT" scr1="1280" scr2="1382" scr3="1484"/> + <product name="VDU583NT" scr1="1280" scr2="1382" scr3="1484"/> + <product name="VDU586NT" scr1="1280" scr2="1382" scr3="1484" scr4="1586" scr5="1688" scr6="1790"/> + <product name="VDU983NT" positions="2" scr1="1280" scr2="1382" scr3="1484"/> + </manufacturer> + <manufacturer name="G-STAR"> + <product name="GS-506-S1" scr1="1280" scr2="1382" scr3="1484"/> + <product name="GS-516-S1" scr1="1280" scr2="1382" scr3="1484" scr4="1586" scr5="1688" scr6="1790"/> + </manufacturer> + <manufacturer name="Inverto"> + <product name="IDLP-UST11O-CUO1O-8PP" scr1="1076" scr2="1178" scr3="1280" scr4="1382" scr5="1484" scr6="1586" scr7="1688" scr8="1790"/> + </manufacturer> + <manufacturer name="JULTEC"> + <product name="JPS0501-6" scr1="1280" scr2="1382" scr3="1484" scr4="1586" scr5="1688" scr6="1790"/> + <product name="JPS0502-3" scr1="1280" scr2="1382" scr3="1484"/> + <product name="JPS0502-6" scr1="1280" scr2="1382" scr3="1484" scr4="1586" scr5="1688" scr6="1790"/> + <product name="JPS0504-3" scr1="1280" scr2="1382" scr3="1484"/> + </manufacturer> + <manufacturer name="Kathrein"> + <product name="EXR501" scr1="1400" scr2="1516" scr3="1632" scr4="1748"/> + <product name="EXR551" scr1="1400" scr2="1516" scr3="1632" scr4="1748"/> + <product name="EXR552" scr1="1400" scr2="1516"/> + <product name="EXR1541" scr1="1284" scr2="1400" scr3="1516" scr4="1632"/> + <product name="EXR1542" scr1="1284" scr2="1400" scr3="1516" scr4="1632"/> + <product name="EXR1581" scr1="1284" scr2="1400" scr3="1516" scr4="1632" scr5="1748" scr6="1864" scr7="1980" scr8="2096"/> + <product name="EXR1942" positions="2" scr1="1284" scr2="1400" scr3="1516" scr4="1632"/> + <product name="EXR1981" positions="2" scr1="1284" scr2="1400" scr3="1516" scr4="1632" scr5="1748" scr6="1864" scr7="1980" scr8="2096"/> + <product name="EXR2541" scr1="1284" scr2="1400" scr3="1516" scr4="1632"/> + <product name="EXR2542" scr1="1284" scr2="1400" scr3="1516" scr4="1632"/> + <product name="EXR2581" scr1="1284" scr2="1400" scr3="1516" scr4="1632" scr5="1748" scr6="1864" scr7="1980" scr8="2096"/> + <product name="EXR2942" positions="2" scr1="1284" scr2="1400" scr3="1516" scr4="1632"/> + <product name="EXR2981" positions="2" scr1="1284" scr2="1400" scr3="1516" scr4="1632" scr5="1748" scr6="1864" scr7="1980" scr8="2096"/> + <product name="EXU908" positions="2" scr1="1284" scr2="1400" scr3="1516" scr4="1632"/> + </manufacturer> + <manufacturer name="ROTEK"> + <product name="EKL2/1" scr1="1400" scr2="1516"/> + <product name="EKL2/1E" scr3="1632" scr4="1748"/> + </manufacturer> + <manufacturer name="Smart"> + <product name="DPA 51" scr1="1284" scr2="1400" scr3="1516" scr4="1632" scr5="1748" scr6="1864" scr7="1980" scr8="2096"/> + </manufacturer> + <manufacturer name="Technisat"> + <product name="TechniRouter 5/1x8" scr1="1284" scr2="1400" scr3="1516" scr4="1632" scr5="1748" scr6="1864" scr7="1980" scr8="2096"/> + <product name="TechniRouter 9/1x8" positions="2" scr1="1284" scr2="1400" scr3="1516" scr4="1632" scr5="1748" scr6="1864" scr7="1980" scr8="2096"/> + <product name="TechniRouter 5/2x4" scr1="1284" scr2="1400" scr3="1516" scr4="1632"/> + <product name="TechniRouter 9/2x4" positions="2" scr1="1284" scr2="1400" scr3="1516" scr4="1632"/> + </manufacturer> + <manufacturer name="Telstar"> + <product name="SCR 5/1x8" scr1="1284" scr2="1400" scr3="1516" scr4="1632" scr5="1748" scr6="1864" scr7="1980" scr8="2096"/> + <product name="SCR 9/1x8" positions="2" scr1="1284" scr2="1400" scr3="1516" scr4="1632" scr5="1748" scr6="1864" scr7="1980" scr8="2096"/> + <product name="SCR 5/2x4" scr1="1284" scr2="1400" scr3="1516" scr4="1632"/> + <product name="SCR 9/2x4" positions="2" scr1="1284" scr2="1400" scr3="1516" scr4="1632"/> + </manufacturer> + <manufacturer name="Wisi"> + <product name="DY 64 1810" scr1="1178" scr2="1280" scr3="1382" scr4="1484" scr5="1586" scr6="1688" scr7="1790" scr8="1892"/> + <product name="DY 64 2410" scr1="1178" scr2="1280" scr3="1382" scr4="1484"/> + <product name="DY 68 1810" positions="2" scr1="1178" scr2="1280" scr3="1382" scr4="1484" scr5="1586" scr6="1688" scr7="1790" scr8="1892"/> + <product name="DY 68 2410" positions="2" scr1="1178" scr2="1280" scr3="1382" scr4="1484"/> + </manufacturer> + </matrix> +</unicable> diff --git a/lib/dvb/frontend.cpp b/lib/dvb/frontend.cpp index bc3a88da..bd8f0028 100644 --- a/lib/dvb/frontend.cpp +++ b/lib/dvb/frontend.cpp @@ -582,7 +582,7 @@ int eDVBFrontend::openFrontend() return 0; } -int eDVBFrontend::closeFrontend(bool force) +int eDVBFrontend::closeFrontend(bool force, bool no_delayed) { if (!force && m_data[CUR_VOLTAGE] != -1 && m_data[CUR_VOLTAGE] != iDVBFrontend::voltageOff) { @@ -605,11 +605,34 @@ int eDVBFrontend::closeFrontend(bool force) eDebugNoSimulate("close frontend %d", m_dvbid); if (m_data[SATCR] != -1) { - turnOffSatCR(m_data[SATCR]); + if (!no_delayed) + { + m_sec->prepareTurnOffSatCR(*this, m_data[SATCR]); + m_tuneTimer->start(0, true); + if(!m_tuneTimer->isActive()) + { + int timeout=0; + eDebug("[turnOffSatCR] no mainloop"); + while(true) + { + timeout = tuneLoopInt(); + if (timeout == -1) + break; + usleep(timeout*1000); // blockierendes wait.. eTimer gibts ja nicht mehr + } + } + else + eDebug("[turnOffSatCR] running mainloop"); + return 0; + } + else + m_data[ROTOR_CMD] = -1; } + setTone(iDVBFrontend::toneOff); setVoltage(iDVBFrontend::voltageOff); m_tuneTimer->stop(); + if (m_sec && !m_simulate) m_sec->setRotorMoving(m_slotid, false); if (!::close(m_fd)) @@ -1486,9 +1509,14 @@ bool eDVBFrontend::setSecSequencePos(int steps) return true; } -void eDVBFrontend::tuneLoop() // called by m_tuneTimer +void eDVBFrontend::tuneLoop() +{ + tuneLoopInt(); +} + +int eDVBFrontend::tuneLoopInt() // called by m_tuneTimer { - int delay=0; + int delay=-1; eDVBFrontend *sec_fe = this; eDVBRegisteredFrontend *regFE = 0; long tmp = m_data[LINKED_PREV_PTR]; @@ -1518,6 +1546,7 @@ void eDVBFrontend::tuneLoop() // called by m_tuneTimer { long *sec_fe_data = sec_fe->m_data; // eDebugNoSimulate("tuneLoop %d\n", m_sec_sequence.current()->cmd); + delay = 0; switch (m_sec_sequence.current()->cmd) { case eSecCommand::SLEEP: @@ -1844,6 +1873,13 @@ void eDVBFrontend::tuneLoop() // called by m_tuneTimer ++m_sec_sequence.current(); break; } + case eSecCommand::DELAYED_CLOSE_FRONTEND: + { + eDebugNoSimulate("[SEC] delayed close frontend"); + closeFrontend(false, true); + ++m_sec_sequence.current(); + break; + } default: eDebugNoSimulate("[SEC] unhandled sec command %d", ++m_sec_sequence.current()->cmd); @@ -1856,6 +1892,7 @@ void eDVBFrontend::tuneLoop() // called by m_tuneTimer regFE->dec_use(); if (m_simulate && m_sec_sequence.current() != m_sec_sequence.end()) tuneLoop(); + return delay; } void eDVBFrontend::setFrontend(bool recvEvents) @@ -2591,9 +2628,12 @@ RESULT eDVBFrontend::setSEC(iDVBSatelliteEquipmentControl *sec) return 0; } -RESULT eDVBFrontend::setSecSequence(const eSecCommandList &list) +RESULT eDVBFrontend::setSecSequence(eSecCommandList &list) { - m_sec_sequence = list; + if (m_data[SATCR] != -1 && m_sec_sequence.current() != m_sec_sequence.end()) + m_sec_sequence.push_back(list); + else + m_sec_sequence = list; return 0; } @@ -2670,42 +2710,3 @@ arg_error: "eDVBFrontend::setSlotInfo must get a tuple with first param slotid, second param slot description and third param enabled boolean"); return false; } - -RESULT eDVBFrontend::turnOffSatCR(int satcr) -{ - eSecCommandList sec_sequence; - // check if voltage is disabled - eSecCommand::pair compare; - compare.steps = +9; //nothing to do - compare.voltage = iDVBFrontend::voltageOff; - sec_sequence.push_back( eSecCommand(eSecCommand::IF_NOT_VOLTAGE_GOTO, compare) ); - sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, iDVBFrontend::voltage13) ); - sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, 50 ) ); - - sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, iDVBFrontend::voltage18_5) ); - sec_sequence.push_back( eSecCommand(eSecCommand::SET_TONE, iDVBFrontend::toneOff) ); - sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, 250) ); - - eDVBDiseqcCommand diseqc; - memset(diseqc.data, 0, MAX_DISEQC_LENGTH); - diseqc.len = 5; - diseqc.data[0] = 0xE0; - diseqc.data[1] = 0x10; - diseqc.data[2] = 0x5A; - diseqc.data[3] = satcr << 5; - diseqc.data[4] = 0x00; - - sec_sequence.push_back( eSecCommand(eSecCommand::SEND_DISEQC, diseqc) ); - sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, 50+20+14*diseqc.len) ); - sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, iDVBFrontend::voltage13) ); - setSecSequence(sec_sequence); - return 0; -} - -RESULT eDVBFrontend::ScanSatCR() -{ - setFrontend(); - usleep(20000); - setTone(iDVBFrontend::toneOff); - return 0; -} diff --git a/lib/dvb/frontend.h b/lib/dvb/frontend.h index bc31755c..bef4a18f 100644 --- a/lib/dvb/frontend.h +++ b/lib/dvb/frontend.h @@ -110,6 +110,7 @@ private: void feEvent(int); void timeout(); void tuneLoop(); // called by m_tuneTimer + int tuneLoopInt(); void setFrontend(bool recvEvents=true); bool setSecSequencePos(int steps); static int PriorityOrder; @@ -130,7 +131,7 @@ public: RESULT sendDiseqc(const eDVBDiseqcCommand &diseqc); RESULT sendToneburst(int burst); RESULT setSEC(iDVBSatelliteEquipmentControl *sec); - RESULT setSecSequence(const eSecCommandList &list); + RESULT setSecSequence(eSecCommandList &list); RESULT getData(int num, long &data); RESULT setData(int num, long val); @@ -148,12 +149,9 @@ public: void reopenFrontend(); int openFrontend(); - int closeFrontend(bool force=false); + int closeFrontend(bool force=false, bool no_delayed=false); const char *getDescription() const { return m_description; } bool is_simulate() const { return m_simulate; } - - RESULT turnOffSatCR(int satcr); - RESULT ScanSatCR(); }; #endif // SWIG diff --git a/lib/dvb/idvb.h b/lib/dvb/idvb.h index 996d7909..f1217a6a 100644 --- a/lib/dvb/idvb.h +++ b/lib/dvb/idvb.h @@ -459,7 +459,7 @@ class iDVBFrontend: public iDVBFrontend_ENUMS, public iObject public: virtual RESULT getFrontendType(int &SWIG_OUTPUT)=0; virtual RESULT tune(const iDVBFrontendParameters &where)=0; - virtual int closeFrontend(bool force = false)=0; + virtual int closeFrontend(bool force = false, bool no_delayed = false)=0; virtual void reopenFrontend()=0; #ifndef SWIG virtual RESULT connectStateChange(const Slot1<void,iDVBFrontend*> &stateChange, ePtr<eConnection> &connection)=0; @@ -471,7 +471,7 @@ public: virtual RESULT sendToneburst(int burst)=0; #ifndef SWIG virtual RESULT setSEC(iDVBSatelliteEquipmentControl *sec)=0; - virtual RESULT setSecSequence(const eSecCommandList &list)=0; + virtual RESULT setSecSequence(eSecCommandList &list)=0; #endif virtual int readFrontendData(int type)=0; virtual void getFrontendStatus(SWIG_PYOBJECT(ePyObject) dest)=0; @@ -491,6 +491,7 @@ class iDVBSatelliteEquipmentControl: public iObject { public: virtual RESULT prepare(iDVBFrontend &frontend, FRONTENDPARAMETERS &parm, const eDVBFrontendParametersSatellite &sat, int frontend_id, unsigned int timeout)=0; + virtual void prepareTurnOffSatCR(iDVBFrontend &frontend, int satcr)=0; virtual int canTune(const eDVBFrontendParametersSatellite &feparm, iDVBFrontend *fe, int frontend_id, int *highest_score_lnb=0)=0; virtual void setRotorMoving(int slotid, bool)=0; }; diff --git a/lib/dvb/sec.cpp b/lib/dvb/sec.cpp index 0e3e7e0a..58fc5e39 100644 --- a/lib/dvb/sec.cpp +++ b/lib/dvb/sec.cpp @@ -108,6 +108,9 @@ int eDVBSatelliteEquipmentControl::canTune(const eDVBFrontendParametersSatellite { bool rotor=false; eDVBSatelliteLNBParameters &lnb_param = m_lnbs[idx]; + bool is_unicable = lnb_param.SatCR_idx != -1; + bool is_unicable_position_switch = lnb_param.SatCR_positions > 1; + if ( lnb_param.m_slot_mask & slot_id ) // lnb for correct tuner? { int ret = 0; @@ -163,7 +166,7 @@ int eDVBSatelliteEquipmentControl::canTune(const eDVBFrontendParametersSatellite eSecDebugNoSimulate("ret1 %d", ret); - if (linked_in_use) + if (linked_in_use && !is_unicable) { // compare tuner data if ( (csw != linked_csw) || @@ -176,7 +179,7 @@ int eDVBSatelliteEquipmentControl::canTune(const eDVBFrontendParametersSatellite ret += 15; eSecDebugNoSimulate("ret2 %d", ret); } - else if (satpos_depends_ptr != -1) + else if ((satpos_depends_ptr != -1) && !(is_unicable && is_unicable_position_switch)) { eSecDebugNoSimulate("satpos depends"); eDVBRegisteredFrontend *satpos_depends_to_fe = (eDVBRegisteredFrontend*) satpos_depends_ptr; @@ -209,7 +212,7 @@ int eDVBSatelliteEquipmentControl::canTune(const eDVBFrontendParametersSatellite eSecDebugNoSimulate("ret5 %d", ret); - if (ret) + if (ret && lnb_param.SatCR_idx != -1) { int lof = sat.frequency > lnb_param.m_lof_threshold ? lnb_param.m_lof_hi : lnb_param.m_lof_lo; @@ -375,8 +378,8 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA { // calc Frequency local = abs(sat.frequency - - ((lof - (lof % 1000)) + ((lof % 1000)>500 ? 1000 : 0)) ); //TODO für den Mist mal ein Macro schreiben - parm.FREQUENCY = (local - (local % 125)) + ((local % 125)>62 ? 125 : 0); + - lof); + parm.FREQUENCY = ((((local * 2) / 125) + 1) / 2) * 125; frontend.setData(eDVBFrontend::FREQ_OFFSET, sat.frequency - parm.FREQUENCY); if ( voltage_mode == eDVBSatelliteSwitchParameters::_14V @@ -396,20 +399,21 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA } else { - unsigned int tmp = abs(sat.frequency - - ((lof - (lof % 1000)) + ((lof % 1000)>500 ? 1000 : 0)) ) + int tmp1 = abs(sat.frequency + -lof) + lnb_param.SatCRvco - 1400000 + lnb_param.guard_offset; - parm.FREQUENCY = (lnb_param.SatCRvco - (tmp % 4000))+((tmp%4000)>2000?4000:0)+lnb_param.guard_offset; - lnb_param.UnicableTuningWord = (((tmp / 4000)+((tmp%4000)>2000?1:0)) + int tmp2 = ((((tmp1 * 2) / 4000) + 1) / 2) * 4000; + parm.FREQUENCY = lnb_param.SatCRvco - (tmp1-tmp2) + lnb_param.guard_offset; + lnb_param.UnicableTuningWord = ((tmp2 / 4000) | ((band & 1) ? 0x400 : 0) //HighLow | ((band & 2) ? 0x800 : 0) //VertHor | ((lnb_param.LNBNum & 1) ? 0 : 0x1000) //Umschaltung LNB1 LNB2 | (lnb_param.SatCR_idx << 13)); //Adresse des SatCR eDebug("[prepare] UnicableTuningWord %#04x",lnb_param.UnicableTuningWord); eDebug("[prepare] guard_offset %d",lnb_param.guard_offset); - frontend.setData(eDVBFrontend::FREQ_OFFSET, sat.frequency - ((lnb_param.UnicableTuningWord & 0x3FF) *4000 + 1400000 - lnb_param.SatCRvco + lof)); + frontend.setData(eDVBFrontend::FREQ_OFFSET, (lnb_param.UnicableTuningWord & 0x3FF) *4000 + 1400000 + lof - (2 * (lnb_param.SatCRvco - (tmp1-tmp2))) ); } if (diseqc_mode >= eDVBSatelliteDiseqcParameters::V1_0) @@ -743,10 +747,10 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA diseqc.data[3] = RotorCmd; diseqc.data[4] = 0x00; } - if(lnb_param.SatCR_idx == -1) +// if(lnb_param.SatCR_idx == -1) { int mrt = m_params[MOTOR_RUNNING_TIMEOUT]; // in seconds! - if ( rotor_param.m_inputpower_parameters.m_use ) + if ( rotor_param.m_inputpower_parameters.m_use || lnb_param.SatCR_idx == -1) { // use measure rotor input power to detect rotor state bool turn_fast = need_turn_fast(rotor_param.m_inputpower_parameters.m_turning_speed); eSecCommand::rotor cmd; @@ -950,6 +954,40 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA return -1; } +void eDVBSatelliteEquipmentControl::prepareTurnOffSatCR(iDVBFrontend &frontend, int satcr) +{ + eSecCommandList sec_sequence; + + // check if voltage is disabled + eSecCommand::pair compare; + compare.steps = +9; //only close frontend + compare.voltage = iDVBFrontend::voltageOff; + + sec_sequence.push_back( eSecCommand(eSecCommand::IF_VOLTAGE_GOTO, compare) ); + sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, iDVBFrontend::voltage13) ); + sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_ENABLE_VOLTAGE_BEFORE_SWITCH_CMDS]) ); + + sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, iDVBFrontend::voltage18_5) ); + sec_sequence.push_back( eSecCommand(eSecCommand::SET_TONE, iDVBFrontend::toneOff) ); + sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_VOLTAGE_CHANGE_BEFORE_SWITCH_CMDS]) ); + + eDVBDiseqcCommand diseqc; + memset(diseqc.data, 0, MAX_DISEQC_LENGTH); + diseqc.len = 5; + diseqc.data[0] = 0xE0; + diseqc.data[1] = 0x10; + diseqc.data[2] = 0x5A; + diseqc.data[3] = satcr << 5; + diseqc.data[4] = 0x00; + + sec_sequence.push_back( eSecCommand(eSecCommand::SEND_DISEQC, diseqc) ); + sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_LAST_DISEQC_CMD]) ); + sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, iDVBFrontend::voltage13) ); + sec_sequence.push_back( eSecCommand(eSecCommand::DELAYED_CLOSE_FRONTEND) ); + + frontend.setSecSequence(sec_sequence); +} + RESULT eDVBSatelliteEquipmentControl::clear() { eSecDebug("eDVBSatelliteEquipmentControl::clear()"); @@ -1254,6 +1292,26 @@ RESULT eDVBSatelliteEquipmentControl::setLNBSatCRvco(int SatCRvco) return -ENOENT; return 0; } + +RESULT eDVBSatelliteEquipmentControl::setLNBSatCRpositions(int SatCR_positions) +{ + eSecDebug("eDVBSatelliteEquipmentControl::setLNBSatCRpositions(%d)", SatCR_positions); + if(SatCR_positions < 1 || SatCR_positions > 2) + return -EPERM; + if ( currentLNBValid() ) + m_lnbs[m_lnbidx].SatCR_positions = SatCR_positions; + else + return -ENOENT; + return 0; +} + +RESULT eDVBSatelliteEquipmentControl::getLNBSatCRpositions() +{ + if ( currentLNBValid() ) + return m_lnbs[m_lnbidx].SatCR_positions; + return -ENOENT; +} + RESULT eDVBSatelliteEquipmentControl::getLNBSatCR() { if ( currentLNBValid() ) diff --git a/lib/dvb/sec.h b/lib/dvb/sec.h index c50aee4d..b38671d2 100644 --- a/lib/dvb/sec.h +++ b/lib/dvb/sec.h @@ -25,7 +25,8 @@ public: IF_TONE_GOTO, IF_NOT_TONE_GOTO, START_TUNE_TIMEOUT, SET_ROTOR_MOVING, - SET_ROTOR_STOPPED + SET_ROTOR_STOPPED, + DELAYED_CLOSE_FRONTEND }; int cmd; struct rotor @@ -103,6 +104,11 @@ public: { secSequence.push_back(cmd); } + void push_back(eSecCommandList &list) + { + ASSERT(*this != list); + secSequence.splice(end(), list.secSequence); + } void clear() { secSequence.clear(); @@ -252,6 +258,7 @@ public: #define MAX_SATCR 8 #define MAX_LNBNUM 32 + int SatCR_positions; int SatCR_idx; unsigned int SatCRvco; unsigned int UnicableTuningWord; @@ -311,6 +318,7 @@ public: #ifndef SWIG eDVBSatelliteEquipmentControl(eSmartPtrList<eDVBRegisteredFrontend> &avail_frontends, eSmartPtrList<eDVBRegisteredFrontend> &avail_simulate_frontends); RESULT prepare(iDVBFrontend &frontend, FRONTENDPARAMETERS &parm, const eDVBFrontendParametersSatellite &sat, int frontend_id, unsigned int tunetimeout); + void prepareTurnOffSatCR(iDVBFrontend &frontend, int satcr); // used for unicable int canTune(const eDVBFrontendParametersSatellite &feparm, iDVBFrontend *, int frontend_id, int *highest_score_lnb=0); bool currentLNBValid() { return m_lnbidx > -1 && m_lnbidx < (int)(sizeof(m_lnbs) / sizeof(eDVBSatelliteLNBParameters)); } #endif @@ -346,9 +354,10 @@ public: /* Unicable Specific Parameters */ RESULT setLNBSatCR(int SatCR_idx); RESULT setLNBSatCRvco(int SatCRvco); -// RESULT checkGuardOffset(const eDVBFrontendParametersSatellite &sat); + RESULT setLNBSatCRpositions(int SatCR_positions); RESULT getLNBSatCR(); RESULT getLNBSatCRvco(); + RESULT getLNBSatCRpositions(); /* Satellite Specific Parameters */ RESULT addSatellite(int orbital_position); RESULT setVoltageMode(int mode); diff --git a/lib/python/Components/NimManager.py b/lib/python/Components/NimManager.py index c68e9404..663ec16d 100644 --- a/lib/python/Components/NimManager.py +++ b/lib/python/Components/NimManager.py @@ -16,6 +16,9 @@ from time import localtime, mktime from datetime import datetime from Tools.BoundFunction import boundFunction +from Tools import Directories +import xml.etree.cElementTree + def getConfigSatlist(orbpos, satlist): default_orbpos = None for x in satlist: @@ -234,6 +237,20 @@ class SecConfigure: print "sec config completed" def updateAdvanced(self, sec, slotid): + try: + if config.Nims[slotid].advanced.unicableconnected is not None: + if config.Nims[slotid].advanced.unicableconnected.value == True: + config.Nims[slotid].advanced.unicableconnectedTo.save_forced = True + self.linkNIMs(sec, slotid, int(config.Nims[slotid].advanced.unicableconnectedTo.value)) + connto = self.getRoot(slotid, int(config.Nims[slotid].advanced.unicableconnectedTo.value)) + if not self.linked.has_key(connto): + self.linked[connto] = [] + self.linked[connto].append(slotid) + else: + config.Nims[slotid].advanced.unicableconnectedTo.save_forced = False + except: + pass + lnbSat = {} for x in range(1,37): lnbSat[x] = [] @@ -276,24 +293,40 @@ class SecConfigure: sec.setLNBLOFH(10600000) sec.setLNBThreshold(11700000) elif currLnb.lof.value == "unicable": - sec.setLNBLOFL(9750000) - sec.setLNBLOFH(10600000) - sec.setLNBThreshold(11700000) if currLnb.unicable.value == "unicable_user": +#TODO satpositions for satcruser + sec.setLNBLOFL(currLnb.lofl.value * 1000) + sec.setLNBLOFH(currLnb.lofh.value * 1000) + sec.setLNBThreshold(currLnb.threshold.value * 1000) sec.setLNBSatCR(currLnb.satcruser.index) sec.setLNBSatCRvco(currLnb.satcrvcouser[currLnb.satcruser.index].value*1000) + sec.setLNBSatCRpositions(1) #HACK elif currLnb.unicable.value == "unicable_matrix": manufacturer_name = currLnb.unicableMatrixManufacturer.value manufacturer = currLnb.unicableMatrix[manufacturer_name] product_name = manufacturer.product.value sec.setLNBSatCR(manufacturer.scr[product_name].index) sec.setLNBSatCRvco(manufacturer.vco[product_name][manufacturer.scr[product_name].index].value*1000) + sec.setLNBSatCRpositions(manufacturer.positions[product_name][0].value) + sec.setLNBLOFL(manufacturer.lofl[product_name][0].value * 1000) + sec.setLNBLOFH(manufacturer.lofh[product_name][0].value * 1000) + sec.setLNBThreshold(manufacturer.loft[product_name][0].value * 1000) + currLnb.unicableMatrixManufacturer.save_forced = True + manufacturer.product.save_forced = True + manufacturer.vco[product_name][manufacturer.scr[product_name].index].save_forced = True elif currLnb.unicable.value == "unicable_lnb": manufacturer_name = currLnb.unicableLnbManufacturer.value manufacturer = currLnb.unicableLnb[manufacturer_name] product_name = manufacturer.product.value sec.setLNBSatCR(manufacturer.scr[product_name].index) sec.setLNBSatCRvco(manufacturer.vco[product_name][manufacturer.scr[product_name].index].value*1000) + sec.setLNBSatCRpositions(manufacturer.positions[product_name][0].value) + sec.setLNBLOFL(manufacturer.lofl[product_name][0].value * 1000) + sec.setLNBLOFH(manufacturer.lofh[product_name][0].value * 1000) + sec.setLNBThreshold(manufacturer.loft[product_name][0].value * 1000) + currLnb.unicableLnbManufacturer.save_forced = True + manufacturer.product.save_forced = True + manufacturer.vco[product_name][manufacturer.scr[product_name].index].save_forced = True elif currLnb.lof.value == "c_band": sec.setLNBLOFL(5150000) sec.setLNBLOFH(5150000) @@ -988,55 +1021,57 @@ def InitNimManager(nimmgr): lnb_choices_default = "universal_lnb" - unicablelnbproducts = { - "Humax": {"150 SCR":("1210","1420","1680","2040")}, - "Inverto": {"IDLP-40UNIQD+S":("1680","1420","2040","1210")}, - "Kathrein": {"UAS481":("1400","1516","1632","1748")}, - "Kreiling": {"KR1440":("1680","1420","2040","1210")}, - "Radix": {"Unicable LNB":("1680","1420","2040","1210")}, - "Wisi": {"OC 05":("1210","1420","1680","2040")}} + unicablelnbproducts = {} + unicablematrixproducts = {} + doc = xml.etree.cElementTree.parse("/usr/share/enigma2/unicable.xml") + root = doc.getroot() + + entry = root.find("lnb") + for manufacturer in entry.getchildren(): + m={} + for product in manufacturer.getchildren(): + scr=[] + lscr=("scr1","scr2","scr3","scr4","scr5","scr6","scr7","scr8") + for i in range(len(lscr)): + scr.append(product.get(lscr[i],"0")) + for i in range(len(lscr)): + if scr[len(lscr)-i-1] == "0": + scr.pop() + else: + break; + lof=[] + lof.append(product.get("positions","1")) + lof.append(product.get("lofl","9750")) + lof.append(product.get("lofh","10600")) + lof.append(product.get("threshold","11700")) + scr.append(tuple(lof)) + m.update({product.get("name"):tuple(scr)}) + unicablelnbproducts.update({manufacturer.get("name"):m}) + + entry = root.find("matrix") + for manufacturer in entry.getchildren(): + m={} + for product in manufacturer.getchildren(): + scr=[] + lscr=("scr1","scr2","scr3","scr4","scr5","scr6","scr7","scr8") + for i in range(len(lscr)): + scr.append(product.get(lscr[i],"0")) + for i in range(len(lscr)): + if scr[len(lscr)-i-1] == "0": + scr.pop() + else: + break; + lof=[] + lof.append(product.get("positions","1")) + lof.append(product.get("lofl","9750")) + lof.append(product.get("lofh","10600")) + lof.append(product.get("threshold","11700")) + scr.append(tuple(lof)) + m.update({product.get("name"):tuple(scr)}) + unicablematrixproducts.update({manufacturer.get("name"):m}) + UnicableLnbManufacturers = unicablelnbproducts.keys() UnicableLnbManufacturers.sort() - - unicablematrixproducts = { - "Ankaro": { - "UCS 51440":("1400","1632","1284","1516"), - "UCS 51820":("1400","1632","1284","1516","1864","2096","1748","1980"), - "UCS 51840":("1400","1632","1284","1516","1864","2096","1748","1980"), - "UCS 52240":("1400","1632"), - "UCS 52420":("1400","1632","1284","1516"), - "UCS 52440":("1400","1632","1284","1516"), - "UCS 91440":("1400","1632","1284","1516"), - "UCS 91820":("1400","1632","1284","1516","1864","2096","1748","1980"), - "UCS 91840":("1400","1632","1284","1516","1864","2096","1748","1980"), - "UCS 92240":("1400","1632"), - "UCS 92420":("1400","1632","1284","1516"), - "UCS 92440":("1400","1632","1284","1516")}, - "DCT Delta": { - "SUM518":("1284","1400","1516","1632","1748","1864","1980","2096"), - "SUM918":("1284","1400","1516","1632","1748","1864","1980","2096"), - "SUM928":("1284","1400","1516","1632","1748","1864","1980","2096")}, - "Inverto": { - "IDLP-UST11O-CUO1O-8PP":("1076","1178","1280","1382","1484","1586","1688","1790")}, - "Kathrein": { - "EXR501":("1400","1516","1632","1748"), - "EXR551":("1400","1516","1632","1748"), - "EXR552":("1400","1516")}, - "ROTEK": { - "EKL2/1":("1400","1516"), - "EKL2/1E":("0","0","1632","1748")}, - "Smart": { - "DPA 51":("1284","1400","1516","1632","1748","1864","1980","2096")}, - "Technisat": { - "TechniRouter 5/1x8 G":("1284","1400","1516","1632","1748","1864","1980","2096"), - "TechniRouter 5/1x8 K":("1284","1400","1516","1632","1748","1864","1980","2096"), - "TechniRouter 5/2x4 G":("1284","1400","1516","1632"), - "TechniRouter 5/2x4 K":("1284","1400","1516","1632")}, - "Telstar": { - "SCR 5/1x8 G":("1284","1400","1516","1632","1748","1864","1980","2096"), - "SCR 5/1x8 K":("1284","1400","1516","1632","1748","1864","1980","2096"), - "SCR 5/2x4 G":("1284","1400","1516","1632"), - "SCR 5/2x4 K":("1284","1400","1516","1632")}} UnicableMatrixManufacturers = unicablematrixproducts.keys() UnicableMatrixManufacturers.sort() @@ -1117,7 +1152,7 @@ def InitNimManager(nimmgr): scrlist = [] vcolist = unicablematrixproducts[y][z] tmp.vco[z] = ConfigSubList() - for cnt in range(1,1+len(vcolist)): + for cnt in range(1,1+len(vcolist)-1): vcofreq = int(vcolist[cnt-1]) if vcofreq == 0: scrlist.append(("%d" %cnt,"SCR %d " %cnt +_("not used"))) @@ -1137,29 +1172,54 @@ def InitNimManager(nimmgr): tmp.product = ConfigSelection(choices = products, default = products[0]) tmp.scr = ConfigSubDict() tmp.vco = ConfigSubDict() + tmp.lofl = ConfigSubDict() + tmp.lofh = ConfigSubDict() + tmp.loft = ConfigSubDict() + tmp.positions = ConfigSubDict() for z in products: scrlist = [] vcolist = unicablelnbproducts[y][z] tmp.vco[z] = ConfigSubList() - for cnt in range(1,1+len(vcolist)): + for cnt in range(1,1+len(vcolist)-1): scrlist.append(("%d" %cnt,"SCR %d" %cnt)) vcofreq = int(vcolist[cnt-1]) tmp.vco[z].append(ConfigInteger(default=vcofreq, limits = (vcofreq, vcofreq))) tmp.scr[z] = ConfigSelection(choices = scrlist, default = scrlist[0][0]) + + positions = int(vcolist[len(vcolist)-1][0]) + tmp.positions[z] = ConfigSubList() + tmp.positions[z].append(ConfigInteger(default=positions, limits = (positions, positions))) + + lofl = vcolist[len(vcolist)-1][1] + tmp.lofl[z] = ConfigSubList() + tmp.lofl[z].append(ConfigInteger(default=lofl, limits = (lofl, lofl))) + + lofh = int(vcolist[len(vcolist)-1][2]) + tmp.lofh[z] = ConfigSubList() + tmp.lofh[z].append(ConfigInteger(default=lofh, limits = (lofh, lofh))) + + loft = int(vcolist[len(vcolist)-1][3]) + tmp.loft[z] = ConfigSubList() + tmp.loft[z].append(ConfigInteger(default=loft, limits = (loft, loft))) + section.unicableLnb[y] = tmp - + +#TODO satpositions for satcruser section.satcruser = ConfigSelection(advanced_lnb_satcruser_choices, default="1") tmp = ConfigSubList() - tmp.append(ConfigInteger(default=1284, limits = (0, 9999))) - tmp.append(ConfigInteger(default=1400, limits = (0, 9999))) - tmp.append(ConfigInteger(default=1516, limits = (0, 9999))) - tmp.append(ConfigInteger(default=1632, limits = (0, 9999))) - tmp.append(ConfigInteger(default=1748, limits = (0, 9999))) - tmp.append(ConfigInteger(default=1864, limits = (0, 9999))) - tmp.append(ConfigInteger(default=1980, limits = (0, 9999))) - tmp.append(ConfigInteger(default=2096, limits = (0, 9999))) + tmp.append(ConfigInteger(default=1284, limits = (950, 2150))) + tmp.append(ConfigInteger(default=1400, limits = (950, 2150))) + tmp.append(ConfigInteger(default=1516, limits = (950, 2150))) + tmp.append(ConfigInteger(default=1632, limits = (950, 2150))) + tmp.append(ConfigInteger(default=1748, limits = (950, 2150))) + tmp.append(ConfigInteger(default=1864, limits = (950, 2150))) + tmp.append(ConfigInteger(default=1980, limits = (950, 2150))) + tmp.append(ConfigInteger(default=2096, limits = (950, 2150))) section.satcrvcouser = tmp + nim.advanced.unicableconnected = ConfigYesNo(default=False) + nim.advanced.unicableconnectedTo = ConfigSelection([(str(id), nimmgr.getNimDescription(id)) for id in nimmgr.getNimListOfType("DVB-S") if id != x]) + def configDiSEqCModeChanged(configElement): section = configElement.section if configElement.value == "1_2" and isinstance(section.longitude, ConfigNothing): diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py index 471b59ec..d7506e31 100755 --- a/lib/python/Components/config.py +++ b/lib/python/Components/config.py @@ -29,6 +29,7 @@ from time import localtime, strftime class ConfigElement(object): def __init__(self): self.saved_value = None + self.save_forced = False self.last_value = None self.save_disabled = False self.__notifiers = None @@ -83,7 +84,7 @@ class ConfigElement(object): # you need to override this if str(self.value) doesn't work def save(self): - if self.save_disabled or self.value == self.default: + if self.save_disabled or (self.value == self.default and not self.save_forced): self.saved_value = None else: self.saved_value = self.tostring(self.value) diff --git a/lib/python/Screens/Satconfig.py b/lib/python/Screens/Satconfig.py index 749c09db..44f4251a 100644 --- a/lib/python/Screens/Satconfig.py +++ b/lib/python/Screens/Satconfig.py @@ -95,6 +95,7 @@ class NimSetup(Screen, ConfigListScreen, ServiceStopScreen): self.advancedType = None self.advancedManufacturer = None self.advancedSCR = None + self.advancedConnected = None if self.nim.isMultiType(): multiType = self.nimConfig.multiType @@ -205,7 +206,7 @@ class NimSetup(Screen, ConfigListScreen, ServiceStopScreen): checkList = (self.configMode, self.diseqcModeEntry, self.advancedSatsEntry, \ self.advancedLnbsEntry, self.advancedDiseqcMode, self.advancedUsalsEntry, \ self.advancedLof, self.advancedPowerMeasurement, self.turningSpeed, \ - self.advancedType, self.advancedSCR, self.advancedManufacturer, self.advancedUnicable, \ + self.advancedType, self.advancedSCR, self.advancedManufacturer, self.advancedUnicable, self.advancedConnected, \ self.uncommittedDiseqcCommand, self.cableScanType, self.multiType) if self["config"].getCurrent() == self.multiType: from Components.NimManager import InitNimManager @@ -285,6 +286,18 @@ class NimSetup(Screen, ConfigListScreen, ServiceStopScreen): self.list.append(self.advancedType) self.list.append(self.advancedSCR) self.list.append(getConfigListEntry(_("Frequency"), manufacturer.vco[product_name][manufacturer.scr[product_name].index])) + + choices = [] + connectable = nimmanager.canConnectTo(self.slotid) + for id in connectable: + choices.append((str(id), nimmanager.getNimDescription(id))) + if len(choices): + self.advancedConnected = getConfigListEntry(_("connected"), self.nimConfig.advanced.unicableconnected) + self.list.append(self.advancedConnected) + if self.nimConfig.advanced.unicableconnected.value == True: + self.nimConfig.advanced.unicableconnectedTo.setChoices(choices) + self.list.append(getConfigListEntry(_("Connected to"),self.nimConfig.advanced.unicableconnectedTo)) + else: #kein Unicable self.list.append(getConfigListEntry(_("Voltage mode"), Sat.voltage)) self.list.append(getConfigListEntry(_("Increased voltage"), currLnb.increased_voltage)) -- cgit v1.2.3 From 03dcb1c046c540dc112c234ed5ffcd32f4005098 Mon Sep 17 00:00:00 2001 From: Fraxinas <andreas.frisch@multimedia-labs.de> Date: Wed, 9 Jun 2010 09:07:44 +0200 Subject: fix nl subtitle selected string and layout --- data/skin_default.xml | 12 ++++++------ po/nl.po | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'data') diff --git a/data/skin_default.xml b/data/skin_default.xml index ea0e29f2..aceafd73 100755 --- a/data/skin_default.xml +++ b/data/skin_default.xml @@ -86,16 +86,16 @@ {"default": (25, [ MultiContentEntryText(pos = (0, 0), size = (35, 25), font = 0, flags = RT_HALIGN_LEFT, text = 1), # key, MultiContentEntryText(pos = (40, 0), size = (60, 25), font = 0, flags = RT_HALIGN_LEFT, text = 2), # number, - MultiContentEntryText(pos = (110, 0), size = (120, 25), font = 0, flags = RT_HALIGN_LEFT, text = 3), # description, - MultiContentEntryText(pos = (240, 0), size = (210, 25), font = 0, flags = RT_HALIGN_LEFT, text = 4), # language, - MultiContentEntryText(pos = (460, 4), size = (80, 25), font = 1, flags = RT_HALIGN_RIGHT, text = 5), # selection, + MultiContentEntryText(pos = (110, 0), size = (120, 25), font = 0, flags = RT_HALIGN_LEFT, text = 3), # description, + MultiContentEntryText(pos = (240, 0), size = (200, 25), font = 0, flags = RT_HALIGN_LEFT, text = 4), # language, + MultiContentEntryText(pos = (450, 4), size = (90, 25), font = 1, flags = RT_HALIGN_RIGHT, text = 5), # selection, ], True, "showNever"), "notselected": (25, [ MultiContentEntryText(pos = (0, 0), size = (35, 25), font = 0, flags = RT_HALIGN_LEFT, text = 1), # key, MultiContentEntryText(pos = (40, 0), size = (60, 25), font = 0, flags = RT_HALIGN_LEFT, text = 2), # number, - MultiContentEntryText(pos = (110, 0), size = (120, 25), font = 0, flags = RT_HALIGN_LEFT, text = 3), # description, - MultiContentEntryText(pos = (240, 0), size = (210, 25), font = 0, flags = RT_HALIGN_LEFT, text = 4), # language, - MultiContentEntryText(pos = (460, 4), size = (80, 25), font = 1, flags = RT_HALIGN_RIGHT, text = 5), # selection, + MultiContentEntryText(pos = (110, 0), size = (120, 25), font = 0, flags = RT_HALIGN_LEFT, text = 3), # description, + MultiContentEntryText(pos = (240, 0), size = (200, 25), font = 0, flags = RT_HALIGN_LEFT, text = 4), # language, + MultiContentEntryText(pos = (450, 4), size = (90, 25), font = 1, flags = RT_HALIGN_RIGHT, text = 5), # selection, ], False, "showNever") }, "fonts": [gFont("Regular", 20), gFont("Regular", 16)], diff --git a/po/nl.po b/po/nl.po index 321f122b..ff1a84f9 100755 --- a/po/nl.po +++ b/po/nl.po @@ -7,9 +7,9 @@ msgstr "" "Project-Id-Version: enigma2\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-05-11 10:44+0000\n" -"PO-Revision-Date: 2009-09-30 01:49+0100\n" -"Last-Translator: \n" -"Language-Team: <Benny.DeTandt@gmail.com>\n" +"PO-Revision-Date: 2010-06-09 08:52+0100\n" +"Last-Translator: Fraxinas <andreas.frisch@multimedia-labs.de>\n" +"Language-Team: <Benny.DeTandt@gmail.com>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -5322,7 +5322,7 @@ msgstr "Rotor draaisnelheid" # msgid "Running" -msgstr "In behandeling" +msgstr "Geactiveerd" # msgid "Russia" -- cgit v1.2.3 From 15441eba1912dbdfeec76cc633ed5015561f4570 Mon Sep 17 00:00:00 2001 From: ghost <andreas.monzner@multimedia-labs.de> Date: Thu, 10 Jun 2010 14:41:21 +0200 Subject: Revert "resize ChannelSelection_summary to fit on 96x64 displays" This reverts commit 4b90fd4ce866b21a60ca5962b23c550e54d4f6d8. no more needed since we have real support for the color oled --- data/dm800se/skin.xml | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'data') diff --git a/data/dm800se/skin.xml b/data/dm800se/skin.xml index e5ff26cd..556d43d8 100644 --- a/data/dm800se/skin.xml +++ b/data/dm800se/skin.xml @@ -347,20 +347,4 @@ <convert type="ConditionalShowHide">Blink</convert> </widget> </screen> - - <!-- LCD screen (channelselection) --> - <screen name="ChannelSelection_summary" position="0,0" size="132,64"> - <widget source="parent.ServiceEvent" render="Label" position="3,0" size="90,25" font="Regular;14" halign="center" valign="center" > - <convert type="ServiceName">Name</convert> - </widget> - <widget source="parent.ServiceEvent" render="Progress" position="8,27" size="80,5" borderWidth="1"> - <convert type="EventTime">Progress</convert> - </widget> - <widget source="global.CurrentTime" render="Label" position="3,32" size="65,32" font="Regular;26" halign="right" valign="top"> - <convert type="ClockToText">Format:%H:%M</convert> - </widget> - <widget source="global.CurrentTime" render="Label" position="70,34" zPosition="1" size="26,30" font="Regular;14" valign="top"> - <convert type="ClockToText">Format:%S</convert> - </widget> - </screen> </skin> -- cgit v1.2.3 From 4f571e01bc8f25b5b1c7ff5a147d91fbf795038a Mon Sep 17 00:00:00 2001 From: ghost <andreas.monzner@multimedia-labs.de> Date: Thu, 10 Jun 2010 14:42:38 +0200 Subject: Revert "resize InfoBarSummary for 96x64 displays" This reverts commit 445b7f371df0fc4e7bcdf8a013b892e35e90c893. no more needed since we have real color oled support --- configure.ac | 1 - data/Makefile.am | 2 +- data/dm800se/Makefile.am | 4 - data/dm800se/skin.xml | 350 ----------------------------------------------- 4 files changed, 1 insertion(+), 356 deletions(-) delete mode 100644 data/dm800se/Makefile.am delete mode 100644 data/dm800se/skin.xml (limited to 'data') diff --git a/configure.ac b/configure.ac index ecde57d6..05c3a8eb 100755 --- a/configure.ac +++ b/configure.ac @@ -92,7 +92,6 @@ data/defaults/Makefile data/defaults/Dream/Makefile data/defaults/Dream/hdbouquets/Makefile data/defaults/Dream/sdbouquets/Makefile -data/dm800se/Makefile data/extensions/Makefile data/skin_default/Makefile data/skin_default/menu/Makefile diff --git a/data/Makefile.am b/data/Makefile.am index fcc29a8d..1ed9444b 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = countries fonts defaults extensions skin_default dm800se +SUBDIRS = countries fonts defaults extensions skin_default dist_pkgdata_DATA = \ defaultsatlists.xml \ diff --git a/data/dm800se/Makefile.am b/data/dm800se/Makefile.am deleted file mode 100644 index 11eb2d00..00000000 --- a/data/dm800se/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -installdir = $(pkgdatadir)/dm800se - -dist_install_DATA = \ - skin.xml diff --git a/data/dm800se/skin.xml b/data/dm800se/skin.xml deleted file mode 100644 index 556d43d8..00000000 --- a/data/dm800se/skin.xml +++ /dev/null @@ -1,350 +0,0 @@ -<skin> - <!-- Screwed Stone II skin (skin.xml) /Nemesis --> - <output id="0"> - <resolution xres="720" yres="576" bpp="32" /> - </output> - <!-- Colors (#AARRGGBB) --> - <colors> - <color name="white" value="#ffffff" /> - <color name="black" value="#000000" /> - <color name="dark" value="#25062748" /> - <color name="menu" value="#25062748" /> - <color name="red" value="#f23d21" /> - <color name="green" value="#389416" /> - <color name="blue" value="#0064c7" /> - <color name="yellow" value="#bab329" /> - <color name="transparent" value="#ffffffff" /> - <color name="transpBlack" value="#80000000" /> - <color name="transpWhite" value="#80ffffff" /> - <color name="background" value="#25062748" /> - <color name="foreground" value="#ffffff" /> - </colors> - - <!-- Main screen colors (id=0 Framebuffer) --> - <windowstyle type="skinned" id="0"> - <title offset="33,14" font="Regular;20" /> - <color name="Background" color="#25062748" /> - <color name="LabelForeground" color="#ffffff" /> - <color name="ListboxBackground" color="#25062748" /> - <color name="ListboxForeground" color="#ffffff" /> - <color name="ListboxSelectedBackground" color="#254f7497" /> - <color name="ListboxSelectedForeground" color="#ffffff" /> - <color name="ListboxMarkedBackground" color="#ff0000" /> - <color name="ListboxMarkedForeground" color="#ffffff" /> - <color name="ListboxMarkedAndSelectedBackground" color="#800000" /> - <color name="ListboxMarkedAndSelectedForeground" color="#ffffff" /> - <color name="WindowTitleForeground" color="#ffffff" /> - <color name="WindowTitleBackground" color="#25062748" /> - <!-- Main screen border png's --> - <borderset name="bsWindow"> - <pixmap pos="bpTopLeft" filename="skin_default/b_tl.png" /> - <pixmap pos="bpTop" filename="skin_default/b_t.png" /> - <pixmap pos="bpTopRight" filename="skin_default/b_tr.png" /> - <pixmap pos="bpLeft" filename="skin_default/b_l.png" /> - <pixmap pos="bpRight" filename="skin_default/b_r.png" /> - <pixmap pos="bpBottomLeft" filename="skin_default/b_bl.png" /> - <pixmap pos="bpBottom" filename="skin_default/b_b.png" /> - <pixmap pos="bpBottomRight" filename="skin_default/b_br.png" /> - </borderset> - </windowstyle> - <!-- Main screen colors (id=1 LCD) --> - <windowstyle type="skinned" id="1"> - <color name="Background" color="#000000" /> - <color name="LabelForeground" color="#ffffff" /> - <color name="ListboxBackground" color="#000000" /> - <color name="ListboxForeground" color="#ffffff" /> - <color name="ListboxSelectedBackground" color="#000000" /> - <color name="ListboxSelectedForeground" color="#ffffff" /> - <color name="ListboxMarkedBackground" color="#000000" /> - <color name="ListboxMarkedForeground" color="#ffffff" /> - <color name="ListboxMarkedAndSelectedBackground" color="#000000" /> - <color name="ListboxMarkedAndSelectedForeground" color="#ffffff" /> - <color name="WindowTitleForeground" color="#ffffff" /> - <color name="WindowTitleBackground" color="#000000" /> - </windowstyle> - <!-- Fonts --> - <fonts> - <!-- <font filename="md_khmurabi_10.ttf" name="Regular" scale="90" /> --> - <font filename="nmsbd.ttf" name="Regular" scale="90" /> - <font filename="lcd.ttf" name="LCD" scale="100" /> - <font filename="ae_AlMateen.ttf" name="Replacement" scale="90" replacement="1" /> - <font filename="tuxtxt.ttf" name="Console" scale="100" /> - </fonts> - <!-- Subtitle effects --> - <subtitles> - <sub name="Subtitle_TTX" font="Regular;30" shadowColor="#40101010" shadowOffset="3,3" /> - <sub name="Subtitle_Regular" font="Regular;30" foregroundColor="#DCDCDC" shadowColor="#40101010" shadowOffset="3,3" /> - <sub name="Subtitle_Bold" font="Replacement;30" foregroundColor="#DCDCDC" shadowColor="#40101010" shadowOffset="3,3" /> - <sub name="Subtitle_Italic" font="Regular;30" foregroundColor="#DCAAAA" shadowColor="#40101010" shadowOffset="3,3" /> - <!-- omitting foregroundColor attribute will enable auto-assignment of color --> - </subtitles> - <!-- Main infobar --> - <screen name="InfoBar" flags="wfNoBorder" position="0,380" size="720,160" title="InfoBar" backgroundColor="transparent"> - <!-- Background --> - <ePixmap position="0,0" zPosition="-1" size="720,160" pixmap="skin_default/info-bg.png" /> - <ePixmap position="27,73" size="665,71" pixmap="skin_default/screws.png" alphatest="on" transparent="1" /> - <!-- Signal Quality --> - <eLabel text="SNR" position="205,3" size="40,22" font="Regular;16" backgroundColor="#102e59" foregroundColor="#cccccc" shadowColor="#27384f" shadowOffset="-1,-1" transparent="1" /> - <widget source="session.FrontendStatus" render="Label" position="242,3" size="80,22" font="Regular;16" backgroundColor="#102e59" foregroundColor="#e7e7e7" shadowColor="#27384f" shadowOffset="-1,-1" transparent="1"> - <convert type="FrontendInfo">SNRdB</convert> - </widget> - <!-- Bit error rate --> - <eLabel text="BER" position="317,3" size="40,22" font="Regular;16" backgroundColor="#102e59" foregroundColor="#cccccc" shadowColor="#27384f" shadowOffset="-1,-1" transparent="1" noWrap="1" /> - <widget source="session.FrontendStatus" render="Label" position="355,3" size="43,22" font="Regular;16" backgroundColor="#102e59" foregroundColor="#e7e7e7" shadowColor="#27384f" shadowOffset="-1,-1" transparent="1" noWrap="1"> - <convert type="FrontendInfo">BER</convert> - </widget> - <!-- Channellogo (Picon) --> - <widget source="session.CurrentService" render="Picon" position="49,4" zPosition="1" size="70,53" alphatest="on"> - <convert type="ServiceName">Reference</convert> - </widget> - <!-- Service name --> - <widget source="session.CurrentService" render="Label" position="130,30" size="360,27" font="Regular;21" valign="center" halign="right" noWrap="1" backgroundColor="#263c59" shadowColor="#1d354c" shadowOffset="-1,-1" transparent="1"> - <convert type="ServiceName">Name</convert> - </widget> - <!-- Time --> - <ePixmap pixmap="skin_default/icons/clock.png" position="600,23" size="14,14" alphatest="on" /> - <widget source="global.CurrentTime" render="Label" position="615,21" size="55,24" font="Regular;21" halign="right" backgroundColor="#4e5a74" transparent="1"> - <convert type="ClockToText">Default</convert> - </widget> - <!-- tuners in use? --> - <widget source="session.FrontendInfo" render="Pixmap" position="142,6" size="8,9" pixmap="skin_default/nim_active.png" alphatest="on"> - <convert type="FrontendInfo">NUMBER</convert> - <convert type="ValueRange">0,0</convert> - <convert type="ConditionalShowHide" /> - </widget> - <widget source="session.FrontendInfo" render="Pixmap" position="142,19" size="8,9" pixmap="skin_default/nim_active.png" alphatest="on"> - <convert type="FrontendInfo">NUMBER</convert> - <convert type="ValueRange">1,1</convert> - <convert type="ConditionalShowHide" /> - </widget> - <widget source="session.FrontendInfo" render="Pixmap" position="142,32" size="8,9" pixmap="skin_default/nim_active.png" alphatest="on"> - <convert type="FrontendInfo">NUMBER</convert> - <convert type="ValueRange">2,2</convert> - <convert type="ConditionalShowHide" /> - </widget> - <widget source="session.FrontendInfo" render="Pixmap" position="142,45" size="8,9" pixmap="skin_default/nim_active.png" alphatest="on"> - <convert type="FrontendInfo">NUMBER</convert> - <convert type="ValueRange">3,3</convert> - <convert type="ConditionalShowHide" /> - </widget> - <widget source="session.TunerInfo" render="FixedLabel" text="A" position="129,4" size="15,13" font="Regular;14" backgroundColor="#4e5a74" transparent="1"> - <convert type="TunerInfo">TunerUseMask</convert> - <convert type="ValueBitTest">1</convert> - <convert type="ConditionalShowHide" /> - </widget> - <widget source="session.TunerInfo" render="FixedLabel" text="B" position="129,17" size="15,13" font="Regular;14" backgroundColor="#4e5a74" transparent="1"> - <convert type="TunerInfo">TunerUseMask</convert> - <convert type="ValueBitTest">2</convert> - <convert type="ConditionalShowHide" /> - </widget> - <widget source="session.TunerInfo" render="FixedLabel" text="C" position="129,30" size="15,13" font="Regular;14" backgroundColor="#4e5a74" transparent="1"> - <convert type="TunerInfo">TunerUseMask</convert> - <convert type="ValueBitTest">4</convert> - <convert type="ConditionalShowHide" /> - </widget> - <widget source="session.TunerInfo" render="FixedLabel" text="D" position="129,43" size="15,13" font="Regular;14" backgroundColor="#4e5a74" transparent="1"> - <convert type="TunerInfo">TunerUseMask</convert> - <convert type="ValueBitTest">8</convert> - <convert type="ConditionalShowHide" /> - </widget> - <!-- Crypt icon (encrypted service?) --> - <ePixmap position="563,48" zPosition="0" size="107,15" pixmap="skin_default/icons/icons_off.png" /> - <widget source="session.CurrentService" render="Pixmap" pixmap="skin_default/icons/icon_crypt.png" position="563,48" zPosition="1" size="12,16" alphatest="on"> - <convert type="ServiceInfo">IsCrypted</convert> - <convert type="ConditionalShowHide" /> - </widget> - <!-- Teletext icon (is teletext available?) --> - <widget source="session.CurrentService" render="Pixmap" pixmap="skin_default/icons/icon_txt.png" position="580,48" zPosition="1" size="26,16" alphatest="on"> - <convert type="ServiceInfo">HasTelext</convert> - <convert type="ConditionalShowHide" /> - </widget> - <!-- Videoformat icon (16:9?) --> - <widget source="session.CurrentService" render="Pixmap" pixmap="skin_default/icons/icon_format.png" position="611,48" zPosition="1" size="29,16" alphatest="on"> - <convert type="ServiceInfo">IsWidescreen</convert> - <convert type="ConditionalShowHide" /> - </widget> - <!-- Audio icon (is there multichannel audio?) --> - <widget source="session.CurrentService" render="Pixmap" pixmap="skin_default/icons/icon_dolby.png" position="645,48" zPosition="1" size="26,16" alphatest="on"> - <convert type="ServiceInfo">IsMultichannel</convert> - <convert type="ConditionalShowHide" /> - </widget> - <!-- Progressbar (current event duration)--> - <ePixmap pixmap="skin_default/progress_bg.png" position="48,77" size="84,7" transparent="1" alphatest="on" /> - <widget source="session.Event_Now" render="Progress" pixmap="skin_default/progress_small.png" position="50,78" zPosition="1" size="80,5" transparent="1"> - <convert type="EventTime">Progress</convert> - </widget> - <!-- Blinking pixmap (recording in progress?) --> - <ePixmap pixmap="skin_default/icons/icon_rec_off.png" position="561,21" size="34,21" /> - <widget source="session.RecordState" render="Pixmap" pixmap="skin_default/icons/icon_rec.png" position="561,21" zPosition="1" size="34,21"> - <convert type="ConditionalShowHide">Blink</convert> - </widget> - <!-- Event (now) --> - <ePixmap pixmap="skin_default/icons/icon_event.png" position="182,78" size="15,10" alphatest="on" /> - <widget source="session.Event_Now" render="Label" position="205,73" size="60,24" font="Regular;20" backgroundColor="#34406f" shadowColor="#1d354c" shadowOffset="-1,-1" transparent="1"> - <convert type="EventTime">StartTime</convert> - <convert type="ClockToText">Default</convert> - </widget> - <widget source="session.Event_Now" render="Label" position="265,73" size="320,24" font="Regular;20" noWrap="1" backgroundColor="#34406f" shadowColor="#1d354c" shadowOffset="-1,-1" transparent="1"> - <convert type="EventName">Name</convert> - </widget> - <widget source="session.Event_Now" render="Label" position="585,73" size="85,24" font="Regular;20" backgroundColor="#34406f" shadowColor="#1d354c" shadowOffset="-1,-1" halign="right" transparent="1"> - <convert type="EventTime">Remaining</convert> - <convert type="RemainingToText">InMinutes</convert> - </widget> - <!-- Event (next) --> - <widget source="session.Event_Next" render="Label" position="205,97" size="60,24" font="Regular;20" backgroundColor="#071f38" foregroundColor="#c3c3c9" transparent="1"> - <convert type="EventTime">StartTime</convert> - <convert type="ClockToText">Default</convert> - </widget> - <widget source="session.Event_Next" render="Label" position="265,97" size="320,24" font="Regular;20" noWrap="1" backgroundColor="#071f38" foregroundColor="#c3c3c9" transparent="1"> - <convert type="EventName">Name</convert> - </widget> - <widget source="session.Event_Next" render="Label" position="585,97" size="85,24" font="Regular;20" backgroundColor="#071f38" foregroundColor="#c3c3c9" halign="right" transparent="1"> - <convert type="EventTime">Duration</convert> - <convert type="ClockToText">InMinutes</convert> - </widget> - <!-- Red button (is recording possible?) --> - <ePixmap pixmap="skin_default/buttons/button_red_off.png" position="212,130" size="15,16" alphatest="on" /> - <widget source="RecordingPossible" render="Pixmap" pixmap="skin_default/buttons/button_red.png" position="212,130" zPosition="1" size="15,16" alphatest="on"> - <convert type="ConditionalShowHide" /> - </widget> - <!--eLabel text="Record" position="232,130" size="80,22" font="Regular;16" foregroundColor="#7f848d" backgroundColor="#182946" transparent="1" /--> - <widget source="ShowRecordOnRed" render="FixedLabel" text="Record" position="232,130" zPosition="1" size="80,22" font="Regular;16" foregroundColor="#7f848d" backgroundColor="#182946" transparent="1"> - <convert type="ConditionalShowHide" /> - </widget> - <widget source="RecordingPossible" render="FixedLabel" text="Record" position="232,130" zPosition="1" size="80,22" font="Regular;16" backgroundColor="#182946" shadowColor="#1d354c" shadowOffset="-1,-1" transparent="1"> - <convert type="ConditionalShowHide" /> - </widget> - <!-- Green button (is subservices available?) --> - <ePixmap pixmap="skin_default/buttons/button_green_off.png" position="315,130" size="15,16" alphatest="on" /> - <widget source="session.CurrentService" render="Pixmap" pixmap="skin_default/buttons/button_green.png" position="315,130" zPosition="1" size="15,16" alphatest="on"> - <convert type="ServiceInfo">SubservicesAvailable</convert> - <convert type="ConditionalShowHide" /> - </widget> - <eLabel text="Subservices" position="335,130" size="100,22" font="Regular;16" foregroundColor="#7f848d" backgroundColor="#182946" transparent="1" /> - <widget source="session.CurrentService" render="FixedLabel" text="Subservices" position="335,130" zPosition="1" size="100,22" font="Regular;16" backgroundColor="#182946" shadowColor="#1d354c" shadowOffset="-1,-1" transparent="1"> - <convert type="ServiceInfo">SubservicesAvailable</convert> - <convert type="ConditionalShowHide" /> - </widget> - <!-- Yellow button (is timeshift possible?) --> - <ePixmap pixmap="skin_default/buttons/button_yellow_off.png" position="440,130" size="15,16" alphatest="on" /> - <widget source="TimeshiftPossible" render="Pixmap" pixmap="skin_default/buttons/button_yellow.png" position="440,130" zPosition="1" size="15,16" alphatest="on"> - <convert type="ConditionalShowHide" /> - </widget> - <widget source="ShowTimeshiftOnYellow" render="FixedLabel" text="Timeshift" position="460,130" zPosition="1" size="85,22" font="Regular;16" foregroundColor="#7f848d" backgroundColor="#182946" shadowOffset="-1,-1" transparent="1"> - <convert type="ConditionalShowHide" /> - </widget> - <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" /> - </widget> - <widget source="ShowAudioOnYellow" render="FixedLabel" text="Audio" position="460,130" zPosition="1" size="85,22" font="Regular;16" backgroundColor="#182946" shadowColor="#1d354c" shadowOffset="-1,-1" transparent="1"> - <convert type="ConditionalShowHide" /> - </widget> - <!-- Blue button (is extensions available?) --> - <ePixmap pixmap="skin_default/buttons/button_blue_off.png" position="545,130" size="15,16" alphatest="on" /> - <widget source="ExtensionsAvailable" render="Pixmap" pixmap="skin_default/buttons/button_blue.png" position="545,130" zPosition="1" size="15,16" alphatest="on"> - <convert type="ConditionalShowHide" /> - </widget> - <eLabel text="Extensions" position="565,130" size="110,22" font="Regular;16" foregroundColor="#7f848d" backgroundColor="#182946" transparent="1" /> - <widget source="ExtensionsAvailable" render="FixedLabel" text="Extensions" position="565,130" zPosition="1" size="110,22" font="Regular;16" backgroundColor="#182946" shadowColor="#1d354c" shadowOffset="-1,-1" transparent="1"> - <convert type="ConditionalShowHide" /> - </widget> - </screen> - <!-- Main menu --> - <screen name="menu_mainmenu" position="center,center" size="380,285" title="Main menu"> - <widget source="title" render="Label" position="170,10" size="200,35" font="Regular;23" /> - <widget source="menu" render="Listbox" position="170,55" size="200,225" scrollbarMode="showOnDemand"> - <convert type="StringList" /> - </widget> - <widget source="menu" render="Pixmap" pixmap="skin_default/menu/shutdown.png" position="20,20" size="128,128" alphatest="on"> - <convert type="MenuEntryCompare">standby_restart_list</convert> - <convert type="ConditionalShowHide" /> - </widget> - <widget source="menu" render="Pixmap" pixmap="skin_default/menu/setup.png" position="20,20" size="128,128" alphatest="on"> - <convert type="MenuEntryCompare">setup_selection</convert> - <convert type="ConditionalShowHide" /> - </widget> - <widget source="menu" render="Pixmap" pixmap="skin_default/menu/plugins.png" position="20,20" size="128,128" alphatest="on"> - <convert type="MenuEntryCompare">plugin_selection</convert> - <convert type="ConditionalShowHide" /> - </widget> - <widget source="menu" render="Pixmap" pixmap="skin_default/menu/information.png" position="20,20" size="128,128" alphatest="on"> - <convert type="MenuEntryCompare">info_screen</convert> - <convert type="ConditionalShowHide" /> - </widget> - <widget source="menu" render="Pixmap" pixmap="skin_default/menu/scart.png" position="20,20" size="128,128" alphatest="on"> - <convert type="MenuEntryCompare">scart_switch</convert> - <convert type="ConditionalShowHide" /> - </widget> - <widget source="menu" render="Pixmap" pixmap="skin_default/menu/timer.png" position="20,20" size="128,128" alphatest="on"> - <convert type="MenuEntryCompare">timer_edit</convert> - <convert type="ConditionalShowHide" /> - </widget> - <widget source="menu" render="Pixmap" pixmap="skin_default/menu/media_player.png" position="20,20" size="128,128" alphatest="on"> - <convert type="MenuEntryCompare">media_player</convert> - <convert type="ConditionalShowHide" /> - </widget> - <widget source="menu" render="Pixmap" pixmap="skin_default/menu/dvd_player.png" position="20,20" size="128,128" alphatest="on"> - <convert type="MenuEntryCompare">dvd_player</convert> - <convert type="ConditionalShowHide" /> - </widget> - <widget source="menu" render="Pixmap" pixmap="skin_default/menu/subtitles.png" position="20,20" size="128,128" alphatest="on"> - <convert type="MenuEntryCompare">subtitle_selection</convert> - <convert type="ConditionalShowHide"/> - </widget> - </screen> - <!-- Movieplayer infobar --> - <screen name="MoviePlayer" flags="wfNoBorder" position="0,380" size="720,160" title="InfoBar" backgroundColor="transparent"> - <!-- Background --> - <ePixmap position="0,0" pixmap="skin_default/info-bg_mp.png" zPosition="-1" size="720,160" /> - <ePixmap position="29,40" pixmap="skin_default/screws_mp.png" size="665,104" alphatest="on" /> - <!-- colorbuttons --> - <ePixmap position="48,70" pixmap="skin_default/icons/mp_buttons.png" size="108,13" alphatest="on" /> - <!-- Servicename --> - <ePixmap pixmap="skin_default/icons/icon_event.png" position="207,78" size="15,10" alphatest="on" /> - <widget source="session.CurrentService" render="Label" position="230,73" size="360,40" font="Regular;20" backgroundColor="#263c59" shadowColor="#1d354c" shadowOffset="-1,-1" transparent="1"> - <convert type="ServiceName">Name</convert> - </widget> - <!-- movie length --> - <widget source="session.CurrentService" render="Label" position="580,73" size="90,24" font="Regular;20" halign="right" backgroundColor="#4e5a74" transparent="1"> - <convert type="ServicePosition">Length</convert> - </widget> - <!-- Elapsed time --> - <widget source="session.CurrentService" render="Label" position="205,129" size="100,20" font="Regular;18" halign="center" valign="center" backgroundColor="#06224f" shadowColor="#1d354c" shadowOffset="-1,-1" transparent="1"> - <convert type="ServicePosition">Position</convert> - </widget> - <!-- Progressbar (movie position)--> - <widget source="session.CurrentService" render="PositionGauge" position="300,133" size="270,10" zPosition="2" pointer="skin_default/position_pointer.png:540,0" transparent="1" foregroundColor="#20224f"> - <convert type="ServicePosition">Gauge</convert> - </widget> - <!-- Remaining time --> - <widget source="session.CurrentService" render="Label" position="576,129" size="100,20" font="Regular;18" halign="center" valign="center" backgroundColor="#06224f" shadowColor="#1d354c" shadowOffset="-1,-1" transparent="1"> - <convert type="ServicePosition">Remaining,Negate</convert> - </widget> - </screen> - - <!-- LCD screen (main) --> - <screen name="InfoBarSummary" position="0,0" size="132,64"> - <widget source="session.CurrentService" render="Label" position="3,0" size="90,25" font="Regular;14" halign="center" valign="center" > - <convert type="ServiceName">Name</convert> - </widget> - <widget source="session.Event_Now" render="Progress" position="8,27" size="80,5" borderWidth="1"> - <convert type="EventTime">Progress</convert> - </widget> - <widget source="global.CurrentTime" render="Label" position="3,32" size="65,32" font="Regular;26" halign="right" valign="top"> - <convert type="ClockToText">Format:%H:%M</convert> - </widget> - <widget source="global.CurrentTime" render="Label" position="70,34" zPosition="1" size="26,30" font="Regular;14" valign="top"> - <convert type="ClockToText">Format:%S</convert> - </widget> - <widget source="session.RecordState" render="FixedLabel" text=" " position="6,30" zPosition="1" size="120,34"> - <convert type="ConfigEntryTest">config.usage.blinking_display_clock_during_recording,True,CheckSourceBoolean</convert> - <convert type="ConditionalShowHide">Blink</convert> - </widget> - </screen> -</skin> -- cgit v1.2.3 From f2b1a7e86c4143b6112a119bd00a2adcc0844b71 Mon Sep 17 00:00:00 2001 From: ghost <andreas.monzner@multimedia-labs.de> Date: Tue, 1 Jun 2010 16:08:32 +0200 Subject: add support for rbg565 color oled --- data/skin.xml | 14 ++++ data/skin_default.xml | 16 +++++ lib/gdi/font.cpp | 86 ++++++++++++++++++---- lib/gdi/glcddc.cpp | 8 +-- lib/gdi/gpixmap.cpp | 193 +++++++++++++++++++++++++++++++++++++++++++++----- lib/gdi/lcd.cpp | 103 +++++++++++++++++++-------- lib/gdi/lcd.h | 6 +- main/enigma.cpp | 8 +-- skin.py | 20 ++++-- 9 files changed, 377 insertions(+), 77 deletions(-) (limited to 'data') diff --git a/data/skin.xml b/data/skin.xml index 32adb2be..868fbc4b 100755 --- a/data/skin.xml +++ b/data/skin.xml @@ -61,6 +61,20 @@ <color name="WindowTitleForeground" color="#ffffff" /> <color name="WindowTitleBackground" color="#000000" /> </windowstyle> + <windowstyle type="skinned" id="2"> + <color name="Background" color="#000000" /> + <color name="LabelForeground" color="#ffffff" /> + <color name="ListboxBackground" color="#000000" /> + <color name="ListboxForeground" color="#ffffff" /> + <color name="ListboxSelectedBackground" color="#000000" /> + <color name="ListboxSelectedForeground" color="#ffffff" /> + <color name="ListboxMarkedBackground" color="#000000" /> + <color name="ListboxMarkedForeground" color="#ffffff" /> + <color name="ListboxMarkedAndSelectedBackground" color="#000000" /> + <color name="ListboxMarkedAndSelectedForeground" color="#ffffff" /> + <color name="WindowTitleForeground" color="#ffffff" /> + <color name="WindowTitleBackground" color="#000000" /> + </windowstyle> <!-- Fonts --> <fonts> <!-- <font filename="md_khmurabi_10.ttf" name="Regular" scale="90" /> --> diff --git a/data/skin_default.xml b/data/skin_default.xml index aceafd73..7262f43c 100755 --- a/data/skin_default.xml +++ b/data/skin_default.xml @@ -1130,6 +1130,22 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y())) <convert type="ConditionalShowHide">Blink</convert> </widget> </screen> + <!-- Color OLED screen (main) --> + <screen name="InfoBarSummary" position="0,0" size="96,64" id="2"> + <widget source="session.CurrentService" render="Label" position="0,0" size="96,25" font="Regular;14" halign="center" valign="center" > + <convert type="ServiceName">Name</convert> + </widget> + <widget source="session.Event_Now" render="Progress" position="0,27" size="96,5" borderWidth="1" > + <convert type="EventTime">Progress</convert> + </widget> + <widget source="global.CurrentTime" render="Label" position="0,32" size="96,32" font="Regular;32" halign="center" valign="center" foregroundColor="#FFFFFF" backgroundColor="#000000" > + <convert type="ClockToText">Format:%H:%M</convert> + </widget> + <widget source="session.RecordState" render="FixedLabel" text=" " position="0,32" zPosition="1" size="96,32"> + <convert type="ConfigEntryTest">config.usage.blinking_display_clock_during_recording,True,CheckSourceBoolean</convert> + <convert type="ConditionalShowHide">Blink</convert> + </widget> + </screen> <!-- LCD screen (menus) --> <screen name="MenuSummary" position="0,0" size="132,64"> <widget source="parent.title" render="Label" position="6,0" size="120,32" font="Regular;14" halign="center" valign="center"/> diff --git a/lib/gdi/font.cpp b/lib/gdi/font.cpp index f27a8f77..0d2e958f 100644 --- a/lib/gdi/font.cpp +++ b/lib/gdi/font.cpp @@ -41,6 +41,8 @@ static pthread_mutex_t ftlock=PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP; static FTC_Font cache_current_font=0; #endif +#define RBG565 + struct fntColorCacheKey { gRGB start, end; @@ -766,8 +768,9 @@ void eTextPara::blit(gDC &dc, const ePoint &offset, const gRGB &background, cons gColor *lookup8, lookup8_invert[16]; gColor *lookup8_normal=0; + __u16 lookup16_normal[16], lookup16_invert[16], *lookup16; __u32 lookup32_normal[16], lookup32_invert[16], *lookup32; - + if (surface->bpp == 8) { if (surface->clut.data) @@ -781,10 +784,33 @@ void eTextPara::blit(gDC &dc, const ePoint &offset, const gRGB &background, cons opcode=0; } else opcode=1; + } else if (surface->bpp == 16) + { + opcode=2; + for (int i=0; i<16; ++i) + { +#define BLEND(y, x, a) (y + (((x-y) * a)>>8)) + + unsigned char dr = background.r, dg = background.g, db = background.b; + int sa = i * 16; + if (sa < 256) + { + dr = BLEND(background.r, foreground.r, sa) & 0xFF; + dg = BLEND(background.g, foreground.g, sa) & 0xFF; + db = BLEND(background.b, foreground.b, sa) & 0xFF; + } +#undef BLEND +#ifdef RBG565 + lookup16_normal[i] = ((dr >> 3) << 11) | ((db >> 2) << 5) | (dg >> 3); +#else + lookup16_normal[i] = ((dr >> 3) << 11) | ((dg >> 2) << 5) | (db >> 3); +#endif + } + for (int i=0; i<16; ++i) + lookup16_invert[i]=lookup16_normal[i^0xF]; } else if (surface->bpp == 32) { opcode=3; - for (int i=0; i<16; ++i) { #define BLEND(y, x, a) (y + (((x-y) * a)>>8)) @@ -809,7 +835,7 @@ void eTextPara::blit(gDC &dc, const ePoint &offset, const gRGB &background, cons eWarning("can't render to %dbpp", surface->bpp); return; } - + gRegion area(eRect(0, 0, surface->x, surface->y)); gRegion clip = dc.getClip() & area; @@ -835,10 +861,12 @@ void eTextPara::blit(gDC &dc, const ePoint &offset, const gRGB &background, cons if (!(i->flags & GS_INVERT)) { lookup8 = lookup8_normal; + lookup16 = lookup16_normal; lookup32 = lookup32_normal; } else { lookup8 = lookup8_invert; + lookup16 = lookup16_invert; lookup32 = lookup32_invert; } @@ -873,46 +901,76 @@ void eTextPara::blit(gDC &dc, const ePoint &offset, const gRGB &background, cons d+=diff*buffer_stride; } if (sx>0) - for (int ay=0; ay<sy; ay++) - { - if (!opcode) // 4bit lookup to 8bit + { + switch(opcode) { + case 0: // 4bit lookup to 8bit + for (int ay=0; ay<sy; ay++) { register __u8 *td=d; register int ax; - for (ax=0; ax<sx; ax++) - { + { register int b=(*s++)>>4; if(b) *td++=lookup8[b]; else td++; } - } else if (opcode == 1) // 8bit direct + s+=glyph_bitmap->pitch-sx; + d+=buffer_stride; + } + break; + case 1: // 8bit direct + for (int ay=0; ay<sy; ay++) { register __u8 *td=d; register int ax; for (ax=0; ax<sx; ax++) - { + { register int b=*s++; *td++^=b; } - } else + s+=glyph_bitmap->pitch-sx; + d+=buffer_stride; + } + break; + case 2: // 16bit + for (int ay=0; ay<sy; ay++) + { + register __u16 *td=(__u16*)d; + register int ax; + for (ax=0; ax<sx; ax++) + { + register int b=(*s++)>>4; + if(b) + *td++=lookup16[b]; + else + td++; + } + s+=glyph_bitmap->pitch-sx; + d+=buffer_stride; + } + break; + case 3: // 32bit + for (int ay=0; ay<sy; ay++) { register __u32 *td=(__u32*)d; register int ax; for (ax=0; ax<sx; ax++) - { + { register int b=(*s++)>>4; if(b) *td++=lookup32[b]; else td++; } + s+=glyph_bitmap->pitch-sx; + d+=buffer_stride; } - s+=glyph_bitmap->pitch-sx; - d+=buffer_stride; + default: + break; } + } } } } diff --git a/lib/gdi/glcddc.cpp b/lib/gdi/glcddc.cpp index 8612c70b..a593cfa3 100644 --- a/lib/gdi/glcddc.cpp +++ b/lib/gdi/glcddc.cpp @@ -14,13 +14,13 @@ gLCDDC::gLCDDC() surface.x=lcd->size().width(); surface.y=lcd->size().height(); - surface.bpp=8; - surface.bypp=1; surface.stride=lcd->stride(); + surface.bypp=surface.stride / surface.x; + surface.bpp=surface.bypp*8; surface.data=lcd->buffer(); - - surface.clut.colors=256; + surface.clut.colors=0; surface.clut.data=0; + m_pixmap = new gPixmap(&surface); } diff --git a/lib/gdi/gpixmap.cpp b/lib/gdi/gpixmap.cpp index 3e643108..6f93d560 100644 --- a/lib/gdi/gpixmap.cpp +++ b/lib/gdi/gpixmap.cpp @@ -4,6 +4,8 @@ #include <lib/gdi/region.h> #include <lib/gdi/accel.h> +#define RBG565 + gLookup::gLookup() :size(0), lookup(0) { @@ -154,6 +156,26 @@ void gPixmap::fill(const gRegion ®ion, const gColor &color) { for (int y=area.top(); y<area.bottom(); y++) memset(((__u8*)surface->data)+y*surface->stride+area.left(), color.color, area.width()); + } else if (surface->bpp == 16) + { + __u32 icol; + + if (surface->clut.data && color < surface->clut.colors) + icol=(surface->clut.data[color].a<<24)|(surface->clut.data[color].r<<16)|(surface->clut.data[color].g<<8)|(surface->clut.data[color].b); + else + icol=0x10101*color; +#ifdef RBG565 + __u16 col = ((icol & 0xFF0000) >> 19) << 11 | ((icol & 0xFF) >> 2) << 5 | (icol & 0xFF00) >> 11; +#else + __u16 col = ((icol & 0xFF0000) >> 19) << 11 | ((icol & 0xFF00) >> 10) << 5 | (icol & 0xFF) >> 3; +#endif + for (int y=area.top(); y<area.bottom(); y++) + { + __u16 *dst=(__u16*)(((__u8*)surface->data)+y*surface->stride+area.left()*surface->bypp); + int x=area.width(); + while (x--) + *dst++=col; + } } else if (surface->bpp == 32) { __u32 col; @@ -208,18 +230,33 @@ void gPixmap::fill(const gRegion ®ion, const gRGB &color) while (x--) *dst++=col; } + } else if (surface->bpp == 16) + { + __u32 icol = color.argb(); +#ifdef RBG565 + __u16 col = ((icol & 0xFF0000) >> 19) << 11 | ((icol & 0xFF) >> 2) << 5 | (icol & 0xFF00) >> 11; +#else + __u16 col = ((icol & 0xFF0000) >> 19) << 11 | ((icol & 0xFF00) >> 10) << 5 | (icol & 0xFF) >> 3; +#endif + for (int y=area.top(); y<area.bottom(); y++) + { + __u16 *dst=(__u16*)(((__u8*)surface->data)+y*surface->stride+area.left()*surface->bypp); + int x=area.width(); + while (x--) + *dst++=col; + } } else eWarning("couldn't rgbfill %d bpp", surface->bpp); } } -static void blit_8i_to_32(__u32 *dst, __u8 *src, __u32 *pal, int width) +static inline void blit_8i_to_32(__u32 *dst, __u8 *src, __u32 *pal, int width) { while (width--) *dst++=pal[*src++]; } -static void blit_8i_to_32_at(__u32 *dst, __u8 *src, __u32 *pal, int width) +static inline void blit_8i_to_32_at(__u32 *dst, __u8 *src, __u32 *pal, int width) { while (width--) { @@ -232,6 +269,25 @@ static void blit_8i_to_32_at(__u32 *dst, __u8 *src, __u32 *pal, int width) } } +static inline void blit_8i_to_16(__u16 *dst, __u8 *src, __u32 *pal, int width) +{ + while (width--) + *dst++=pal[*src++] & 0xFFFF; +} + +static inline void blit_8i_to_16_at(__u16 *dst, __u8 *src, __u32 *pal, int width) +{ + while (width--) + { + if (!(pal[*src]&0x80000000)) + { + src++; + dst++; + } else + *dst++=pal[*src++] & 0xFFFF; + } +} + /* WARNING, this function is not endian safe! */ static void blit_8i_to_32_ab(__u32 *dst, __u8 *src, __u32 *pal, int width) { @@ -441,6 +497,95 @@ void gPixmap::blit(const gPixmap &src, const eRect &_pos, const gRegion &clip, i srcptr+=src.surface->stride; dstptr+=surface->stride; } + } else if ((surface->bpp == 16) && (src.surface->bpp==8)) + { + __u8 *srcptr=(__u8*)src.surface->data; + __u8 *dstptr=(__u8*)surface->data; // !! + __u32 pal[256]; + + for (int i=0; i<256; ++i) + { + __u32 icol; + if (src.surface->clut.data && (i<src.surface->clut.colors)) + icol=(src.surface->clut.data[i].a<<24)|(src.surface->clut.data[i].r<<16)|(src.surface->clut.data[i].g<<8)|(src.surface->clut.data[i].b); + else + icol=0x010101*i; +#ifdef RBG565 + pal[i]=icol&0xFF000000 | ((icol & 0xFF0000) >> 19) << 11 | ((icol & 0xFF) >> 2) << 5 | (icol & 0xFF00) >> 11; +#else + pal[i]=icol&0xFF000000 | ((icol & 0xFF0000) >> 19) << 11 | ((icol & 0xFF00) >> 10) << 5 | (icol & 0xFF) >> 3; +#endif + pal[i]^=0xFF000000; + } + + srcptr+=srcarea.left()*src.surface->bypp+srcarea.top()*src.surface->stride; + dstptr+=area.left()*surface->bypp+area.top()*surface->stride; + + if (flag & blitAlphaBlend) + eWarning("ignore unsupported 8bpp -> 16bpp alphablend!"); + + for (int y=0; y<area.height(); y++) + { + int width=area.width(); + unsigned char *psrc=(unsigned char*)srcptr; + __u16 *dst=(__u16*)dstptr; + if (flag & blitAlphaTest) + blit_8i_to_16_at(dst, psrc, pal, width); + else + blit_8i_to_16(dst, psrc, pal, width); + srcptr+=src.surface->stride; + dstptr+=surface->stride; + } + } else if ((surface->bpp == 16) && (src.surface->bpp==32)) + { + __u8 *srcptr=(__u8*)src.surface->data; + __u8 *dstptr=(__u8*)surface->data; + + srcptr+=srcarea.left()+srcarea.top()*src.surface->stride; + dstptr+=area.left()+area.top()*surface->stride; + + if (flag & blitAlphaBlend) + eWarning("ignore unsupported 32bpp -> 16bpp alphablend!"); + + for (int y=0; y<area.height(); y++) + { + int width=area.width(); + __u32 *srcp=(__u32*)srcptr; + __u16 *dstp=(__u16*)dstptr; + + if (flag & blitAlphaTest) + { + while (width--) + { + if (!((*srcp)&0xFF000000)) + { + srcp++; + dstp++; + } else + { + __u32 icol = *srcp++; +#ifdef RBG565 + *dstp++=((icol & 0xFF0000) >> 19) << 11 | ((icol & 0xFF) >> 2) << 5 | (icol & 0xFF00) >> 11; +#else + *dstp++=((icol & 0xFF0000) >> 19) << 11 | ((icol & 0xFF00) >> 10) << 5 | (icol & 0xFF) >> 3; +#endif + } + } + } else + { + while (width--) + { + __u32 icol = *srcp++; +#ifdef RBG565 + *dstp++=((icol & 0xFF0000) >> 19) << 11 | ((icol & 0xFF) >> 2) << 5 | (icol & 0xFF00) >> 11; +#else + *dstp++=((icol & 0xFF0000) >> 19) << 11 | ((icol & 0xFF00) >> 10) << 5 | (icol & 0xFF) >> 3; +#endif + } + } + srcptr+=src.surface->stride; + dstptr+=surface->stride; + } } else eWarning("cannot blit %dbpp from %dbpp", surface->bpp, src.surface->bpp); } @@ -488,27 +633,36 @@ static inline int sgn(int a) void gPixmap::line(const gRegion &clip, ePoint start, ePoint dst, gColor color) { __u8 *srf8 = 0; - __u32 *srf32 = 0; + __u16 *srf16 = 0; + __u32 *srf32 = 0; int stride = surface->stride; - + if (clip.rects.empty()) return; - + + __u16 col16; __u32 col = 0; if (surface->bpp == 8) - { srf8 = (__u8*)surface->data; - } else if (surface->bpp == 32) + else { srf32 = (__u32*)surface->data; - if (surface->clut.data && color < surface->clut.colors) col=(surface->clut.data[color].a<<24)|(surface->clut.data[color].r<<16)|(surface->clut.data[color].g<<8)|(surface->clut.data[color].b); else col=0x10101*color; - col^=0xFF000000; + col^=0xFF000000; } - + + if (surface->bpp == 16) + { +#ifdef RBG565 + col16=((col & 0xFF0000) >> 19) << 11 | ((col & 0xFF) >> 2) << 5 | (col & 0xFF00) >> 11; +#else + col16=((col & 0xFF0000) >> 19) << 11 | ((col & 0xFF00) >> 10) << 5 | (col & 0xFF) >> 3; +#endif + } + int xa = start.x(), ya = start.y(), xb = dst.x(), yb = dst.y(); int dx, dy, x, y, s1, s2, e, temp, swap, i; dy=abs(yb-ya); @@ -526,7 +680,7 @@ void gPixmap::line(const gRegion &clip, ePoint start, ePoint dst, gColor color) } else swap=0; e = 2*dy-dx; - + int lasthit = 0; for(i=1; i<=dx; i++) { @@ -563,20 +717,25 @@ void gPixmap::line(const gRegion &clip, ePoint start, ePoint dst, gColor color) } while (!clip.rects[a].contains(x, y)); lasthit = a; } - + if (srf8) srf8[y * stride + x] = color; - if (srf32) + else if (srf16) + srf16[y * stride/2 + x] = col16; + else srf32[y * stride/4 + x] = col; fail: while (e>=0) { - if (swap==1) x+=s1; - else y+=s2; + if (swap==1) + x+=s1; + else + y+=s2; e-=2*dx; } - if (swap==1) - y+=s2; + + if (swap==1) + y+=s2; else x+=s1; e+=2*dy; diff --git a/lib/gdi/lcd.cpp b/lib/gdi/lcd.cpp index 0908d890..a953ef0d 100644 --- a/lib/gdi/lcd.cpp +++ b/lib/gdi/lcd.cpp @@ -14,13 +14,19 @@ eDBoxLCD *eDBoxLCD::instance; -eLCD::eLCD(eSize size): res(size) +eLCD::eLCD() { lcdfd = -1; locked=0; - _buffer=new unsigned char[res.height()*res.width()]; - memset(_buffer, 0, res.height()*res.width()); - _stride=res.width(); +} + +void eLCD::setSize(int xres, int yres, int bpp) +{ + res = eSize(xres, yres); + _buffer=new unsigned char[xres * yres * bpp/8]; + memset(_buffer, 0, res.height()*res.width()*bpp/8); + _stride=res.width()*bpp/8; + eDebug("lcd buffer %p %d bytes, stride %d", _buffer, xres*yres*bpp/8, _stride); } eLCD::~eLCD() @@ -42,8 +48,9 @@ void eLCD::unlock() locked=0; } -eDBoxLCD::eDBoxLCD(): eLCD(eSize(132, 64)) +eDBoxLCD::eDBoxLCD() { + int xres=132, yres=64, bpp=8; is_oled = 0; #ifndef NO_LCD lcdfd = open("/dev/dbox/oled0", O_RDWR); @@ -75,13 +82,37 @@ eDBoxLCD::eDBoxLCD(): eLCD(eSize(132, 64)) int i=LCD_MODE_BIN; ioctl(lcdfd, LCD_IOCTL_ASC_MODE, &i); inverted=0; + FILE *f = fopen("/proc/stb/lcd/xres", "r"); + if (f) + { + int tmp; + if (fscanf(f, "%x", &tmp) == 1) + xres = tmp; + fclose(f); + f = fopen("/proc/stb/lcd/yres", "r"); + if (f) + { + if (fscanf(f, "%x", &tmp) == 1) + yres = tmp; + fclose(f); + f = fopen("/proc/stb/lcd/bpp", "r"); + if (f) + { + if (fscanf(f, "%x", &tmp) == 1) + bpp = tmp; + fclose(f); + } + } + is_oled = 3; + } } + setSize(xres, yres, bpp); } void eDBoxLCD::setInverted(unsigned char inv) { inverted=inv; - update(); + update(); } int eDBoxLCD::setLCDContrast(int contrast) @@ -145,42 +176,52 @@ eDBoxLCD *eDBoxLCD::getInstance() void eDBoxLCD::update() { - if (!is_oled || is_oled == 2) + if (lcdfd >= 0) { - unsigned char raw[132*8]; - int x, y, yy; - for (y=0; y<8; y++) + if (!is_oled || is_oled == 2) { - for (x=0; x<132; x++) + unsigned char raw[132*8]; + int x, y, yy; + for (y=0; y<8; y++) { - int pix=0; - for (yy=0; yy<8; yy++) + for (x=0; x<132; x++) { - pix|=(_buffer[(y*8+yy)*132+x]>=108)<<yy; + int pix=0; + for (yy=0; yy<8; yy++) + { + pix|=(_buffer[(y*8+yy)*132+x]>=108)<<yy; + } + raw[y*132+x]=(pix^inverted); } - raw[y*132+x]=(pix^inverted); } - } - if (lcdfd >= 0) write(lcdfd, raw, 132*8); - } else - { - unsigned char raw[64*64]; - int x, y; - memset(raw, 0, 64*64); - for (y=0; y<64; y++) + } + else if (is_oled == 3) { + FILE *f = fopen("/tmp/bla", "w+"); + if (f) { + fwrite(_buffer, _stride * res.height(), 1, f); + fclose(f); + } + write(lcdfd, _buffer, _stride * res.height()); + } + else { - int pix=0; - for (x=0; x<128 / 2; x++) + unsigned char raw[64*64]; + int x, y; + memset(raw, 0, 64*64); + for (y=0; y<64; y++) { - pix = (_buffer[y*132 + x * 2 + 2] & 0xF0) |(_buffer[y*132 + x * 2 + 1 + 2] >> 4); - if (inverted) - pix = 0xFF - pix; - raw[y*64+x] = pix; + int pix=0; + for (x=0; x<128 / 2; x++) + { + pix = (_buffer[y*132 + x * 2 + 2] & 0xF0) |(_buffer[y*132 + x * 2 + 1 + 2] >> 4); + if (inverted) + pix = 0xFF - pix; + raw[y*64+x] = pix; + } } - } - if (lcdfd >= 0) write(lcdfd, raw, 64*64); + } } } diff --git a/lib/gdi/lcd.h b/lib/gdi/lcd.h index 99f921b5..e7b4c2c4 100644 --- a/lib/gdi/lcd.h +++ b/lib/gdi/lcd.h @@ -13,10 +13,11 @@ class eLCD { #ifdef SWIG - eLCD(eSize size); + eLCD(); ~eLCD(); #else protected: + void setSize(int xres, int yres, int bpp); eSize res; unsigned char *_buffer; int lcdfd; @@ -29,12 +30,11 @@ public: int islocked() { return locked; } bool detected() { return lcdfd >= 0; } #ifndef SWIG - eLCD(eSize size); + eLCD(); virtual ~eLCD(); __u8 *buffer() { return (__u8*)_buffer; } int stride() { return _stride; } eSize size() { return res; } - virtual void update()=0; #endif }; diff --git a/main/enigma.cpp b/main/enigma.cpp index 3f420b4b..b8554d58 100644 --- a/main/enigma.cpp +++ b/main/enigma.cpp @@ -172,11 +172,11 @@ int main(int argc, char **argv) eTextPara::forceReplacementGlyph(i); eWidgetDesktop dsk(eSize(720, 576)); - eWidgetDesktop dsk_lcd(eSize(132, 64)); - + eWidgetDesktop dsk_lcd(my_lcd_dc->size()); + dsk.setStyleID(0); - dsk_lcd.setStyleID(1); - + dsk_lcd.setStyleID(my_lcd_dc->size().width() == 96 ? 2 : 1); + /* if (double_buffer) { eDebug(" - double buffering found, enable buffered graphics mode."); diff --git a/skin.py b/skin.py index 064fd219..a269b4f1 100755 --- a/skin.py +++ b/skin.py @@ -241,6 +241,8 @@ def applySingleAttribute(guiObject, desktop, attrib, value, scale = ((1,1),(1,1) guiObject.setShadowOffset(parsePosition(value, scale)) elif attrib == 'noWrap': guiObject.setNoWrap(1) + elif attrib == 'id': + pass else: raise SkinError("unsupported attribute " + attrib + "=" + value) except int: @@ -395,12 +397,14 @@ def loadSkinData(desktop): for (path, dom_skin) in skins: loadSingleSkinData(desktop, dom_skin, path) -def lookupScreen(name): +def lookupScreen(name, style_id = None): for (path, skin) in dom_skins: # first, find the corresponding screen element for x in skin.findall("screen"): if x.attrib.get('name', '') == name: - return x, path + screen_style_id = int(x.attrib.get('id', None) or '0') + if style_id is None or screen_style_id == style_id: + return x, path return None, None class additionalWidget: @@ -412,9 +416,11 @@ def readSkin(screen, skin, names, desktop): name = "<embedded-in-'%s'>" % screen.__class__.__name__ + style_id = desktop.getStyleID(); + # try all skins, first existing one have priority for n in names: - myscreen, path = lookupScreen(n) + myscreen, path = lookupScreen(n, style_id) if myscreen is not None: # use this name for debug output name = n @@ -427,7 +433,13 @@ def readSkin(screen, skin, names, desktop): # try uncompiled embedded skin if myscreen is None and getattr(screen, "skin", None): print "Looking for embedded skin" - myscreen = screen.parsedSkin = xml.etree.cElementTree.fromstring(screen.skin) + skin_tuple = screen.skin + if not isinstance(skin_tuple, tuple): + skin_tuple = (skin_tuple,) + for sskin in skin_tuple: + parsedSkin = xml.etree.cElementTree.fromstring(sskin) + if style_id != 2 or parsedSkin.attrib.get('id', 0) == 2: + myscreen = screen.parsedSkin = parsedSkin #assert myscreen is not None, "no skin for screen '" + repr(names) + "' found!" if myscreen is None: -- cgit v1.2.3 From 1445e37b9d2b2d17009cf2b91c24b895a288a702 Mon Sep 17 00:00:00 2001 From: acid-burn <acid-burn@opendreambox.org> Date: Thu, 10 Jun 2010 15:19:12 +0200 Subject: add missing dm800se color oled screens. refs #530 --- data/skin_default.xml | 227 +++++++++++++++------ lib/python/Plugins/Extensions/DVDPlayer/plugin.py | 19 +- .../Plugins/Extensions/MediaPlayer/plugin.py | 11 +- .../Plugins/SystemPlugins/NFIFlash/flasher.py | 14 +- .../Plugins/SystemPlugins/Videomode/VideoWizard.py | 14 +- 5 files changed, 211 insertions(+), 74 deletions(-) mode change 100644 => 100755 lib/python/Plugins/SystemPlugins/NFIFlash/flasher.py mode change 100644 => 100755 lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py (limited to 'data') diff --git a/data/skin_default.xml b/data/skin_default.xml index 7262f43c..a2bcc6f7 100755 --- a/data/skin_default.xml +++ b/data/skin_default.xml @@ -203,9 +203,7 @@ self.instance.move(ePoint((720-wsizex)/2, (576-wsizey)/(count > 7 and 2 or 3) </applet> </screen> - <screen name="ChoiceBox_summary" position="0,0" size="132,64"> - <widget source="parent.summary_list" render="Label" position="6,0" size="126,64" font="Regular;11" /> - </screen> + <!-- Common interface --> <screen name="MMIDialog" position="center,center" size="450,270"> <widget name="title" position="10,10" size="430,25" font="Regular;23" /> @@ -550,10 +548,6 @@ newwidth = wsize[0] self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y())) </applet> </screen> - <screen name="MessageBox_summary" position="0,0" size="132,64"> - <widget source="parent.Text" render="Label" position="0,0" size="132,52" font="Regular;11" halign="center" valign="center" /> - <widget source="parent.selectedChoice" render="Label" position="6,50" size="120,14" font="Regular;14" halign="center" valign="center" /> - </screen> <!-- Minute input --> <screen name="MinuteInput" position="center,center" size="280,60" title="Seek"> <widget name="minutes" position="80,15" size="160,25" halign="right" font="Regular;23" /> @@ -1093,11 +1087,55 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y())) <ePixmap pixmap="skin_default/volume.png" position="0,0" size="214,21" /> <widget name="Volume" pixmap="skin_default/progress_small.png" position="31,7" zPosition="1" size="168,7" transparent="1" /> </screen> + <!-- JobView --> + <screen name="JobView" position="center,center" size="520,350" title="Job View"> + <widget source="job_name" render="Label" position="20,12" size="480,60" font="Regular;28" /> + <widget source="job_task" render="Label" position="20,90" size="480,50" font="Regular;23" /> + <widget source="job_progress" render="Progress" position="20,162" size="480,36" borderWidth="2" backgroundColor="#254f7497" /> + <widget source="job_progress" render="Label" position="120,166" size="280,32" font="Regular;28" foregroundColor="#000000" zPosition="2" halign="center" transparent="1" > + <convert type="ProgressToText" /> + </widget> + <widget source="job_status" render="Label" position="20,212" size="480,26" font="Regular;23" /> + <widget name="config" position="20,254" size="480,20" /> + <widget source="cancelable" render="Pixmap" pixmap="skin_default/buttons/red.png" position="20,300" size="140,40" alphatest="on" > + <convert type="ConditionalShowHide" /> + </widget> + <widget source="cancelable" render="FixedLabel" text="Cancel" position="20,300" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" > + <convert type="ConditionalShowHide" /> + </widget> + <widget source="finished" render="Pixmap" pixmap="skin_default/buttons/green.png" position="190,300" size="140,40" alphatest="on" > + <convert type="ConditionalShowHide" /> + </widget> + <widget source="finished" render="FixedLabel" text="OK" font="Regular;20" halign="center" valign="center" position="190,300" size="140,40" transparent="1" backgroundColor="#1f771f" > + <convert type="ConditionalShowHide" /> + </widget> + <widget source="backgroundable" render="Pixmap" pixmap="skin_default/buttons/blue.png" position="360,300" size="140,40" alphatest="on" > + <convert type="ConditionalShowHide" /> + </widget> + <widget source="backgroundable" render="FixedLabel" text="Continue in background" font="Regular;20" halign="center" valign="center" position="360,300" size="140,40" transparent="1" backgroundColor="#18188b" > + <convert type="ConditionalShowHide" /> + </widget> + </screen> + <!-- VirtualKeyBoard --> + <screen name="VirtualKeyBoard" position="center,center" size="560,350" zPosition="99" title="Virtual KeyBoard"> + <ePixmap pixmap="skin_default/vkey_text.png" position="9,35" zPosition="-4" size="542,52" alphatest="on" /> + <widget name="header" position="10,10" size="500,20" font="Regular;20" transparent="1" noWrap="1" /> + <widget name="text" position="12,35" size="536,46" font="Regular;46" transparent="1" noWrap="1" halign="right" /> + <widget name="list" position="10,100" size="540,225" selectionDisabled="1" transparent="1" /> + </screen> + <!-- FileBrowser --> + <screen name="FileBrowser" position="center,center" size="520,430" title="DVD File Browser" > + <ePixmap pixmap="skin_default/buttons/red.png" position="0,0" size="140,40" alphatest="on" /> + <ePixmap pixmap="skin_default/buttons/green.png" position="140,0" size="140,40" alphatest="on" /> + <widget source="key_red" render="Label" position="0,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" /> + <widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" /> + <widget name="filelist" position="5,50" size="510,370" scrollbarMode="showOnDemand" /> + </screen> <!-- LCD/OLED Screens --> <!-- LCD screen (channelselection) --> - <screen name="ChannelSelection_summary" position="0,0" size="132,64"> + <screen name="ChannelSelection_summary" position="0,0" size="132,64" id="1"> <widget source="parent.ServiceEvent" render="Label" position="6,0" size="120,25" font="Regular;14" halign="center" valign="center" > <convert type="ServiceName">Name</convert> </widget> @@ -1110,9 +1148,21 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y())) <widget source="global.CurrentTime" render="Label" position="100,34" zPosition="1" size="26,30" font="Regular;16" valign="top"> <convert type="ClockToText">Format:%S</convert> </widget> + </screen> + <!-- Color OLED screen (ChannelSelection) --> + <screen name="ChannelSelection_summary" position="0,0" size="96,64" id="2"> + <widget source="parent.ServiceEvent" render="Label" position="0,0" size="96,25" font="Regular;14" halign="center" valign="center" > + <convert type="ServiceName">Name</convert> + </widget> + <widget source="parent.ServiceEvent" render="Progress" position="0,27" size="96,5" borderWidth="1" > + <convert type="EventTime">Progress</convert> + </widget> + <widget source="global.CurrentTime" render="Label" position="0,32" size="96,32" font="Regular;32" halign="center" valign="center" foregroundColor="#FFFFFF" backgroundColor="#000000" > + <convert type="ClockToText">Format:%H:%M</convert> + </widget> </screen> <!-- LCD screen (main) --> - <screen name="InfoBarSummary" position="0,0" size="132,64"> + <screen name="InfoBarSummary" position="0,0" size="132,64" id="1"> <widget source="session.CurrentService" render="Label" position="6,0" size="120,25" font="Regular;14" halign="center" valign="center" > <convert type="ServiceName">Name</convert> </widget> @@ -1146,15 +1196,8 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y())) <convert type="ConditionalShowHide">Blink</convert> </widget> </screen> - <!-- LCD screen (menus) --> - <screen name="MenuSummary" position="0,0" size="132,64"> - <widget source="parent.title" render="Label" position="6,0" size="120,32" font="Regular;14" halign="center" valign="center"/> - <widget source="parent.menu" render="Label" position="6,32" size="120,32" font="Regular;16" halign="center" valign="center"> - <convert type="StringListSelection" /> - </widget> - </screen> <!-- LCD screen (movieplayer) --> - <screen name="InfoBarMoviePlayerSummary" position="0,0" size="132,64"> + <screen name="InfoBarMoviePlayerSummary" position="0,0" size="132,64" id="1"> <widget source="session.CurrentService" render="Label" position="6,0" size="120,25" font="Regular;14" halign="center" valign="center" > <convert type="ServiceName">Name</convert> </widget> @@ -1169,18 +1212,89 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y())) <convert type="ConditionalShowHide">Blink</convert> </widget> </screen> + <!-- Color OLED screen (movieplayer) --> + <screen name="InfoBarMoviePlayerSummary" position="0,0" size="96,64" id="2"> + <widget source="session.CurrentService" render="Label" position="0,0" size="96,25" font="Regular;14" halign="center" valign="center" > + <convert type="ServiceName">Name</convert> + </widget> + <widget source="session.CurrentService" render="Progress" position="0,27" size="96,5" borderWidth="1" > + <convert type="ServicePosition">Position</convert> + </widget> + <widget source="global.CurrentTime" render="Label" position="0,32" size="96,32" font="Regular;32" halign="center" valign="center" foregroundColor="#FFFFFF" backgroundColor="#000000" > + <convert type="ClockToText">Format:%H:%M</convert> + </widget> + <widget source="session.RecordState" render="FixedLabel" text=" " position="0,32" zPosition="1" size="96,32"> + <convert type="ConfigEntryTest">config.usage.blinking_display_clock_during_recording,True,CheckSourceBoolean</convert> + <convert type="ConditionalShowHide">Blink</convert> + </widget> + </screen> + <!-- LCD screen (ChoiceBox) --> + <screen name="ChoiceBox_summary" position="0,0" size="132,64" id="1"> + <widget source="parent.summary_list" render="Label" position="6,0" size="126,64" font="Regular;11" /> + </screen> + <!-- Color OLED screen (ChoiceBox) --> + <screen name="ChoiceBox_summary" position="0,0" size="96,64" id="2"> + <widget source="parent.summary_list" render="Label" position="0,0" size="96,64" font="Regular;10" /> + </screen> + <!-- LCD screen (MessageBox) --> + <screen name="MessageBox_summary" position="0,0" size="132,64" id="1"> + <widget source="parent.Text" render="Label" position="0,0" size="132,52" font="Regular;11" halign="center" valign="center" /> + <widget source="parent.selectedChoice" render="Label" position="6,50" size="120,14" font="Regular;14" halign="center" valign="center" /> + </screen> + <!-- Color OLED screen (MessageBox) --> + <screen name="MessageBox_summary" position="0,0" size="96,64" id="2"> + <widget source="parent.Text" render="Label" position="0,0" size="96,52" font="Regular;10" halign="center" valign="center" /> + <widget source="parent.selectedChoice" render="Label" position="0,50" size="96,14" font="Regular;12" halign="center" valign="center" /> + </screen> + + <!-- LCD screen (menus) --> + <screen name="MenuSummary" position="0,0" size="132,64" id="1"> + <widget source="parent.title" render="Label" position="6,0" size="120,32" font="Regular;14" halign="center" valign="center"/> + <widget source="parent.menu" render="Label" position="6,32" size="120,32" font="Regular;16" halign="center" valign="center"> + <convert type="StringListSelection" /> + </widget> + </screen> + <!-- Color OLED screen (menus) --> + <screen name="MenuSummary" position="0,0" size="96,64" id="2"> + <widget source="parent.title" render="Label" position="0,0" size="96,32" font="Regular;14" halign="center" valign="center"/> + <widget source="parent.menu" render="Label" position="0,32" size="96,32" font="Regular;14" halign="center" valign="center"> + <convert type="StringListSelection" /> + </widget> + </screen> + <!-- LCD screen (ServiceScan) --> + <screen name="ServiceScanSummary" position="0,0" size="132,64" id="1"> + <widget name="Title" position="6,4" size="120,42" font="Regular;16" transparent="1" /> + <widget name="Service" position="6,22" size="120,26" font="Regular;12" transparent="1" /> + <widget name="scan_progress" position="6,50" zPosition="1" borderWidth="1" size="56,12" backgroundColor="dark" /> + </screen> + <!-- Color OLED screen (ServiceScan) --> + <screen name="ServiceScanSummary" position="0,0" size="96,64" id="2"> + <widget name="Title" position="0,0" size="96,30" font="Regular;14" transparent="1" /> + <widget name="Service" position="0,30" size="96,20" font="Regular;10" transparent="1" /> + <widget name="scan_progress" position="0,50" zPosition="1" borderWidth="1" size="96,12" backgroundColor="dark" /> + </screen> <!-- LCD screen (setup) --> - <screen name="SetupSummary" position="0,0" size="132,64"> + <screen name="SetupSummary" position="0,0" size="132,64" id="1"> <widget source="SetupTitle" render="Label" position="6,0" size="120,16" font="Regular;12" /> <widget source="SetupEntry" render="Label" position="6,16" size="120,32" font="Regular;12" /> <widget source="SetupValue" render="Label" position="6,48" size="120,16" font="Regular;12" /> </screen> + <!-- Color OLED screen (setup) --> + <screen name="SetupSummary" position="0,0" size="96,64" id="2"> + <widget source="SetupTitle" render="Label" position="0,0" size="96,16" font="Regular;10" /> + <widget source="SetupEntry" render="Label" position="0,16" size="96,32" font="Regular;10" /> + <widget source="SetupValue" render="Label" position="0,48" size="96,16" font="Regular;10" /> + </screen> <!-- LCD screen (misc) --> - <screen name="SimpleSummary" position="0,0" size="132,64"> + <screen name="SimpleSummary" position="0,0" size="132,64" id="1"> <widget source="parent.Title" render="Label" position="6,0" size="120,64" font="Regular;16" halign="center" valign="center" /> </screen> + <!-- Color OLED screen (misc) --> + <screen name="SimpleSummary" position="0,0" size="96,64" id="2"> + <widget source="parent.Title" render="Label" position="0,0" size="96,64" font="Regular;14" halign="center" valign="center" /> + </screen> <!-- LCD screen (standby) --> - <screen name="StandbySummary" position="0,0" size="132,64"> + <screen name="StandbySummary" position="0,0" size="132,64" id="1"> <widget source="global.CurrentTime" render="Label" position="6,0" size="120,64" font="Regular;40" halign="center" valign="center"> <convert type="ClockToText">Format:%H:%M</convert> </widget> @@ -1189,37 +1303,18 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y())) <convert type="ConditionalShowHide">Blink</convert> </widget> </screen> - <!-- JobView --> - <screen name="JobView" position="center,center" size="520,350" title="Job View"> - <widget source="job_name" render="Label" position="20,12" size="480,60" font="Regular;28" /> - <widget source="job_task" render="Label" position="20,90" size="480,50" font="Regular;23" /> - <widget source="job_progress" render="Progress" position="20,162" size="480,36" borderWidth="2" backgroundColor="#254f7497" /> - <widget source="job_progress" render="Label" position="120,166" size="280,32" font="Regular;28" foregroundColor="#000000" zPosition="2" halign="center" transparent="1" > - <convert type="ProgressToText" /> - </widget> - <widget source="job_status" render="Label" position="20,212" size="480,26" font="Regular;23" /> - <widget name="config" position="20,254" size="480,20" /> - <widget source="cancelable" render="Pixmap" pixmap="skin_default/buttons/red.png" position="20,300" size="140,40" alphatest="on" > - <convert type="ConditionalShowHide" /> - </widget> - <widget source="cancelable" render="FixedLabel" text="Cancel" position="20,300" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" > - <convert type="ConditionalShowHide" /> - </widget> - <widget source="finished" render="Pixmap" pixmap="skin_default/buttons/green.png" position="190,300" size="140,40" alphatest="on" > - <convert type="ConditionalShowHide" /> - </widget> - <widget source="finished" render="FixedLabel" text="OK" font="Regular;20" halign="center" valign="center" position="190,300" size="140,40" transparent="1" backgroundColor="#1f771f" > - <convert type="ConditionalShowHide" /> - </widget> - <widget source="backgroundable" render="Pixmap" pixmap="skin_default/buttons/blue.png" position="360,300" size="140,40" alphatest="on" > - <convert type="ConditionalShowHide" /> + <!-- Color OLED screen (standby) --> + <screen name="StandbySummary" position="0,0" size="96,64" id="2"> + <widget source="global.CurrentTime" render="Label" position="0,0" size="96,64" font="Regular;40" halign="center" valign="center"> + <convert type="ClockToText">Format:%H:%M</convert> </widget> - <widget source="backgroundable" render="FixedLabel" text="Continue in background" font="Regular;20" halign="center" valign="center" position="360,300" size="140,40" transparent="1" backgroundColor="#18188b" > - <convert type="ConditionalShowHide" /> + <widget source="session.RecordState" render="FixedLabel" position="0,0" zPosition="1" size="96,64" text=" "> + <convert type="ConfigEntryTest">config.usage.blinking_display_clock_during_recording,True,CheckSourceBoolean</convert> + <convert type="ConditionalShowHide">Blink</convert> </widget> </screen> - <!-- JobView Summary --> - <screen name="JobView_summary" position="0,0" size="132,64"> + <!-- LCD screen (JobView) --> + <screen name="JobView_summary" position="0,0" size="132,64" id="1"> <widget source="parent.summary_job_name" render="Label" position="6,4" size="120,42" font="Regular;16" /> <widget source="parent.summary_job_task" render="Label" position="6,22" size="120,26" font="Regular;12" /> <widget source="parent.summary_job_progress" render="Progress" position="6,50" size="60,12" borderWidth="1" zPosition="1" /> @@ -1227,19 +1322,29 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y())) <convert type="ProgressToText" /> </widget> </screen> - <!-- VirtualKeyBoard --> - <screen name="VirtualKeyBoard" position="center,center" size="560,350" zPosition="99" title="Virtual KeyBoard"> - <ePixmap pixmap="skin_default/vkey_text.png" position="9,35" zPosition="-4" size="542,52" alphatest="on" /> - <widget name="header" position="10,10" size="500,20" font="Regular;20" transparent="1" noWrap="1" /> - <widget name="text" position="12,35" size="536,46" font="Regular;46" transparent="1" noWrap="1" halign="right" /> - <widget name="list" position="10,100" size="540,225" selectionDisabled="1" transparent="1" /> + <!-- Color OLED screen (JobView) --> + <screen name="JobView_summary" position="0,0" size="96,64" id="2"> + <widget source="parent.summary_job_name" render="Label" position="0,4" size="96,42" font="Regular;14" /> + <widget source="parent.summary_job_task" render="Label" position="0,22" size="96,26" font="Regular;10" /> + <widget source="parent.summary_job_progress" render="Progress" position="0,50" size="60,12" borderWidth="1" zPosition="1" /> + <widget source="parent.summary_job_progress" render="Label" position="60,50" size="36,12" font="Regular;10" zPosition="2" halign="center" transparent="1" > + <convert type="ProgressToText" /> + </widget> </screen> - <!-- FileBrowser --> - <screen name="FileBrowser" position="center,center" size="520,430" title="DVD File Browser" > - <ePixmap pixmap="skin_default/buttons/red.png" position="0,0" size="140,40" alphatest="on" /> - <ePixmap pixmap="skin_default/buttons/green.png" position="140,0" size="140,40" alphatest="on" /> - <widget source="key_red" render="Label" position="0,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" /> - <widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" /> - <widget name="filelist" position="5,50" size="510,370" scrollbarMode="showOnDemand" /> + <!-- LCD screen (Wizard) --> + <screen name="WizardSummary" position="0,0" size="132,64" id="1"> + <widget source="text" render="Label" position="6,0" size="120,16" font="Regular;16" transparent="1" /> + <widget source="parent.list" render="Label" position="6,18" size="120,46" font="Regular;12"> + <convert type="StringListSelection" /> + </widget> </screen> + <!-- Color OLED screen (Wizard) --> + <screen name="WizardSummary" position="0,0" size="96,64" id="2"> + <widget source="text" render="Label" position="0,0" size="96,16" font="Regular;14" transparent="1" /> + <widget source="parent.list" render="Label" position="0,18" size="96,46" font="Regular;12"> + <convert type="StringListSelection" /> + </widget> + </screen> + + </skin> diff --git a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py index e092e82f..64b4ae50 100755 --- a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py +++ b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py @@ -88,8 +88,8 @@ class FileBrowser(Screen): self.close(None) class DVDSummary(Screen): - skin = """ - <screen position="0,0" size="132,64"> + skin = ( + """<screen name="DVDSummary" position="0,0" size="132,64" id="1"> <widget source="session.CurrentService" render="Label" position="5,4" size="120,28" font="Regular;12" transparent="1" > <convert type="ServiceName">Name</convert> </widget> @@ -101,7 +101,20 @@ class DVDSummary(Screen): <widget source="session.CurrentService" render="Progress" position="6,46" size="60,18" borderWidth="1" > <convert type="ServicePosition">Position</convert> </widget> - </screen>""" + </screen>""", + """<screen name="DVDSummary" position="0,0" size="96,64" id="2"> + <widget source="session.CurrentService" render="Label" position="0,0" size="96,25" font="Regular;12" transparent="1" > + <convert type="ServiceName">Name</convert> + </widget> + <widget name="DVDPlayer" position="0,26" size="96,12" font="Regular;10" transparent="1" /> + <widget name="Chapter" position="0,40" size="66,12" font="Regular;10" transparent="1" halign="left" /> + <widget source="session.CurrentService" render="Label" position="66,40" size="30,12" font="Regular;10" transparent="1" halign="right" > + <convert type="ServicePosition">Position</convert> + </widget> + <widget source="session.CurrentService" render="Progress" position="0,52" size="96,12" borderWidth="1" > + <convert type="ServicePosition">Position</convert> + </widget> + </screen>""") def __init__(self, session, parent): Screen.__init__(self, session, parent) diff --git a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py index 15806e8c..e4bdba12 100755 --- a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py +++ b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py @@ -925,12 +925,17 @@ class MediaPlayer(Screen, InfoBarBase, InfoBarSeek, InfoBarAudioSelection, InfoB self.clear_playlist() class MediaPlayerLCDScreen(Screen): - skin = """ - <screen position="0,0" size="132,64" title="LCD Text"> + skin = ( + """<screen name="MediaPlayerLCDScreen" position="0,0" size="132,64" id="1"> <widget name="text1" position="4,0" size="132,35" font="Regular;16"/> <widget name="text3" position="4,36" size="132,14" font="Regular;10"/> <widget name="text4" position="4,49" size="132,14" font="Regular;10"/> - </screen>""" + </screen>""", + """<screen name="MediaPlayerLCDScreen" position="0,0" size="96,64" id="2"> + <widget name="text1" position="0,0" size="96,35" font="Regular;14"/> + <widget name="text3" position="0,36" size="96,14" font="Regular;10"/> + <widget name="text4" position="0,49" size="96,14" font="Regular;10"/> + </screen>""") def __init__(self, session, parent): Screen.__init__(self, session) diff --git a/lib/python/Plugins/SystemPlugins/NFIFlash/flasher.py b/lib/python/Plugins/SystemPlugins/NFIFlash/flasher.py old mode 100644 new mode 100755 index 8986560b..7a0da851 --- a/lib/python/Plugins/SystemPlugins/NFIFlash/flasher.py +++ b/lib/python/Plugins/SystemPlugins/NFIFlash/flasher.py @@ -39,13 +39,19 @@ class writeNAND(Task): self.output_line = data class NFISummary(Screen): - skin = """ - <screen position="0,0" size="132,64"> + skin = ( + """<screen name="NFISummary" position="0,0" size="132,64" id="1"> <widget source="title" render="Label" position="2,0" size="120,14" valign="center" font="Regular;12" /> <widget source="content" render="Label" position="2,14" size="120,34" font="Regular;12" transparent="1" zPosition="1" /> - <widget source="job_progresslabel" render="Label" position="66,50" size="60,14" font="Regular;12" transparent="1" halign="right" zPosition="0" /> <widget source="job_progressbar" render="Progress" position="2,50" size="66,14" borderWidth="1" /> - </screen>""" + <widget source="job_progresslabel" render="Label" position="66,50" size="60,14" font="Regular;12" transparent="1" halign="right" zPosition="0" /> + </screen>""", + """<screen name="NFISummary" position="0,0" size="96,64" id="2"> + <widget source="title" render="Label" position="0,0" size="96,14" valign="center" font="Regular;10" /> + <widget source="content" render="Label" position="0,14" size="96,34" font="Regular;10" transparent="1" zPosition="1" /> + <widget source="job_progressbar" render="Progress" position="0,50" size="50,14" borderWidth="1" /> + <widget source="job_progresslabel" render="Label" position="50,50" size="46,14" font="Regular;10" transparent="1" halign="right" zPosition="0" /> + </screen>""") def __init__(self, session, parent): Screen.__init__(self, session, parent) diff --git a/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py b/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py old mode 100644 new mode 100755 index 3c76685e..9b9044ee --- a/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py +++ b/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py @@ -12,14 +12,22 @@ from Tools.HardwareInfo import HardwareInfo config.misc.showtestcard = ConfigBoolean(default = False) class VideoWizardSummary(WizardSummary): - skin = """ - <screen position="0,0" size="132,64"> + skin = ( + """<screen name="VideoWizardSummary" position="0,0" size="132,64" id="1"> <widget name="text" position="6,4" size="120,40" font="Regular;12" transparent="1" /> <widget source="parent.list" render="Label" position="6,40" size="120,21" font="Regular;14"> <convert type="StringListSelection" /> </widget> <!--widget name="pic" pixmap="%s" position="6,22" zPosition="10" size="64,64" transparent="1" alphatest="on"/--> - </screen>""" #% (resolveFilename(SCOPE_PLUGINS, "SystemPlugins/Videomode/lcd_Scart.png")) + </screen>""", + """<screen name="VideoWizardSummary" position="0,0" size="96,64" id="2"> + <widget name="text" position="0,4" size="96,40" font="Regular;12" transparent="1" /> + <widget source="parent.list" render="Label" position="0,40" size="96,21" font="Regular;14"> + <convert type="StringListSelection" /> + </widget> + <!--widget name="pic" pixmap="%s" position="0,22" zPosition="10" size="64,64" transparent="1" alphatest="on"/--> + </screen>""") + #% (resolveFilename(SCOPE_PLUGINS, "SystemPlugins/Videomode/lcd_Scart.png")) def __init__(self, session, parent): WizardSummary.__init__(self, session, parent) -- cgit v1.2.3 From 4ad194a2c8742b4ce5906a7d816c2542f7397085 Mon Sep 17 00:00:00 2001 From: acid-burn <acid-burn@opendreambox.org> Date: Thu, 26 Aug 2010 08:34:43 +0200 Subject: Enigma2: add possibility to configure input device delay and repeat settings. fixes #69 --- data/menu.xml | 3 +- data/skin_default/icons/Makefile.am | 8 + .../icons/input_keyboard-configured.png | Bin 0 -> 2700 bytes data/skin_default/icons/input_keyboard.png | Bin 0 -> 2520 bytes data/skin_default/icons/input_mouse-configured.png | Bin 0 -> 2785 bytes data/skin_default/icons/input_mouse.png | Bin 0 -> 2512 bytes data/skin_default/icons/input_rcnew-configured.png | Bin 0 -> 2809 bytes data/skin_default/icons/input_rcnew.png | Bin 0 -> 2570 bytes data/skin_default/icons/input_rcold-configured.png | Bin 0 -> 2796 bytes data/skin_default/icons/input_rcold.png | Bin 0 -> 2598 bytes lib/python/Components/InputDevice.py | 225 +++++++++++++++-- lib/python/Screens/InputDeviceSetup.py | 280 +++++++++++++++++++++ lib/python/Screens/Makefile.am | 3 +- 13 files changed, 494 insertions(+), 25 deletions(-) create mode 100644 data/skin_default/icons/input_keyboard-configured.png create mode 100644 data/skin_default/icons/input_keyboard.png create mode 100644 data/skin_default/icons/input_mouse-configured.png create mode 100644 data/skin_default/icons/input_mouse.png create mode 100644 data/skin_default/icons/input_rcnew-configured.png create mode 100644 data/skin_default/icons/input_rcnew.png create mode 100644 data/skin_default/icons/input_rcold-configured.png create mode 100644 data/skin_default/icons/input_rcold.png mode change 100644 => 100755 lib/python/Components/InputDevice.py create mode 100755 lib/python/Screens/InputDeviceSetup.py (limited to 'data') diff --git a/data/menu.xml b/data/menu.xml index 0d874718..6e103542 100755 --- a/data/menu.xml +++ b/data/menu.xml @@ -61,8 +61,9 @@ </menu> <!--<item text="Remote Control"><setup id="rc" /></item>--> <!--<item text="OSD"><setup id="osd" /></item>--> - <item requires="Display"><setup level="1" id="lcd" /></item> <item level="0" text="Network" entryID="network_setup"><screen module="NetworkSetup" screen="NetworkAdapterSelection" /></item> + <item level="1" text="Input devices" entryID="input_device_setup"><screen module="InputDeviceSetup" screen="InputDeviceSelection" /></item> + <item requires="Display"><setup level="1" id="lcd" /></item> <item text="Keyboard"><setup id="keyboard" /></item> <!--<menu level="1" text="Network..." entryID="network_setup"> <id val="network" /> diff --git a/data/skin_default/icons/Makefile.am b/data/skin_default/icons/Makefile.am index 61c00593..5a836bc1 100755 --- a/data/skin_default/icons/Makefile.am +++ b/data/skin_default/icons/Makefile.am @@ -27,7 +27,15 @@ dist_install_DATA = \ icon_view.png \ input_error.png \ input_info.png \ + input_keyboard-configured.png \ + input_keyboard.png \ + input_mouse-configured.png \ + input_mouse.png \ input_question.png \ + input_rcnew-configured.png \ + input_rcnew.png \ + input_rcold-configured.png \ + input_rcold.png \ lock_error.png \ lock_off.png \ lock_on.png \ diff --git a/data/skin_default/icons/input_keyboard-configured.png b/data/skin_default/icons/input_keyboard-configured.png new file mode 100644 index 00000000..c6623a5c Binary files /dev/null and b/data/skin_default/icons/input_keyboard-configured.png differ diff --git a/data/skin_default/icons/input_keyboard.png b/data/skin_default/icons/input_keyboard.png new file mode 100644 index 00000000..a922c896 Binary files /dev/null and b/data/skin_default/icons/input_keyboard.png differ diff --git a/data/skin_default/icons/input_mouse-configured.png b/data/skin_default/icons/input_mouse-configured.png new file mode 100644 index 00000000..3db9447c Binary files /dev/null and b/data/skin_default/icons/input_mouse-configured.png differ diff --git a/data/skin_default/icons/input_mouse.png b/data/skin_default/icons/input_mouse.png new file mode 100644 index 00000000..f70c84e2 Binary files /dev/null and b/data/skin_default/icons/input_mouse.png differ diff --git a/data/skin_default/icons/input_rcnew-configured.png b/data/skin_default/icons/input_rcnew-configured.png new file mode 100644 index 00000000..6b16d393 Binary files /dev/null and b/data/skin_default/icons/input_rcnew-configured.png differ diff --git a/data/skin_default/icons/input_rcnew.png b/data/skin_default/icons/input_rcnew.png new file mode 100644 index 00000000..19cdeea5 Binary files /dev/null and b/data/skin_default/icons/input_rcnew.png differ diff --git a/data/skin_default/icons/input_rcold-configured.png b/data/skin_default/icons/input_rcold-configured.png new file mode 100644 index 00000000..8d626851 Binary files /dev/null and b/data/skin_default/icons/input_rcold-configured.png differ diff --git a/data/skin_default/icons/input_rcold.png b/data/skin_default/icons/input_rcold.png new file mode 100644 index 00000000..ef8680b5 Binary files /dev/null and b/data/skin_default/icons/input_rcold.png differ diff --git a/lib/python/Components/InputDevice.py b/lib/python/Components/InputDevice.py old mode 100644 new mode 100755 index 3c3bd7a1..d675ca3a --- a/lib/python/Components/InputDevice.py +++ b/lib/python/Components/InputDevice.py @@ -1,29 +1,208 @@ -from config import config, ConfigSlider, ConfigSubsection +# coding: utf-8 +from config import config, configfile, ConfigSlider, ConfigSubsection, ConfigYesNo, ConfigText + +import struct, sys, time, errno +from fcntl import ioctl +from os import path as os_path, listdir, open as os_open, close as os_close, write as os_write, read as os_read, O_RDWR, O_NONBLOCK + +# asm-generic/ioctl.h +IOC_NRBITS = 8L +IOC_TYPEBITS = 8L +IOC_SIZEBITS = 13L +IOC_DIRBITS = 3L + +IOC_NRSHIFT = 0L +IOC_TYPESHIFT = IOC_NRSHIFT+IOC_NRBITS +IOC_SIZESHIFT = IOC_TYPESHIFT+IOC_TYPEBITS +IOC_DIRSHIFT = IOC_SIZESHIFT+IOC_SIZEBITS + +IOC_READ = 2L + +def EVIOCGNAME(length): + return (IOC_READ<<IOC_DIRSHIFT)|(length<<IOC_SIZESHIFT)|(0x45<<IOC_TYPESHIFT)|(0x06<<IOC_NRSHIFT) + class inputDevices: + + def __init__(self): + self.Devices = {} + self.currentDevice = "" + self.getInputDevices() + + def getInputDevices(self): + devices = listdir("/dev/input/") + + for evdev in devices: + try: + buffer = "\0"*512 + self.fd = os_open("/dev/input/" + evdev, O_RDWR | O_NONBLOCK) + self.name = ioctl(self.fd, EVIOCGNAME(256), buffer) + self.name = self.name[:self.name.find("\0")] + os_close(self.fd) + except (IOError,OSError), err: + print '[iInputDevices] getInputDevices <ERROR: ioctl(EVIOCGNAME): ' + str(err) + ' >' + self.name = None + + if self.name: + if self.name == 'dreambox front panel': + continue + if self.name == "dreambox advanced remote control (native)" and config.misc.rcused.value != 0: + continue + if self.name == "dreambox remote control (native)" and config.misc.rcused.value == 0: + continue + self.Devices[evdev] = {'name': self.name, 'type': self.getInputDeviceType(self.name),'enabled': False, 'configuredName': None } + + + def getInputDeviceType(self,name): + if name.find("remote control") != -1: + return "remote" + elif name.find("keyboard") != -1: + return "keyboard" + elif name.find("mouse") != -1: + return "mouse" + else: + print "Unknown device type:",name + return None + + def getDeviceName(self, x): + if x in self.Devices.keys(): + return self.Devices[x].get("name", x) + else: + return "Unknown device name" + + def getDeviceList(self): + return sorted(self.Devices.iterkeys()) + + def getDefaultRCdeviceName(self): + if config.misc.rcused.value == 0: + for device in self.Devices.iterkeys(): + if self.Devices[device]["name"] == "dreambox advanced remote control (native)": + return device + else: + for device in self.Devices.iterkeys(): + if self.Devices[device]["name"] == "dreambox remote control (native)": + return device + + def setDeviceAttribute(self, device, attribute, value): + #print "[iInputDevices] setting for device", device, "attribute", attribute, " to value", value + if self.Devices.has_key(device): + self.Devices[device][attribute] = value + + def getDeviceAttribute(self, device, attribute): + if self.Devices.has_key(device): + if self.Devices[device].has_key(attribute): + return self.Devices[device][attribute] + return None + + def setEnabled(self, device, value): + oldval = self.getDeviceAttribute(device, 'enabled') + #print "[iInputDevices] setEnabled for device %s to %s from %s" % (device,value,oldval) + self.setDeviceAttribute(device, 'enabled', value) + if oldval is True and value is False: + self.setDefaults(device) + + def setName(self, device, value): + #print "[iInputDevices] setName for device %s to %s" % (device,value) + self.setDeviceAttribute(device, 'configuredName', value) + + #struct input_event { + # struct timeval time; -> ignored + # __u16 type; -> EV_REP (0x14) + # __u16 code; -> REP_DELAY (0x00) or REP_PERIOD (0x01) + # __s32 value; -> DEFAULTS: 700(REP_DELAY) or 100(REP_PERIOD) + #}; -> size = 16 + + def setDefaults(self, device): + print "[iInputDevices] setDefaults for device %s" % (device) + self.setDeviceAttribute(device, 'configuredName', None) + event_repeat = struct.pack('iihhi', 0, 0, 0x14, 0x01, 100) + event_delay = struct.pack('iihhi', 0, 0, 0x14, 0x00, 700) + fd = os_open("/dev/input/" + device, O_RDWR) + os_write(fd, event_repeat) + os_write(fd, event_delay) + os_close(fd) + + def setRepeat(self, device, value): #REP_PERIOD + if self.getDeviceAttribute(device, 'enabled') == True: + print "[iInputDevices] setRepeat for device %s to %d ms" % (device,value) + event = struct.pack('iihhi', 0, 0, 0x14, 0x01, int(value)) + fd = os_open("/dev/input/" + device, O_RDWR) + os_write(fd, event) + os_close(fd) + + def setDelay(self, device, value): #REP_DELAY + if self.getDeviceAttribute(device, 'enabled') == True: + print "[iInputDevices] setDelay for device %s to %d ms" % (device,value) + event = struct.pack('iihhi', 0, 0, 0x14, 0x00, int(value)) + fd = os_open("/dev/input/" + device, O_RDWR) + os_write(fd, event) + os_close(fd) + + +class InitInputDevices: + def __init__(self): - pass - def setRepeat(self, value): - #print "setup rc repeat" - pass - def setDelay(self, value): - #print "setup rc delay" - pass - -def InitInputDevices(): - config.inputDevices = ConfigSubsection(); - config.inputDevices.repeat = ConfigSlider(default=5, limits=(1, 10)) - config.inputDevices.delay = ConfigSlider(default=4, limits=(1, 10)) - - #this instance anywhere else needed? - iDevices = inputDevices(); + self.currentDevice = "" + self.createConfig() - def inputDevicesRepeatChanged(configElement): - iDevices.setRepeat(configElement.value); + def createConfig(self, *args): + config.inputDevices = ConfigSubsection() + for device in sorted(iInputDevices.Devices.iterkeys()): + self.currentDevice = device + #print "[InitInputDevices] -> creating config entry for device: %s -> %s " % (self.currentDevice, iInputDevices.Devices[device]["name"]) + self.setupConfigEntries(self.currentDevice) + self.currentDevice = "" + + def inputDevicesEnabledChanged(self,configElement): + if self.currentDevice != "" and iInputDevices.currentDevice == "": + iInputDevices.setEnabled(self.currentDevice, configElement.value) + elif iInputDevices.currentDevice != "": + iInputDevices.setEnabled(iInputDevices.currentDevice, configElement.value) + + def inputDevicesNameChanged(self,configElement): + if self.currentDevice != "" and iInputDevices.currentDevice == "": + iInputDevices.setName(self.currentDevice, configElement.value) + if configElement.value != "": + devname = iInputDevices.getDeviceAttribute(self.currentDevice, 'name') + if devname != configElement.value: + cmd = "config.inputDevices." + self.currentDevice + ".enabled.value = False" + exec (cmd) + cmd = "config.inputDevices." + self.currentDevice + ".enabled.save()" + exec (cmd) + elif iInputDevices.currentDevice != "": + iInputDevices.setName(iInputDevices.currentDevice, configElement.value) + + def inputDevicesRepeatChanged(self,configElement): + if self.currentDevice != "" and iInputDevices.currentDevice == "": + iInputDevices.setRepeat(self.currentDevice, configElement.value) + elif iInputDevices.currentDevice != "": + iInputDevices.setRepeat(iInputDevices.currentDevice, configElement.value) + + def inputDevicesDelayChanged(self,configElement): + if self.currentDevice != "" and iInputDevices.currentDevice == "": + iInputDevices.setDelay(self.currentDevice, configElement.value) + elif iInputDevices.currentDevice != "": + iInputDevices.setDelay(iInputDevices.currentDevice, configElement.value) + + def setupConfigEntries(self,device): + cmd = "config.inputDevices." + device + " = ConfigSubsection()" + exec (cmd) + cmd = "config.inputDevices." + device + ".enabled = ConfigYesNo(default = False)" + exec (cmd) + cmd = "config.inputDevices." + device + ".enabled.addNotifier(self.inputDevicesEnabledChanged,config.inputDevices." + device + ".enabled)" + exec (cmd) + cmd = "config.inputDevices." + device + '.name = ConfigText(default="")' + exec (cmd) + cmd = "config.inputDevices." + device + ".name.addNotifier(self.inputDevicesNameChanged,config.inputDevices." + device + ".name)" + exec (cmd) + cmd = "config.inputDevices." + device + ".repeat = ConfigSlider(default=100, increment = 10, limits=(0, 500))" + exec (cmd) + cmd = "config.inputDevices." + device + ".repeat.addNotifier(self.inputDevicesRepeatChanged,config.inputDevices." + device + ".repeat)" + exec (cmd) + cmd = "config.inputDevices." + device + ".delay = ConfigSlider(default=700, increment = 100, limits=(0, 5000))" + exec (cmd) + cmd = "config.inputDevices." + device + ".delay.addNotifier(self.inputDevicesDelayChanged,config.inputDevices." + device + ".delay)" + exec (cmd) - def inputDevicesDelayChanged(configElement): - iDevices.setDelay(configElement.value); - # this will call the "setup-val" initial - config.inputDevices.repeat.addNotifier(inputDevicesRepeatChanged); - config.inputDevices.delay.addNotifier(inputDevicesDelayChanged); +iInputDevices = inputDevices() diff --git a/lib/python/Screens/InputDeviceSetup.py b/lib/python/Screens/InputDeviceSetup.py new file mode 100755 index 00000000..bd8550b8 --- /dev/null +++ b/lib/python/Screens/InputDeviceSetup.py @@ -0,0 +1,280 @@ +from Screen import Screen +from Screens.HelpMenu import HelpableScreen +from Screens.MessageBox import MessageBox +from Components.InputDevice import iInputDevices +from Components.Sources.StaticText import StaticText +from Components.Sources.Boolean import Boolean +from Components.Sources.List import List +from Components.config import config, ConfigSlider, ConfigSubsection, ConfigYesNo, ConfigText, getConfigListEntry, ConfigNothing +from Components.ConfigList import ConfigListScreen +from Components.ActionMap import ActionMap, NumberActionMap, HelpableActionMap +from Tools.Directories import resolveFilename, SCOPE_CURRENT_SKIN +from Tools.LoadPixmap import LoadPixmap + +class InputDeviceSelection(Screen,HelpableScreen): + skin = """ + <screen name="InputDeviceSelection" position="center,center" size="560,400" title="Select input device"> + <ePixmap pixmap="skin_default/buttons/red.png" position="0,0" size="140,40" alphatest="on"/> + <ePixmap pixmap="skin_default/buttons/green.png" position="140,0" size="140,40" alphatest="on"/> + <ePixmap pixmap="skin_default/buttons/yellow.png" position="280,0" size="140,40" alphatest="on"/> + <ePixmap pixmap="skin_default/buttons/blue.png" position="420,0" size="140,40" alphatest="on"/> + <widget source="key_red" render="Label" position="0,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" transparent="1"/> + <widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" transparent="1"/> + <widget source="key_yellow" render="Label" position="280,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#a08500" transparent="1"/> + <widget source="key_blue" render="Label" position="420,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#18188b" transparent="1"/> + <widget source="list" render="Listbox" position="5,50" size="550,280" zPosition="10" scrollbarMode="showOnDemand"> + <convert type="TemplatedMultiContent"> + <!-- device, description, devicepng, divpng --> + {"template": [ + MultiContentEntryPixmapAlphaTest(pos = (2, 8), size = (54, 54), png = 2), # index 3 is the interface pixmap + MultiContentEntryText(pos = (65, 6), size = (450, 54), font=0, flags = RT_HALIGN_LEFT|RT_VALIGN_CENTER|RT_WRAP, text = 1), # index 1 is the interfacename + ], + "fonts": [gFont("Regular", 28),gFont("Regular", 20)], + "itemHeight": 70 + } + + </convert> + </widget> + <ePixmap pixmap="skin_default/div-h.png" position="0,340" zPosition="1" size="560,2"/> + <widget source="introduction" render="Label" position="0,350" size="560,50" zPosition="10" font="Regular;21" halign="center" valign="center" backgroundColor="#25062748" transparent="1"/> + </screen>""" + + + def __init__(self, session): + Screen.__init__(self, session) + HelpableScreen.__init__(self) + + self.edittext = _("Press OK to edit the settings.") + + self["key_red"] = StaticText(_("Close")) + self["key_green"] = StaticText(_("Select")) + self["key_yellow"] = StaticText("") + self["key_blue"] = StaticText("") + self["introduction"] = StaticText(self.edittext) + + self.devices = [(iInputDevices.getDeviceName(x),x) for x in iInputDevices.getDeviceList()] + print "[InputDeviceSelection] found devices :->", len(self.devices),self.devices + + self["OkCancelActions"] = HelpableActionMap(self, "OkCancelActions", + { + "cancel": (self.close, _("Exit input device selection.")), + "ok": (self.okbuttonClick, _("Select input device.")), + }, -2) + + self["ColorActions"] = HelpableActionMap(self, "ColorActions", + { + "red": (self.close, _("Exit input device selection.")), + "green": (self.okbuttonClick, _("Select input device.")), + }, -2) + + self.currentIndex = 0 + self.list = [] + self["list"] = List(self.list) + self.updateList() + self.onLayoutFinish.append(self.layoutFinished) + self.onClose.append(self.cleanup) + + def layoutFinished(self): + self.setTitle(_("Select input device")) + + def cleanup(self): + self.currentIndex = 0 + + def buildInterfaceList(self,device,description,type ): + divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/div-h.png")) + activepng = None + devicepng = None + enabled = iInputDevices.getDeviceAttribute(device, 'enabled') + + if type == 'remote': + if config.misc.rcused.value == 0: + if enabled: + devicepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/input_rcnew-configured.png")) + else: + devicepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/input_rcnew.png")) + else: + if enabled: + devicepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/input_rcold-configured.png")) + else: + devicepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/input_rcold.png")) + elif type == 'keyboard': + if enabled: + devicepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/input_keyboard-configured.png")) + else: + devicepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/input_keyboard.png")) + elif type == 'mouse': + if enabled: + devicepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/input_mouse-configured.png")) + else: + devicepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/input_mouse.png")) + else: + devicepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/input_rcnew.png")) + return((device, description, devicepng, divpng)) + + def updateList(self): + self.list = [] + for x in self.devices: + dev_type = iInputDevices.getDeviceAttribute(x[1], 'type') + self.list.append(self.buildInterfaceList(x[1],_(x[0]), dev_type )) + self["list"].setList(self.list) + self["list"].setIndex(self.currentIndex) + + def okbuttonClick(self): + selection = self["list"].getCurrent() + self.currentIndex = self["list"].getIndex() + if selection is not None: + self.session.openWithCallback(self.DeviceSetupClosed, InputDeviceSetup, selection[0]) + + def DeviceSetupClosed(self, *ret): + self.updateList() + + +class InputDeviceSetup(Screen, ConfigListScreen): + + skin = """ + <screen name="InputDeviceSetup" position="center,center" size="560,440" title="Input device setup"> + <ePixmap pixmap="skin_default/buttons/red.png" position="0,0" size="140,40" alphatest="on" /> + <ePixmap pixmap="skin_default/buttons/green.png" position="140,0" size="140,40" alphatest="on" /> + <ePixmap pixmap="skin_default/buttons/yellow.png" position="280,0" size="140,40" alphatest="on" /> + <ePixmap pixmap="skin_default/buttons/blue.png" position="420,0" size="140,40" alphatest="on" /> + <widget source="key_red" render="Label" position="0,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" /> + <widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" /> + <widget source="key_yellow" render="Label" position="280,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#a08500" transparent="1" /> + <widget source="key_blue" render="Label" position="420,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#18188b" transparent="1" /> + <widget name="config" position="5,50" size="550,350" scrollbarMode="showOnDemand" /> + <ePixmap pixmap="skin_default/div-h.png" position="0,400" zPosition="1" size="560,2" /> + <widget source="introduction" render="Label" position="5,410" size="550,30" zPosition="10" font="Regular;21" halign="center" valign="center" backgroundColor="#25062748" transparent="1" /> + </screen>""" + + def __init__(self, session, device): + Screen.__init__(self, session) + self.inputDevice = device + iInputDevices.currentDevice = self.inputDevice + self.onChangedEntry = [ ] + self.setup_title = _("Input device setup") + self.isStepSlider = None + self.enableEntry = None + self.repeatEntry = None + self.delayEntry = None + self.nameEntry = None + self.enableConfigEntry = None + + self.list = [ ] + ConfigListScreen.__init__(self, self.list, session = session, on_change = self.changedEntry) + + self["actions"] = ActionMap(["SetupActions"], + { + "cancel": self.keyCancel, + "save": self.apply, + }, -2) + + self["key_red"] = StaticText(_("Cancel")) + self["key_green"] = StaticText(_("OK")) + self["key_yellow"] = StaticText() + self["key_blue"] = StaticText() + self["introduction"] = StaticText() + + self.createSetup() + self.onLayoutFinish.append(self.layoutFinished) + self.onClose.append(self.cleanup) + + def layoutFinished(self): + self.setTitle(self.setup_title) + + def cleanup(self): + iInputDevices.currentDevice = "" + + def createSetup(self): + self.list = [ ] + cmd = "self.enableEntry = getConfigListEntry(_('"'Change repeat and delay settings?'"'), config.inputDevices." + self.inputDevice + ".enabled)" + exec (cmd) + cmd = "self.repeatEntry = getConfigListEntry(_('"'Interval between keys when repeating:'"'), config.inputDevices." + self.inputDevice + ".repeat)" + exec (cmd) + cmd = "self.delayEntry = getConfigListEntry(_('"'Delay before key repeat starts:'"'), config.inputDevices." + self.inputDevice + ".delay)" + exec (cmd) + cmd = "self.nameEntry = getConfigListEntry(_('"'Devicename:'"'), config.inputDevices." + self.inputDevice + ".name)" + exec (cmd) + if self.enableEntry: + if isinstance(self.enableEntry[1], ConfigYesNo): + self.enableConfigEntry = self.enableEntry[1] + + self.list.append(self.enableEntry) + if self.enableConfigEntry: + if self.enableConfigEntry.value is True: + self.list.append(self.repeatEntry) + self.list.append(self.delayEntry) + else: + self.repeatEntry[1].setValue(self.repeatEntry[1].default) + self["config"].invalidate(self.repeatEntry) + self.delayEntry[1].setValue(self.delayEntry[1].default) + self["config"].invalidate(self.delayEntry) + self.nameEntry[1].setValue(self.nameEntry[1].default) + self["config"].invalidate(self.nameEntry) + + self["config"].list = self.list + self["config"].l.setSeperation(400) + self["config"].l.setList(self.list) + if not self.selectionChanged in self["config"].onSelectionChanged: + self["config"].onSelectionChanged.append(self.selectionChanged) + self.selectionChanged() + + def selectionChanged(self): + if self["config"].getCurrent() == self.enableEntry: + self["introduction"].setText(_("Current device: ") + str(iInputDevices.getDeviceAttribute(self.inputDevice, 'name')) ) + else: + self["introduction"].setText(_("Current value: ") + self.getCurrentValue() + _(" ms")) + + def newConfig(self): + current = self["config"].getCurrent() + if current: + if current == self.enableEntry: + self.createSetup() + + def keyLeft(self): + ConfigListScreen.keyLeft(self) + self.newConfig() + + def keyRight(self): + ConfigListScreen.keyRight(self) + self.newConfig() + + def confirm(self, confirmed): + if not confirmed: + print "not confirmed" + return + else: + self.nameEntry[1].setValue(iInputDevices.getDeviceAttribute(self.inputDevice, 'name')) + cmd = "config.inputDevices." + self.inputDevice + ".name.save()" + exec (cmd) + self.keySave() + + def apply(self): + self.session.openWithCallback(self.confirm, MessageBox, _("Use this input device settings?"), MessageBox.TYPE_YESNO, timeout = 20, default = True) + + def cancelConfirm(self, result): + if not result: + return + for x in self["config"].list: + x[1].cancel() + self.close() + + def keyCancel(self): + if self["config"].isChanged(): + self.session.openWithCallback(self.cancelConfirm, MessageBox, _("Really close without saving settings?"), MessageBox.TYPE_YESNO, timeout = 20, default = True) + else: + self.close() + # for summary: + def changedEntry(self): + for x in self.onChangedEntry: + x() + self.selectionChanged() + + def getCurrentEntry(self): + return self["config"].getCurrent()[0] + + def getCurrentValue(self): + return str(self["config"].getCurrent()[1].value) + + def createSummary(self): + from Screens.Setup import SetupSummary + return SetupSummary diff --git a/lib/python/Screens/Makefile.am b/lib/python/Screens/Makefile.am index 5cec5127..69600f01 100755 --- a/lib/python/Screens/Makefile.am +++ b/lib/python/Screens/Makefile.am @@ -14,5 +14,6 @@ install_PYTHON = \ SubtitleDisplay.py SubservicesQuickzap.py ParentalControlSetup.py NumericalTextInputHelpDialog.py \ SleepTimerEdit.py Ipkg.py RdsDisplay.py Globals.py DefaultWizard.py \ SessionGlobals.py LocationBox.py WizardLanguage.py TaskView.py Rc.py VirtualKeyBoard.py \ - TextBox.py FactoryReset.py RecordPaths.py UnhandledKey.py ServiceStopScreen.py + TextBox.py FactoryReset.py RecordPaths.py UnhandledKey.py ServiceStopScreen.py \ + InputDeviceSetup.py -- cgit v1.2.3 From b4ace468cc77afa31bc829b98c08189ad5e42f97 Mon Sep 17 00:00:00 2001 From: acid-burn <acid-burn@opendreambox.org> Date: Fri, 1 Oct 2010 10:38:40 +0200 Subject: data/skin_default.xml: skin fixes for dm800se color oled. refs #530 --- data/skin_default.xml | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) (limited to 'data') diff --git a/data/skin_default.xml b/data/skin_default.xml index a2bcc6f7..8b26ce7e 100755 --- a/data/skin_default.xml +++ b/data/skin_default.xml @@ -1151,13 +1151,13 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y())) </screen> <!-- Color OLED screen (ChannelSelection) --> <screen name="ChannelSelection_summary" position="0,0" size="96,64" id="2"> - <widget source="parent.ServiceEvent" render="Label" position="0,0" size="96,25" font="Regular;14" halign="center" valign="center" > + <widget source="parent.ServiceEvent" render="Label" position="0,0" size="96,28" font="Regular;16" halign="center" valign="center" > <convert type="ServiceName">Name</convert> </widget> - <widget source="parent.ServiceEvent" render="Progress" position="0,27" size="96,5" borderWidth="1" > + <widget source="session.Event_Now" render="Progress" position="0,30" size="96,8" borderWidth="1" backgroundColor="dark"> <convert type="EventTime">Progress</convert> </widget> - <widget source="global.CurrentTime" render="Label" position="0,32" size="96,32" font="Regular;32" halign="center" valign="center" foregroundColor="#FFFFFF" backgroundColor="#000000" > + <widget source="global.CurrentTime" render="Label" position="0,38" size="96,26" font="Regular;32" halign="center" valign="center" foregroundColor="#FFFFFF" backgroundColor="#000000" > <convert type="ClockToText">Format:%H:%M</convert> </widget> </screen> @@ -1182,16 +1182,16 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y())) </screen> <!-- Color OLED screen (main) --> <screen name="InfoBarSummary" position="0,0" size="96,64" id="2"> - <widget source="session.CurrentService" render="Label" position="0,0" size="96,25" font="Regular;14" halign="center" valign="center" > + <widget source="session.CurrentService" render="Label" position="0,0" size="96,28" font="Regular;16" halign="center" valign="center" > <convert type="ServiceName">Name</convert> </widget> - <widget source="session.Event_Now" render="Progress" position="0,27" size="96,5" borderWidth="1" > + <widget source="session.Event_Now" render="Progress" position="0,30" size="96,8" borderWidth="1" backgroundColor="dark"> <convert type="EventTime">Progress</convert> </widget> - <widget source="global.CurrentTime" render="Label" position="0,32" size="96,32" font="Regular;32" halign="center" valign="center" foregroundColor="#FFFFFF" backgroundColor="#000000" > + <widget source="global.CurrentTime" render="Label" position="0,38" size="96,26" font="Regular;32" halign="center" valign="center" foregroundColor="#FFFFFF" backgroundColor="#000000" > <convert type="ClockToText">Format:%H:%M</convert> </widget> - <widget source="session.RecordState" render="FixedLabel" text=" " position="0,32" zPosition="1" size="96,32"> + <widget source="session.RecordState" render="FixedLabel" text=" " position="0,38" zPosition="1" size="96,30"> <convert type="ConfigEntryTest">config.usage.blinking_display_clock_during_recording,True,CheckSourceBoolean</convert> <convert type="ConditionalShowHide">Blink</convert> </widget> @@ -1214,16 +1214,16 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y())) </screen> <!-- Color OLED screen (movieplayer) --> <screen name="InfoBarMoviePlayerSummary" position="0,0" size="96,64" id="2"> - <widget source="session.CurrentService" render="Label" position="0,0" size="96,25" font="Regular;14" halign="center" valign="center" > + <widget source="session.CurrentService" render="Label" position="0,0" size="96,28" font="Regular;16" halign="center" valign="center" > <convert type="ServiceName">Name</convert> </widget> - <widget source="session.CurrentService" render="Progress" position="0,27" size="96,5" borderWidth="1" > - <convert type="ServicePosition">Position</convert> + <widget source="session.Event_Now" render="Progress" position="0,30" size="96,8" borderWidth="1" backgroundColor="dark"> + <convert type="EventTime">Progress</convert> </widget> - <widget source="global.CurrentTime" render="Label" position="0,32" size="96,32" font="Regular;32" halign="center" valign="center" foregroundColor="#FFFFFF" backgroundColor="#000000" > + <widget source="global.CurrentTime" render="Label" position="0,38" size="96,26" font="Regular;32" halign="center" valign="center" foregroundColor="#FFFFFF" backgroundColor="#000000" > <convert type="ClockToText">Format:%H:%M</convert> </widget> - <widget source="session.RecordState" render="FixedLabel" text=" " position="0,32" zPosition="1" size="96,32"> + <widget source="session.RecordState" render="FixedLabel" text=" " position="0,38" zPosition="1" size="96,30"> <convert type="ConfigEntryTest">config.usage.blinking_display_clock_during_recording,True,CheckSourceBoolean</convert> <convert type="ConditionalShowHide">Blink</convert> </widget> @@ -1246,7 +1246,6 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y())) <widget source="parent.Text" render="Label" position="0,0" size="96,52" font="Regular;10" halign="center" valign="center" /> <widget source="parent.selectedChoice" render="Label" position="0,50" size="96,14" font="Regular;12" halign="center" valign="center" /> </screen> - <!-- LCD screen (menus) --> <screen name="MenuSummary" position="0,0" size="132,64" id="1"> <widget source="parent.title" render="Label" position="6,0" size="120,32" font="Regular;14" halign="center" valign="center"/> @@ -1256,8 +1255,8 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y())) </screen> <!-- Color OLED screen (menus) --> <screen name="MenuSummary" position="0,0" size="96,64" id="2"> - <widget source="parent.title" render="Label" position="0,0" size="96,32" font="Regular;14" halign="center" valign="center"/> - <widget source="parent.menu" render="Label" position="0,32" size="96,32" font="Regular;14" halign="center" valign="center"> + <widget source="parent.title" render="Label" position="0,0" size="96,32" font="Regular;15" halign="center" valign="center"/> + <widget source="parent.menu" render="Label" position="0,32" size="96,32" font="Regular;16" halign="center" valign="top"> <convert type="StringListSelection" /> </widget> </screen> @@ -1346,5 +1345,4 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y())) </widget> </screen> - </skin> -- cgit v1.2.3 From 970cdaf1f5137645fad5f1404d29fdd90127f5fb Mon Sep 17 00:00:00 2001 From: Stefan Pluecken <stefan.pluecken@multimedia-labs.de> Date: Sat, 2 Oct 2010 14:50:56 +0200 Subject: fixes bug #587 - use new internally connectable detection mechanism - display unsupported tuners --- data/skin_default.xml | 8 ++++---- lib/python/Components/NimManager.py | 28 +++++++++++++++++++++++----- lib/python/Screens/Satconfig.py | 4 +++- 3 files changed, 30 insertions(+), 10 deletions(-) (limited to 'data') diff --git a/data/skin_default.xml b/data/skin_default.xml index 8b26ce7e..f9fb09c1 100755 --- a/data/skin_default.xml +++ b/data/skin_default.xml @@ -670,12 +670,12 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y())) <widget name="menu" position="10,10" size="440,310" /> </screen> <!-- Nim selection --> - <screen name="NimSelection" position="center,center" size="400,330" title="Choose Tuner"> - <widget source="nimlist" render="Listbox" position="0,0" size="380,360" scrollbarMode="showOnDemand"> + <screen name="NimSelection" position="center,center" size="490,330" title="Choose Tuner"> + <widget source="nimlist" render="Listbox" position="0,0" size="460,360" scrollbarMode="showOnDemand"> <convert type="TemplatedMultiContent"> {"template": [ - MultiContentEntryText(pos = (10, 5), size = (360, 30), flags = RT_HALIGN_LEFT, text = 1), # index 1 is the nim name, - MultiContentEntryText(pos = (50, 30), size = (320, 50), font = 1, flags = RT_HALIGN_LEFT, text = 2), # index 2 is a description of the nim settings, + MultiContentEntryText(pos = (10, 5), size = (440, 30), flags = RT_HALIGN_LEFT, text = 1), # index 1 is the nim name, + MultiContentEntryText(pos = (50, 30), size = (400, 50), font = 1, flags = RT_HALIGN_LEFT, text = 2), # index 2 is a description of the nim settings, ], "fonts": [gFont("Regular", 20), gFont("Regular", 15)], "itemHeight": 80 diff --git a/lib/python/Components/NimManager.py b/lib/python/Components/NimManager.py index 805be4df..cb832e41 100644 --- a/lib/python/Components/NimManager.py +++ b/lib/python/Components/NimManager.py @@ -471,7 +471,7 @@ class SecConfigure: self.update() class NIM(object): - def __init__(self, slot, type, description, has_outputs = True, internally_connectable = None, multi_type = {}): + def __init__(self, slot, type, description, has_outputs = True, internally_connectable = None, multi_type = {}, frontend_id = None): self.slot = slot if type not in ("DVB-S", "DVB-C", "DVB-T", "DVB-S2", None): @@ -483,8 +483,11 @@ class NIM(object): self.has_outputs = has_outputs self.internally_connectable = internally_connectable self.multi_type = multi_type + self.frontend_id = frontend_id def isCompatible(self, what): + if not self.isSupported(): + return False compatible = { None: (None,), "DVB-S": ("DVB-S", None), @@ -526,6 +529,9 @@ class NIM(object): def isMultiType(self): return (len(self.multi_type) > 0) + def isSupported(self): + return (self.frontend_id is not None) + # returns dict {<slotid>: <type>} def getMultiTypeList(self): return self.multi_type @@ -548,8 +554,10 @@ class NIM(object): if self.empty: nim_text += _("(empty)") + elif not self.isSupported(): + nim_text += self.description + " (" + _("not supported") + ")" else: - nim_text += self.description + " (" + self.friendly_type + ")" + nim_text += self.description + " (" + self.friendly_type + ")" return nim_text @@ -675,6 +683,9 @@ class NimManager: elif line.strip().startswith("Internally_Connectable:"): input = int(line.strip()[len("Internally_Connectable:") + 1:]) entries[current_slot]["internally_connectable"] = input + elif line.strip().startswith("Frontend_Device:"): + input = int(line.strip()[len("Frontend_Device:") + 1:]) + entries[current_slot]["frontend_device"] = input elif line.strip().startswith("Mode"): # "Mode 0: DVB-T" -> ["Mode 0", " DVB-T"] split = line.strip().split(":") @@ -688,17 +699,24 @@ class NimManager: entries[current_slot]["name"] = _("N/A") nimfile.close() + from os import path + for id, entry in entries.items(): if not (entry.has_key("name") and entry.has_key("type")): entry["name"] = _("N/A") entry["type"] = None if not (entry.has_key("has_outputs")): entry["has_outputs"] = True - if not (entry.has_key("internally_connectable")): - entry["internally_connectable"] = None + if entry.has_key("frontend_device"): # check if internally connectable + if path.exists("/proc/stb/frontend/%d/rf_switch" % entry["frontend_device"]): + entry["internally_connectable"] = entry["frontend_device"] - 1 + else: + entry["internally_connectable"] = None + else: + entry["frontend_device"] = entry["internally_connectable"] = None if not (entry.has_key("multi_type")): entry["multi_type"] = {} - self.nim_slots.append(NIM(slot = id, description = entry["name"], type = entry["type"], has_outputs = entry["has_outputs"], internally_connectable = entry["internally_connectable"], multi_type = entry["multi_type"])) + self.nim_slots.append(NIM(slot = id, description = entry["name"], type = entry["type"], has_outputs = entry["has_outputs"], internally_connectable = entry["internally_connectable"], multi_type = entry["multi_type"], frontend_id = entry["frontend_device"])) def hasNimType(self, chktype): for slot in self.nim_slots: diff --git a/lib/python/Screens/Satconfig.py b/lib/python/Screens/Satconfig.py index 44f4251a..a5712dcd 100644 --- a/lib/python/Screens/Satconfig.py +++ b/lib/python/Screens/Satconfig.py @@ -489,7 +489,7 @@ class NimSelection(Screen): def okbuttonClick(self): nim = self["nimlist"].getCurrent() nim = nim and nim[3] - if nim is not None and not nim.empty: + if nim is not None and not nim.empty and nim.isSupported(): self.session.openWithCallback(self.updateList, self.resultclass, nim.slot) def showNim(self, nim): @@ -548,6 +548,8 @@ class NimSelection(Screen): text = _("enabled") if x.isMultiType(): text = _("Switchable tuner types:") + "(" + ','.join(x.getMultiTypeList().values()) + ")" + "\n" + text + if not x.isSupported(): + text = _("tuner is not supported") self.list.append((slotid, x.friendly_full_description, text, x)) self["nimlist"].setList(self.list) -- cgit v1.2.3