diff --git a/HISTORY b/HISTORY index a947af5..27b8c72 100644 --- a/HISTORY +++ b/HISTORY @@ -160,3 +160,6 @@ Version 0.1.4 if a string token is set - added token {nummenuitem} for plugin menu lists - fixed bug that custom int tokens were not considered in conditions +- added possibility for skinners to define a skin setup, skin setup can + be done in plugin setup menu +- made skin blackhole configurable, adapted xml files diff --git a/config.c b/config.c index 48605a3..ecf9467 100644 --- a/config.c +++ b/config.c @@ -81,6 +81,23 @@ void cDesignerConfig::ClearSkinSetups(void) { for (map < string, cSkinSetup* >::iterator it = skinSetups.begin(); it != skinSetups.end(); it++) { delete it->second; } + skinSetups.clear(); +} + +void cDesignerConfig::DebugSkinSetups(void) { + dsyslog("skindesigner: skin setups:"); + InitSetupIterator(); + cSkinSetup *skinSetup = NULL; + while (skinSetup = GetSkinSetup()) { + skinSetup->Debug(); + } +} + +void cDesignerConfig::DebugSkinSetupParameters(void) { + dsyslog("skindesigner: skin setup parameters:"); + for (vector >::iterator it = skinSetupParameters.begin(); it != skinSetupParameters.end(); it++) { + dsyslog("skindesigner: parameter %s value %d", (*it).first.c_str(), (*it).second); + } } void cDesignerConfig::ReadSkinSetup(string skin) { @@ -123,8 +140,19 @@ void cDesignerConfig::TranslateSetup(void) { } } -void cDesignerConfig::CheckUnknownSetupParameters(void) { - for (vector < pair >::iterator it = unknownSetupParameters.begin(); it != unknownSetupParameters.end(); it++) { +void cDesignerConfig::UpdateSkinSetupParameter(string name, int value) { + vector >::iterator hit; + for (hit = skinSetupParameters.begin(); hit != skinSetupParameters.end(); hit++) { + if (!name.compare((*hit).first)) { + skinSetupParameters.erase(hit); + break; + } + } + skinSetupParameters.push_back(pair(name, value)); +} + +void cDesignerConfig::SetSkinSetupParameters(void) { + for (vector < pair >::iterator it = skinSetupParameters.begin(); it != skinSetupParameters.end(); it++) { string name = (*it).first; int value = (*it).second; @@ -159,6 +187,7 @@ void cDesignerConfig::UpdateGlobals(void) { if (skinSetupActiveSkin && tmplGlobals) { dsyslog("skindesigner: globals for skin %s adapted to skin setup", activeSkin.c_str()); skinSetupActiveSkin->AddToGlobals(tmplGlobals); + tmplGlobals->Debug(); } } @@ -286,7 +315,7 @@ bool cDesignerConfig::SetupParse(const char *Name, const char *Value) { else pluginSetupParam = false; if (!pluginSetupParam) { - unknownSetupParameters.push_back(pair (Name, atoi(Value))); + skinSetupParameters.push_back(pair (Name, atoi(Value))); } return true; diff --git a/config.h b/config.h index 31dd065..4f8519e 100644 --- a/config.h +++ b/config.h @@ -32,7 +32,7 @@ private: map < string, map < int, string > >::iterator plugIt; map < string, cSkinSetup* > skinSetups; map < string, cSkinSetup* >::iterator setupIt; - vector < pair > unknownSetupParameters; + vector < pair > skinSetupParameters; public: cDesignerConfig(); ~cDesignerConfig(); @@ -46,11 +46,14 @@ public: void InitSkinIterator(void) { skinIterator = skins.begin(); }; bool GetSkin(string &skin); void ClearSkinSetups(void); + void DebugSkinSetups(void); + void DebugSkinSetupParameters(void); cSkinSetup* GetSkinSetup(string &skin); cSkinSetup* GetSkinSetup(void); void InitSetupIterator(void) { setupIt = skinSetups.begin(); }; void TranslateSetup(void); - void CheckUnknownSetupParameters(void); + void SetSkinSetupParameters(void); + void UpdateSkinSetupParameter(string name, int value); void SetGlobals(cGlobals *globals) { tmplGlobals = globals; }; void UpdateGlobals(void); void CheckDecimalPoint(void); diff --git a/displaymenu.c b/displaymenu.c index 510cb2f..dc5d5dc 100644 --- a/displaymenu.c +++ b/displaymenu.c @@ -71,7 +71,6 @@ void cSDDisplayMenu::SetPluginMenu(string name, int menu, int type, bool init) { void cSDDisplayMenu::SetTitle(const char *Title) { if (!doOutput) return; - esyslog("skindesigner: --------------- Set Title %s", Title); rootView->SetTitle(Title); } @@ -187,7 +186,6 @@ bool cSDDisplayMenu::SetItemPlugin(map *stringTokens, map" : "", Text); if (!doOutput) return; cDisplayMenuListView *list = rootView->GetListView(); diff --git a/libtemplate/globals.c b/libtemplate/globals.c index 4faa710..9a94b4f 100644 --- a/libtemplate/globals.c +++ b/libtemplate/globals.c @@ -80,6 +80,7 @@ void cGlobals::Debug(void) { for (map ::iterator font = fonts.begin(); font != fonts.end(); font++) { dsyslog("skindesigner: Font \"%s\": \"%s\"", (font->first).c_str(), (font->second).c_str()); } + /* for (map >::iterator trans = translations.begin(); trans != translations.end(); trans++) { dsyslog("skindesigner: Translation Token %s", (trans->first).c_str()); map< string, string > tokenTrans = trans->second; @@ -87,4 +88,5 @@ void cGlobals::Debug(void) { dsyslog("skindesigner: language %s, translation %s", (transTok->first).c_str(), (transTok->second).c_str()); } } + */ } diff --git a/setup.c b/setup.c index bfffd59..a7290b1 100644 --- a/setup.c +++ b/setup.c @@ -34,7 +34,7 @@ eOSState cSkinDesignerSetup::ProcessKey(eKeys Key) { bool hadSubMenu = HasSubMenu(); eOSState state = cMenuSetupPage::ProcessKey(Key); if (hadSubMenu && Key == kOk) { - esyslog("skindesigner: store submenu"); + Store(); } if (!hadSubMenu && (state == osUnknown || Key == kOk)) { if ((Key == kOk && !hadSubMenu)) { @@ -72,7 +72,9 @@ void cSkinDesignerSetup::Store(void) { skinSetup->InitParameterIterator(); cSkinSetupParameter *param = NULL; while (param = skinSetup->GetParameter()) { - SetupStore(*cString::sprintf("%s.%s", skin.c_str(), param->name.c_str()), param->value); + cString paramName = cString::sprintf("%s.%s", skin.c_str(), param->name.c_str()); + SetupStore(*paramName, param->value); + config.UpdateSkinSetupParameter(*paramName, param->value); } } config.UpdateGlobals(); diff --git a/skindesigner.c b/skindesigner.c index 60fa0b9..091209d 100644 --- a/skindesigner.c +++ b/skindesigner.c @@ -117,7 +117,8 @@ bool cPluginSkinDesigner::Start(void) { } } config.TranslateSetup(); - config.CheckUnknownSetupParameters(); + config.SetSkinSetupParameters(); + config.DebugSkinSetups(); if (skins.size() == 0) { esyslog("skindesigner: no skins found! Using default Skin LCARS!"); @@ -229,7 +230,7 @@ cString cPluginSkinDesigner::SVDRPCommand(const char *Command, const char *Optio config.ReadSkinSetup(skin); } config.TranslateSetup(); - config.CheckUnknownSetupParameters(); + config.SetSkinSetupParameters(); activeSkin->Reload(); ReplyCode = 250; return "SKINDESIGNER reload of templates and caches forced."; diff --git a/skins/blackhole/setup.xml b/skins/blackhole/setup.xml index 7202d58..af5d2e6 100644 --- a/skins/blackhole/setup.xml +++ b/skins/blackhole/setup.xml @@ -10,28 +10,54 @@ can be configured to a value between "min" and "max". If "min" is not set, "0" is the minimum, if "max" is not set, "1000" is maximum. "displayname" is used to display the option in the setup menu. + The configured parameter value is the default value. --> - 0 + 0 1 + 1 300 + 10 + 10 + 16 + 1 - - Show Signalstrength and -quality when switching channel - Signalstärke und -qualität beim Umschalten anzeigen + + Show DVB device info when switching channel + DVB Karten Info beim Umschalten anzeigen Show Poster when switching channel Poster beim Umschalten anzeigen + + Show Icons in Main Menu + Icons im Hauptmenü anzeigen + - Fade In and Out time in ms - Fade In and Out Zeit in ms + Fade time in ms (needs VDR restart) + Einblendzeit in ms (erfordert VDR Neustart) + + + Items in main menu (needs VDR restart) + Elemente im Hauptmenü (erfordert VDR Neustart) + + + Items in sdchedules, timers, ... menus (needs VDR restart) + Elemente in Programm, Timer, ... Menüs (erfordert VDR Neustart) + + + Items in default list menu (needs VDR restart) + Elemente im Standard ListenMenü (erfordert VDR Neustart) + + + Show shorttexts in schedules menus + Kurztexte im Programm Menü anzeigen diff --git a/skins/blackhole/themes/default/globals.xml b/skins/blackhole/themes/default/globals.xml index 6eed95f..3f09c26 100644 --- a/skins/blackhole/themes/default/globals.xml +++ b/skins/blackhole/themes/default/globals.xml @@ -22,7 +22,6 @@ set such a variable to 1 for true and 0 for false --> - 300 diff --git a/skins/blackhole/xmlfiles/displaychannel.xml b/skins/blackhole/xmlfiles/displaychannel.xml index 545b756..0603b2c 100644 --- a/skins/blackhole/xmlfiles/displaychannel.xml +++ b/skins/blackhole/xmlfiles/displaychannel.xml @@ -1,19 +1,19 @@ - + - + - + - + @@ -26,10 +26,10 @@ {switching} true if a number is pressed on the remote to switch to a dedicated channel --> - + - + @@ -56,13 +56,13 @@ {nextrecording} true if next Schedule will be recorded --> - + - + @@ -78,16 +78,16 @@ {remaining} Remaining time of current Schedule in seconds --> - + - + - + @@ -102,7 +102,7 @@ {newmails} true if mailbox plugin is installed and new mails are available --> - + @@ -127,7 +127,7 @@ {isWideScreen} true if aspect is 16:9 or 21:9 --> - + @@ -143,7 +143,7 @@ {seppath} path for separator logo to use in imagetype "seplogo" --> - + @@ -180,6 +180,17 @@ {devices[source]} source of the currently tuned channel --> + + + + + + + + + + + + + + + + + - - + + - + @@ -228,19 +245,19 @@ {hmins} current "hourminutes" to display an hour hand --> - + @@ -254,13 +271,13 @@ {error} true if message is a error message --> - + - + diff --git a/skins/blackhole/xmlfiles/displaymenu.xml b/skins/blackhole/xmlfiles/displaymenu.xml index abdcb78..04a3838 100644 --- a/skins/blackhole/xmlfiles/displaymenu.xml +++ b/skins/blackhole/xmlfiles/displaymenu.xml @@ -129,103 +129,103 @@ --> - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - + - + &displaymenudefault; diff --git a/skins/blackhole/xmlfiles/displaymenuchannels.xml b/skins/blackhole/xmlfiles/displaymenuchannels.xml index c1f8563..e4fa353 100644 --- a/skins/blackhole/xmlfiles/displaymenuchannels.xml +++ b/skins/blackhole/xmlfiles/displaymenuchannels.xml @@ -9,7 +9,7 @@ - + - + - + + + + + + + @@ -102,15 +114,27 @@ - + + + + + + + - - + + + + + + + + @@ -119,15 +143,27 @@ - + + + + + + + - - + + + + + + + + @@ -136,16 +172,29 @@ - + + + + + + + - + - - + + + + + + + + + diff --git a/skins/blackhole/xmlfiles/displaymenusetup.xml b/skins/blackhole/xmlfiles/displaymenusetup.xml index 590f102..a86dfd4 100644 --- a/skins/blackhole/xmlfiles/displaymenusetup.xml +++ b/skins/blackhole/xmlfiles/displaymenusetup.xml @@ -9,7 +9,7 @@ - + diff --git a/skins/blackhole/xmlfiles/displayvolume.xml b/skins/blackhole/xmlfiles/displayvolume.xml index 1b886ad..7768aff 100644 --- a/skins/blackhole/xmlfiles/displayvolume.xml +++ b/skins/blackhole/xmlfiles/displayvolume.xml @@ -1,7 +1,7 @@ - + diff --git a/skins/metrixhd/setup.xml b/skins/metrixhd/setup.xml new file mode 100644 index 0000000..52bde41 --- /dev/null +++ b/skins/metrixhd/setup.xml @@ -0,0 +1,33 @@ + + + + + + + 0 + 0 + + + + + + Fade time in ms (needs VDR restart) + Einblendzeit in ms (erfordert VDR Neustart) + + + Show DVB device info when switching channel + DVB Karten Info beim Umschalten anzeigen + + + diff --git a/skins/metrixhd/themes/default/globals.xml b/skins/metrixhd/themes/default/globals.xml index 1eae5f1..1ce4251 100644 --- a/skins/metrixhd/themes/default/globals.xml +++ b/skins/metrixhd/themes/default/globals.xml @@ -25,8 +25,6 @@ set such a variable to 1 for true and 0 for false --> - 5 - 0 hützligrütz 3.14 diff --git a/skins/metrixhd/xmlfiles/displayaudiotracks.xml b/skins/metrixhd/xmlfiles/displayaudiotracks.xml index f37983d..8c5af98 100644 --- a/skins/metrixhd/xmlfiles/displayaudiotracks.xml +++ b/skins/metrixhd/xmlfiles/displayaudiotracks.xml @@ -1,7 +1,7 @@ - + diff --git a/skins/metrixhd/xmlfiles/displaychannel.xml b/skins/metrixhd/xmlfiles/displaychannel.xml index a7b33af..3c63a18 100644 --- a/skins/metrixhd/xmlfiles/displaychannel.xml +++ b/skins/metrixhd/xmlfiles/displaychannel.xml @@ -1,7 +1,7 @@ - + @@ -197,10 +197,10 @@ {devices[source]} source of the currently tuned channel --> - + - + diff --git a/skins/metrixhd/xmlfiles/displaymessage.xml b/skins/metrixhd/xmlfiles/displaymessage.xml index e872e95..0ff98b2 100644 --- a/skins/metrixhd/xmlfiles/displaymessage.xml +++ b/skins/metrixhd/xmlfiles/displaymessage.xml @@ -1,7 +1,7 @@ - + diff --git a/skins/metrixhd/xmlfiles/displayreplay.xml b/skins/metrixhd/xmlfiles/displayreplay.xml index 889d51b..8853fad 100644 --- a/skins/metrixhd/xmlfiles/displayreplay.xml +++ b/skins/metrixhd/xmlfiles/displayreplay.xml @@ -1,7 +1,7 @@ - + diff --git a/skins/metrixhd/xmlfiles/displayvolume.xml b/skins/metrixhd/xmlfiles/displayvolume.xml index 6811d67..604f7e5 100644 --- a/skins/metrixhd/xmlfiles/displayvolume.xml +++ b/skins/metrixhd/xmlfiles/displayvolume.xml @@ -1,7 +1,7 @@ - +