diff --git a/HISTORY b/HISTORY index 4c639f52..cbabbaf0 100644 --- a/HISTORY +++ b/HISTORY @@ -4766,3 +4766,10 @@ Video Disk Recorder Revision History - Fixed handling tabbed item display in 'skincurses'. - Increased the column spacing in the "Recordings" menu (was too small for the 'skincurses' plugin). +- When the 'skincurses' plugin is loaded, it automatically sets the 'curses' + skin as the current one. This doesn't modify the Setup.OSDSkin parameter, so + that after using 'skincurses' (for instance for debugging) the previously + selected skin will be used again. +- Added some log messages when setting the current skin. +- Only making a second attempt to set the current skin at startup if the first + attempt has failed. diff --git a/PLUGINS/src/skincurses/HISTORY b/PLUGINS/src/skincurses/HISTORY index 6c870957..c58423df 100644 --- a/PLUGINS/src/skincurses/HISTORY +++ b/PLUGINS/src/skincurses/HISTORY @@ -33,3 +33,5 @@ VDR Plugin 'skincurses' Revision History 2006-06-03: Version 0.0.7 - Fixed handling tabbed item display. +- When the 'skincurses' plugin is loaded, it automatically sets the 'curses' + skin as the current one. diff --git a/PLUGINS/src/skincurses/skincurses.c b/PLUGINS/src/skincurses/skincurses.c index f9e15dd2..a75375b5 100644 --- a/PLUGINS/src/skincurses/skincurses.c +++ b/PLUGINS/src/skincurses/skincurses.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: skincurses.c 1.9 2006/06/03 13:21:33 kls Exp $ + * $Id: skincurses.c 1.10 2006/06/03 14:20:39 kls Exp $ */ #include @@ -787,7 +787,9 @@ bool cPluginSkinCurses::Initialize(void) bool cPluginSkinCurses::Start(void) { // Start any background activities the plugin shall perform. - new cSkinCurses; + cSkin *Skin = new cSkinCurses; + // This skin is normally used for debugging, so let's make it the current one: + Skins.SetCurrent(Skin->Name()); return true; } diff --git a/skins.c b/skins.c index c3c93961..7a9682ed 100644 --- a/skins.c +++ b/skins.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: skins.c 1.10 2006/06/03 10:18:07 kls Exp $ + * $Id: skins.c 1.11 2006/06/03 14:39:14 kls Exp $ */ #include "skins.h" @@ -176,7 +176,6 @@ cSkin::cSkin(const char *Name, cTheme *Theme) if (theme) cThemes::Save(name, theme); Skins.Add(this); - Skins.SetCurrent(Name); } cSkin::~cSkin() @@ -203,12 +202,17 @@ bool cSkins::SetCurrent(const char *Name) if (Name) { for (cSkin *Skin = First(); Skin; Skin = Next(Skin)) { if (strcmp(Skin->Name(), Name) == 0) { + isyslog("setting current skin to \"%s\"", Name); current = Skin; return true; } } } current = First(); + if (current) + isyslog("skin \"%s\" not available - using \"%s\" instead", Name, current->Name()); + else + esyslog("ERROR: no skin available"); return current != NULL; } diff --git a/vdr.c b/vdr.c index 6343933f..42309128 100644 --- a/vdr.c +++ b/vdr.c @@ -22,7 +22,7 @@ * * The project's page is at http://www.cadsoft.de/vdr * - * $Id: vdr.c 1.272 2006/05/14 09:23:46 kls Exp $ + * $Id: vdr.c 1.273 2006/06/03 14:46:36 kls Exp $ */ #include @@ -504,6 +504,7 @@ int main(int argc, char *argv[]) bool UserShutdown = false; bool TimerInVpsMargin = false; bool IsInfoMenu = false; + cSkin *CurrentSkin = NULL; // Load plugins: @@ -605,6 +606,7 @@ int main(int argc, char *argv[]) new cSkinSTTNG; Skins.SetCurrent(Setup.OSDSkin); cThemes::Load(Skins.Current()->Name(), Setup.OSDTheme, Skins.Current()->Theme()); + CurrentSkin = Skins.Current(); // Start plugins: @@ -613,8 +615,10 @@ int main(int argc, char *argv[]) // Set skin and theme in case they're implemented by a plugin: - Skins.SetCurrent(Setup.OSDSkin); - cThemes::Load(Skins.Current()->Name(), Setup.OSDTheme, Skins.Current()->Theme()); + if (!CurrentSkin || CurrentSkin == Skins.Current() && strcmp(Skins.Current()->Name(), Setup.OSDSkin) != 0) { + Skins.SetCurrent(Setup.OSDSkin); + cThemes::Load(Skins.Current()->Name(), Setup.OSDTheme, Skins.Current()->Theme()); + } // Remote Controls: if (RcuDevice)