You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/media-plugins/vdr-graphtft/files/vdr-graphtft-0.3.2.24_gento...

142 lines
4.6 KiB

addapted to gentoo vdr path
Joerg Bornkessel <hd_brummy@g.o> 22 Aug 2009
diff -Naur graphtft-0.3.1.orig/dfbrenderer/dfbrenderer.c graphtft-0.3.1/dfbrenderer/dfbrenderer.c
--- graphtft-0.3.1.orig/dfbrenderer/dfbrenderer.c 2009-03-23 19:46:26.000000000 +0100
+++ graphtft-0.3.1/dfbrenderer/dfbrenderer.c 2009-03-23 19:49:09.000000000 +0100
@@ -231,7 +231,7 @@
{
// make path relative to the themes directory
- asprintf(&path, "%s/graphTFT/themes/%s/%s",
+ asprintf(&path, "%s/themes/%s/%s",
confPath.c_str(), themePath.c_str(), p.c_str());
}
else
@@ -255,7 +255,7 @@
// at least add the default path
- asprintf(&path, "%s/graphTFT/fonts/", confPath.c_str());
+ asprintf(&path, "%s/fonts/", confPath.c_str());
tell(0, "Info: Adding font path '%s'", path);
fontPaths[count] = path;
free(path);
@@ -464,7 +464,7 @@
else
{
const char* tmp = themePath.c_str();
- asprintf(&fpath, "%s/graphTFT/themes/%s/%s", confPath.c_str(), tmp, fname);
+ asprintf(&fpath, "%s/themes/%s/%s", confPath.c_str(), tmp, fname);
}
tell(4,"creating imageprovider for %s\n", fpath);
@@ -538,7 +538,7 @@
else
{
const char* tmp = themePath.c_str();
- asprintf(&fpath, "%s/graphTFT/themes/%s/%s", confPath.c_str(), tmp, fname);
+ asprintf(&fpath, "%s/themes/%s/%s", confPath.c_str(), tmp, fname);
}
tell(4,"creating imageprovider for %s\n", fpath);
diff -Naur graphtft-0.3.1.orig/dspitems.c graphtft-0.3.1/dspitems.c
--- graphtft-0.3.1.orig/dspitems.c 2009-03-23 19:46:26.000000000 +0100
+++ graphtft-0.3.1/dspitems.c 2009-03-23 19:49:56.000000000 +0100
@@ -113,7 +113,7 @@
if (p[0] != '/')
{
p = string(GraphTFTSetup.PluginConfPath)
- + "/graphTFT/themes/"
+ + "/themes/"
+ string(Thms::theTheme->getDir())
+ "/" + p;
}
diff -Naur graphtft-0.3.1.orig/graphtft.c graphtft-0.3.1/graphtft.c
--- graphtft-0.3.1.orig/graphtft.c 2009-03-23 19:46:26.000000000 +0100
+++ graphtft-0.3.1/graphtft.c 2009-03-23 19:54:23.000000000 +0100
@@ -22,6 +22,8 @@
#include <graphtft.h>
#include <span.h>
+#define DATA_DIR "/usr/share/vdr/graphTFT"
+
//***************************************************************************
// cGraphTFTMenu
//***************************************************************************
@@ -296,15 +298,9 @@
#endif
- // try to get the config dir
-
- if (!ConfigDirectory())
- return false;
-
- // init
GraphTFTSetup.setClient(this);
- GraphTFTSetup.PluginConfPath = strdup(ConfigDirectory());
+ GraphTFTSetup.PluginConfPath = strdup(DATA_DIR);
#if APIVERSNUM < 10507
RegisterI18n(Phrases);
@@ -320,7 +316,7 @@
if (loadThemes() != 0)
return false;
- if (display->Init(_dev, ConfigDirectory(), port) != success)
+ if (display->Init(_dev, DATA_DIR, port) != success)
{
tell(0, "Error: Initializing graphTFT device faild, aborting!");
@@ -353,8 +349,8 @@
// look for the themes in the config directory
- asprintf(&buffer, "find %s/graphTFT/themes -follow -type f -name '*.theme' | sort",
- ConfigDirectory());
+ asprintf(&buffer, "find %s/themes -follow -type f -name '*.theme' | sort",
+ DATA_DIR);
p = popen(buffer, "r");
diff -Naur graphtft-0.3.1.orig/imlibrenderer/imlibrenderer.c graphtft-0.3.1/imlibrenderer/imlibrenderer.c
--- graphtft-0.3.1.orig/imlibrenderer/imlibrenderer.c 2009-03-23 19:46:26.000000000 +0100
+++ graphtft-0.3.1/imlibrenderer/imlibrenderer.c 2009-03-23 19:55:19.000000000 +0100
@@ -123,7 +123,7 @@
{
// make path relative to the themes directory
- asprintf(&path, "%s/graphTFT/themes/%s/%s",
+ asprintf(&path, "%s/themes/%s/%s",
confPath.c_str(), themePath.c_str(), p.c_str());
}
else
@@ -146,7 +146,7 @@
// at least add the default path
- asprintf(&path, "%s/graphTFT/fonts/", confPath.c_str());
+ asprintf(&path, "%s/fonts/", confPath.c_str());
tell(0, "Info: Adding font path '%s'", path);
imlib_add_path_to_font_path(path);
free(path);
@@ -217,7 +217,7 @@
if (fname[0] == '/')
path << fname;
else
- path << confPath << "/graphTFT/themes/" << themePath << "/" << fname;
+ path << confPath << "/themes/" << themePath << "/" << fname;
if (!fileExists(path.str().c_str()))
{
@@ -289,7 +289,7 @@
if (fname[0] == '/')
path << fname;
else
- path << confPath << "/graphTFT/themes/" << themePath << "/" << fname;
+ path << confPath << "/themes/" << themePath << "/" << fname;
if (!fileExists(path.str().c_str()))
{