1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
/*
* config.c: 'EnigmaNG' skin for the Video Disk Recorder
*
* See the README file for copyright information and how to reach the author.
*
*/
#include <stdlib.h>
#include "common.h"
#include "config.h"
#ifdef HAVE_IMAGEMAGICK
const char *imageExtensionTexts[NUM_IMAGEEXTENSIONTEXTS] = { "xpm", "jpg", "png" };
#endif
cEnigmaConfig EnigmaConfig;
cEnigmaConfig::cEnigmaConfig() : showAuxInfo(1), showLogo(1), showVps(1), showSymbols(1),
showListSymbols(1), showProgressbar(1), cacheSize(50),
useChannelId(0), showInfo(1), showRemaining(0), showMarker(1),
singleArea(1), singleArea8Bpp(1), showFlags(1), numReruns(5),
useSubtitleRerun(1), showTimerConflicts(1), showRecSize(2),
showImages(1), resizeImages(0), showMailIcon(0),
imageWidth(120), imageHeight(120), imageExtension(0), fullTitleWidth(0)
{
memset(logoDir, 0, sizeof(logoDir));
memset(strImagesDir, 0, sizeof(strImagesDir));
}
cEnigmaConfig::~cEnigmaConfig()
{
}
void cEnigmaConfig::SetLogoDir(const char *logodirP)
{
if (logodirP)
{
debug("cEnigmaConfig::SetLogoDir(%s)\n", logodirP);
strncpy(logoDir, logodirP, sizeof(logoDir));
}
}
void cEnigmaConfig::SetImagesDir(const char *dir)
{
if (dir)
{
debug("cEnigmaConfig::SetImagesDir(%s)\n", dir);
strncpy(strImagesDir, dir, sizeof(strImagesDir));
}
}
const char *cEnigmaConfig::GetImageExtension(void)
{
#ifdef HAVE_IMAGEMAGICK
return (0 <= imageExtension && imageExtension < NUM_IMAGEEXTENSIONTEXTS) ? imageExtensionTexts[imageExtension] : imageExtensionTexts[0];
#else
return "xpm";
#endif
}
|