mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
When the 'skincurses' plugin is loaded, it automatically sets the 'curses' skin as the current one
This commit is contained in:
parent
56744b1f4e
commit
0d4cf40b79
7
HISTORY
7
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.
|
||||
|
@ -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.
|
||||
|
@ -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 <ncurses.h>
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
8
skins.c
8
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;
|
||||
}
|
||||
|
||||
|
6
vdr.c
6
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 <getopt.h>
|
||||
@ -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:
|
||||
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user