mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Added icon path as start option
This commit is contained in:
parent
a5330c715e
commit
92437a3951
13
tvguide.c
13
tvguide.c
@ -72,7 +72,8 @@ const char *cPluginTvguide::CommandLineHelp(void)
|
||||
{
|
||||
// Return a string that describes all known command line options.
|
||||
return
|
||||
" -i <IMAGESDIR>, --epgimages=<IMAGESDIR> Set directory where epgimages are stored\n"
|
||||
" -i <IMAGESDIR>, --epgimages=<IMAGESDIR> Set directory where epgimages are stored.\n"
|
||||
" -c <ICONDIR>, --icons=<ICONDIR> Set directory where icons are stored.\n"
|
||||
" -l <LOGODIR>, --logodir=<LOGODIR> Set directory where logos are stored.\n";
|
||||
}
|
||||
|
||||
@ -81,19 +82,25 @@ bool cPluginTvguide::ProcessArgs(int argc, char *argv[])
|
||||
// Implement command line argument processing here if applicable.
|
||||
static const struct option long_options[] = {
|
||||
{ "epgimages", required_argument, NULL, 'i' },
|
||||
{ "icons", required_argument, NULL, 'c' },
|
||||
{ "logopath", required_argument, NULL, 'l' },
|
||||
{ 0, 0, 0, 0 }
|
||||
};
|
||||
|
||||
int c;
|
||||
cString *path = NULL;
|
||||
while ((c = getopt_long(argc, argv, "i:f:l:", long_options, NULL)) != -1) {
|
||||
while ((c = getopt_long(argc, argv, "i:c:l:", long_options, NULL)) != -1) {
|
||||
switch (c) {
|
||||
case 'i':
|
||||
path = new cString(optarg);
|
||||
tvguideConfig.SetImagesPath(*path);
|
||||
imagesPathSet = true;
|
||||
break;
|
||||
case 'c':
|
||||
path = new cString(optarg);
|
||||
tvguideConfig.SetIconsPath(*path);
|
||||
iconsPathSet = true;
|
||||
break;
|
||||
case 'l':
|
||||
path = new cString(optarg);
|
||||
tvguideConfig.SetLogoPath(*path);
|
||||
@ -129,7 +136,7 @@ bool cPluginTvguide::Start(void)
|
||||
}
|
||||
|
||||
if (!iconsPathSet) {
|
||||
cString path = cString::sprintf("%s/icons/", cPlugin::ConfigDirectory(PLUGIN_NAME_I18N));
|
||||
cString path = cString::sprintf("%s/icons/", cPlugin::ResourceDirectory(PLUGIN_NAME_I18N));
|
||||
tvguideConfig.SetIconsPath(path);
|
||||
iconsPathSet = true;
|
||||
}
|
||||
|
@ -120,10 +120,6 @@ void cTvGuideOsd::Show(void) {
|
||||
myTime = new cMyTime();
|
||||
myTime->Now();
|
||||
SwitchTimers.Load(AddDirectory(cPlugin::ConfigDirectory("epgsearch"), "epgsearchswitchtimers.conf"));
|
||||
cSwitchTimer *st = NULL;
|
||||
for (st = SwitchTimers.First(); st; st = SwitchTimers.Next(st)) {
|
||||
esyslog("tvguide: switchtimer eventID %d time %ld", st->eventID, st->startTime);
|
||||
}
|
||||
recMenuManager = new cRecMenuManager();
|
||||
drawOsd();
|
||||
}
|
||||
@ -694,4 +690,4 @@ void cTvGuideOsd::dump() {
|
||||
for (cChannelColumn *col = columns.First(); col; col = columns.Next(col)) {
|
||||
col->dumpGrids();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user