mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-01 18:01:13 +02:00
- fix and use ICONSDIR variable; move ICONSSDIR_VAR to global.h
This commit is contained in:
@@ -59,7 +59,6 @@ extern cVideo * videoDecoder;
|
||||
|
||||
extern CPictureViewer * g_PicViewer;
|
||||
#define ICON_CACHE_SIZE 1024*1024*2 // 2mb
|
||||
#define ICONDIR_VAR "/var/tuxbox/icons/"
|
||||
|
||||
#define BACKGROUNDIMAGEWIDTH 720
|
||||
|
||||
@@ -1066,9 +1065,9 @@ bool CFrameBuffer::paintIcon(const std::string & filename, const int x, const in
|
||||
/* we cache and check original name */
|
||||
it = icon_cache.find(filename);
|
||||
if(it == icon_cache.end()) {
|
||||
std::string newname = std::string(ICONDIR_VAR) + filename + ".png";
|
||||
std::string newname = std::string(ICONSDIR_VAR) + "/" + filename + ".png";
|
||||
if (access(newname.c_str(), F_OK))
|
||||
newname = iconBasePath + filename + ".png";
|
||||
newname = iconBasePath + "/" + filename + ".png";
|
||||
if (filename.find("/", 0) != std::string::npos)
|
||||
newname = filename;
|
||||
//printf("CFrameBuffer::paintIcon: check for %s\n", newname.c_str());fflush(stdout);
|
||||
@@ -1089,9 +1088,9 @@ bool CFrameBuffer::paintIcon(const std::string & filename, const int x, const in
|
||||
goto _display;
|
||||
}
|
||||
|
||||
newname = std::string(ICONDIR_VAR) + filename + ".raw";
|
||||
newname = std::string(ICONSDIR_VAR) + "/" + filename + ".raw";
|
||||
if (access(newname.c_str(), F_OK))
|
||||
newname = iconBasePath + filename + ".raw";
|
||||
newname = iconBasePath + "/" + filename + ".raw";
|
||||
|
||||
int lfd = open(newname.c_str(), O_RDONLY);
|
||||
|
||||
@@ -1800,9 +1799,9 @@ void CFrameBuffer::Clear()
|
||||
|
||||
void CFrameBuffer::showFrame(const std::string & filename)
|
||||
{
|
||||
std::string picture = std::string(ICONDIR_VAR) + filename;
|
||||
std::string picture = std::string(ICONSDIR_VAR) + "/" + filename;
|
||||
if (access(picture.c_str(), F_OK))
|
||||
picture = iconBasePath + filename;
|
||||
picture = iconBasePath + "/" + filename;
|
||||
if (filename.find("/", 0) != std::string::npos)
|
||||
picture = filename;
|
||||
|
||||
|
@@ -513,8 +513,8 @@ void CPictureViewer::getSize(const char* name, int* width, int *height)
|
||||
}
|
||||
}
|
||||
|
||||
#define LOGO_FLASH_DIR DATADIR "/neutrino/icons/logo"
|
||||
#define LOGO_FLASH_DIR_VAR "/var/tuxbox/icons/logo"
|
||||
#define LOGODIR ICONSDIR "/logo"
|
||||
#define LOGODIR_VAR ICONSDIR_VAR "/logo"
|
||||
|
||||
bool CPictureViewer::GetLogoName(const uint64_t& channel_id, const std::string& ChannelName, std::string & name, int *width, int *height)
|
||||
{
|
||||
@@ -539,25 +539,25 @@ bool CPictureViewer::GetLogoName(const uint64_t& channel_id, const std::string&
|
||||
id_tmp_path += strChnId + fileType[i];
|
||||
v_path.push_back(id_tmp_path);
|
||||
|
||||
if(g_settings.logo_hdd_dir != LOGO_FLASH_DIR_VAR){
|
||||
//create filename with channel name (LOGO_FLASH_DIR_VAR)
|
||||
id_tmp_path = LOGO_FLASH_DIR_VAR "/";
|
||||
if(g_settings.logo_hdd_dir != LOGODIR_VAR){
|
||||
//create filename with channel name (LOGODIR_VAR)
|
||||
id_tmp_path = LOGODIR_VAR "/";
|
||||
id_tmp_path += ChannelName + fileType[i];
|
||||
v_path.push_back(id_tmp_path);
|
||||
|
||||
//create filename with id (LOGO_FLASH_DIR_VAR)
|
||||
id_tmp_path = LOGO_FLASH_DIR_VAR "/";
|
||||
//create filename with id (LOGODIR_VAR)
|
||||
id_tmp_path = LOGODIR_VAR "/";
|
||||
id_tmp_path += strChnId + fileType[i];
|
||||
v_path.push_back(id_tmp_path);
|
||||
}
|
||||
if(g_settings.logo_hdd_dir != LOGO_FLASH_DIR){
|
||||
//create filename with channel name (LOGO_FLASH_DIR)
|
||||
id_tmp_path = LOGO_FLASH_DIR "/";
|
||||
if(g_settings.logo_hdd_dir != LOGODIR){
|
||||
//create filename with channel name (LOGODIR)
|
||||
id_tmp_path = LOGODIR "/";
|
||||
id_tmp_path += ChannelName + fileType[i];
|
||||
v_path.push_back(id_tmp_path);
|
||||
|
||||
//create filename with id (LOGO_FLASH_DIR)
|
||||
id_tmp_path = LOGO_FLASH_DIR "/";
|
||||
//create filename with id (LOGODIR)
|
||||
id_tmp_path = LOGODIR "/";
|
||||
id_tmp_path += strChnId + fileType[i];
|
||||
v_path.push_back(id_tmp_path);
|
||||
}
|
||||
|
Reference in New Issue
Block a user