mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
- fix and use ICONSDIR variable; move ICONSSDIR_VAR to global.h
This commit is contained in:
@@ -150,7 +150,7 @@ TUXBOX_APPS_DIRECTORY_ONE(themesdir,THEMESDIR,datadir,/share, /tuxbox/neutrino/t
|
||||
[--with-themesdir=PATH ],[where to find the themes])
|
||||
|
||||
TUXBOX_APPS_DIRECTORY_ONE(iconsdir,ICONSDIR,datadir,/share, /tuxbox/neutrino/icons,
|
||||
[--with-iconsdir=PATH ],[where to find the icons (don't change)])
|
||||
[--with-iconsdir=PATH ],[where to find the icons])
|
||||
|
||||
TUXBOX_APPS_DIRECTORY_ONE(private_httpddir,PRIVATE_HTTPDDIR,datadir,/share,/tuxbox/neutrino/httpd,
|
||||
[--with-private_httpddir=PATH ],[where to find the the private httpd files])
|
||||
|
@@ -1,4 +1,4 @@
|
||||
installdir = $(DATADIR)/neutrino/icons
|
||||
installdir = $(ICONSDIR)
|
||||
|
||||
locale = \
|
||||
locale/deutsch.png \
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -46,6 +46,7 @@
|
||||
#define NEUTRINO_SCAN_SETTINGS_FILE CONFIGDIR "/scan.conf"
|
||||
#define NEUTRINO_PARENTALLOCKED_FILE DATADIR "/neutrino/.plocked"
|
||||
|
||||
#define ICONSDIR_VAR "/var/tuxbox/icons/"
|
||||
#define LOCALEDIR_VAR "/var/tuxbox/locale"
|
||||
#define THEMESDIR_VAR "/var/tuxbox/themes"
|
||||
#define PLUGINDIR_VAR "/var/tuxbox/plugins"
|
||||
|
@@ -51,8 +51,8 @@ CComponentsPIP::CComponentsPIP( const int x_pos, const int y_pos, const int perc
|
||||
//CComponentsPIP
|
||||
screen_w = frameBuffer->getScreenWidth(true);
|
||||
screen_h = frameBuffer->getScreenHeight(true);
|
||||
pic_name = DATADIR;
|
||||
pic_name += "/neutrino/icons/start.jpg";
|
||||
pic_name = ICONSDIR;
|
||||
pic_name += "/start.jpg";
|
||||
|
||||
//CComponents
|
||||
x = x_pos;
|
||||
|
@@ -188,7 +188,7 @@ bool CScreenSaver::ReadDir()
|
||||
str += "/";
|
||||
str += (*dirpointer).d_name;
|
||||
|
||||
if ((string) dir_name == DATADIR "/neutrino/icons")
|
||||
if ((string) dir_name == ICONSDIR)
|
||||
{
|
||||
/*
|
||||
backward compatiblity:
|
||||
|
@@ -405,7 +405,7 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey)
|
||||
}
|
||||
else if (actionKey == "picture"){
|
||||
if (pic == NULL)
|
||||
pic = new CComponentsPicture (100, 100, 200, 100, DATADIR "/neutrino/icons/mp3-5.jpg");
|
||||
pic = new CComponentsPicture (100, 100, 200, 100, ICONSDIR "/mp3-5.jpg");
|
||||
|
||||
if (!pic->isPainted() && !pic->isPicPainted())
|
||||
pic->paint();
|
||||
@@ -527,7 +527,7 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey)
|
||||
// remove text item
|
||||
// header->removeCCItem(CComponentsHeader::CC_HEADER_ITEM_TEXT); //then remove text item
|
||||
// create picture object with the last x position of text
|
||||
// CComponentsPicture *logo = new CComponentsPicture(logo_x, 0, 100, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(), "/share/tuxbox/neutrino/icons/hint_tvmode.png");
|
||||
// CComponentsPicture *logo = new CComponentsPicture(logo_x, 0, 100, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(), ICONSDIR "/hint_tvmode.png");
|
||||
// set the transparent background for picture item
|
||||
// logo->doPaintBg(false);
|
||||
// insert the ne object
|
||||
|
@@ -292,6 +292,4 @@
|
||||
|
||||
#define NEUTRINO_ICON_BUTTON_LONGPRESS "longpress"
|
||||
|
||||
#define NEUTRINO_ICON_VARPATH "/var/share/tuxbox/neutrino/icons/" //alternatively path for user-defined icons
|
||||
|
||||
#endif /* __gui_widget_icons_h__ */
|
||||
|
@@ -219,7 +219,7 @@ CNeutrinoApp::CNeutrinoApp()
|
||||
standby_pressed_at.tv_sec = 0;
|
||||
|
||||
frameBuffer = CFrameBuffer::getInstance();
|
||||
frameBuffer->setIconBasePath(DATADIR "/neutrino/icons/");
|
||||
frameBuffer->setIconBasePath(ICONSDIR);
|
||||
SetupFrameBuffer();
|
||||
|
||||
mode = mode_unknown;
|
||||
@@ -505,7 +505,7 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
||||
|
||||
//screen saver
|
||||
g_settings.screensaver_delay = configfile.getInt32("screensaver_delay", 1);
|
||||
g_settings.screensaver_dir = configfile.getString("screensaver_dir", DATADIR "/neutrino/icons/");
|
||||
g_settings.screensaver_dir = configfile.getString("screensaver_dir", ICONSDIR);
|
||||
g_settings.screensaver_timeout = configfile.getInt32("screensaver_timeout", 10);
|
||||
|
||||
//vcr
|
||||
|
Reference in New Issue
Block a user