diff --git a/acinclude.m4 b/acinclude.m4 index e09cdd66d..04d9216e1 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -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]) diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am index e1166af54..6d59d26a1 100644 --- a/data/icons/Makefile.am +++ b/data/icons/Makefile.am @@ -1,4 +1,4 @@ -installdir = $(DATADIR)/neutrino/icons +installdir = $(ICONSDIR) locale = \ locale/deutsch.png \ diff --git a/src/driver/framebuffer.cpp b/src/driver/framebuffer.cpp index a32969cea..6f9d06bf2 100644 --- a/src/driver/framebuffer.cpp +++ b/src/driver/framebuffer.cpp @@ -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; diff --git a/src/driver/pictureviewer/pictureviewer.cpp b/src/driver/pictureviewer/pictureviewer.cpp index 8400b1148..b5ca90b6d 100644 --- a/src/driver/pictureviewer/pictureviewer.cpp +++ b/src/driver/pictureviewer/pictureviewer.cpp @@ -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); } diff --git a/src/global.h b/src/global.h index 8597d667a..aeccaef70 100644 --- a/src/global.h +++ b/src/global.h @@ -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" diff --git a/src/gui/components/cc_item_tvpic.cpp b/src/gui/components/cc_item_tvpic.cpp index 8bc4a5ee1..4dd375f2f 100644 --- a/src/gui/components/cc_item_tvpic.cpp +++ b/src/gui/components/cc_item_tvpic.cpp @@ -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; diff --git a/src/gui/screensaver.cpp b/src/gui/screensaver.cpp index d3788e419..7c10a6f23 100644 --- a/src/gui/screensaver.cpp +++ b/src/gui/screensaver.cpp @@ -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: diff --git a/src/gui/test_menu.cpp b/src/gui/test_menu.cpp index 6a50e641d..109155f87 100644 --- a/src/gui/test_menu.cpp +++ b/src/gui/test_menu.cpp @@ -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 diff --git a/src/gui/widget/icons.h b/src/gui/widget/icons.h index 1c671fc53..9ed5eaa5b 100644 --- a/src/gui/widget/icons.h +++ b/src/gui/widget/icons.h @@ -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__ */ diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 05cb835b7..32a5b8d2b 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -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