diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 0e5ee021c..320755614 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -664,6 +664,7 @@ ledcontroler.on.all LED1 & LED2 an ledcontroler.on.led1 LED1 an ledcontroler.on.led2 LED2 an ledcontroler.blink Blinke im Deep-Standby, wenn Timer aktiv +logo_hdd_dir Logo Verz. mainmenu.audioplayer Audioplayer mainmenu.clearsectionsd Lösche EPG Cache mainmenu.games Spiele diff --git a/data/locale/english.locale b/data/locale/english.locale index 475a93e47..8ee52a6dc 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -479,6 +479,7 @@ ledcontroler.on.all Led1 & Led2 on ledcontroler.on.led1 Led1 on ledcontroler.on.led2 Led2 on ledcontroler.blink Blink in deep standby, if timer set +logo_hdd_dir Logo dir mainmenu.audioplayer Audioplayer mainmenu.games Games mainmenu.head Main Menu diff --git a/src/driver/pictureviewer/pictureviewer.cpp b/src/driver/pictureviewer/pictureviewer.cpp index faf5b0f6c..bb1195aa2 100644 --- a/src/driver/pictureviewer/pictureviewer.cpp +++ b/src/driver/pictureviewer/pictureviewer.cpp @@ -439,7 +439,6 @@ void CPictureViewer::getSize(const char* name, int* width, int *height) } #define LOGO_DIR1 "/share/tuxbox/neutrino/icons/logo" -#define LOGO_DIR2 "/var/share/icons/logo" #define LOGO_FMT ".jpg" bool CPictureViewer::GetLogoName(uint64_t channel_id, std::string ChannelName, std::string & name, int *width, int *height) @@ -457,7 +456,7 @@ bool CPictureViewer::GetLogoName(uint64_t channel_id, std::string ChannelName, s { for (j = 0; j < 2; j++) { - std::string tmp(LOGO_DIR2 "/" + strLogoName[i] + strLogoExt[j]); + std::string tmp(g_settings.logo_hdd_dir + "/" + strLogoName[i] + strLogoExt[j]); if (access(tmp.c_str(), R_OK) != -1) { if(width && height) @@ -489,10 +488,10 @@ bool CPictureViewer::DisplayLogo (uint64_t channel_id, int posx, int posy, int w char fname[255]; bool ret = false; - sprintf(fname, "%s/%llx.jpg", LOGO_DIR2, channel_id & 0xFFFFFFFFFFFFULL); + sprintf(fname, "%s/%llx.jpg", g_settings.logo_hdd_dir.c_str(), channel_id & 0xFFFFFFFFFFFFULL); printf("logo file: %s\n", fname); if(access(fname, F_OK)) - sprintf(fname, "%s/%llx.gif", LOGO_DIR2, channel_id & 0xFFFFFFFFFFFFULL); + sprintf(fname, "%s/%llx.gif", g_settings.logo_hdd_dir.c_str(), channel_id & 0xFFFFFFFFFFFFULL); if(!access(fname, F_OK)) { ret = DisplayImage(fname, posx, posy, width, height); diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 3705dffba..93c245fac 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -670,7 +670,7 @@ printf("***************************** rec dir %s timeshift dir %s\n", g_settings g_settings.movieplayer_plugin = configfile.getString( "movieplayer_plugin", "Teletext" ); g_settings.onekey_plugin = configfile.getString( "onekey_plugin", "noplugin" ); g_settings.plugin_hdd_dir = configfile.getString( "plugin_hdd_dir", "/hdd/tuxbox/plugins" ); - + g_settings.logo_hdd_dir = configfile.getString( "logo_hdd_dir", "/var/share/icons/logo" ); //rc-key configuration g_settings.key_tvradio_mode = configfile.getInt32( "key_tvradio_mode", CRCInput::RC_nokey ); g_settings.key_power_off = configfile.getInt32( "key_power_off", CRCInput::RC_standby ); @@ -1193,7 +1193,7 @@ void CNeutrinoApp::saveSetup(const char * fname) configfile.setString ( "movieplayer_plugin", g_settings.movieplayer_plugin ); configfile.setString ( "onekey_plugin", g_settings.onekey_plugin ); configfile.setString ( "plugin_hdd_dir", g_settings.plugin_hdd_dir ); - + configfile.setString ( "logo_hdd_dir", g_settings.logo_hdd_dir ); configfile.setInt32 ( "streaming_resolution", g_settings.streaming_resolution ); configfile.setInt32( "rf_subcarrier", g_settings.rf_subcarrier); @@ -4050,6 +4050,7 @@ int CNeutrinoApp::exec(CMenuTarget* parent, const std::string & actionKey) { // printf("ac: %s\n", actionKey.c_str()); int returnval = menu_return::RETURN_REPAINT; + const char *wrong_str = "Wrong/unsupported"; if(actionKey == "help_recording") { ShowLocalizedMessage(LOCALE_SETTINGS_HELP, LOCALE_RECORDINGMENU_HELP, CMessageBox::mbrBack, CMessageBox::mbBack); @@ -4200,7 +4201,7 @@ int CNeutrinoApp::exec(CMenuTarget* parent, const std::string & actionKey) if (fileBrowser.exec(g_settings.update_dir) == true) { const char * newdir = fileBrowser.getSelectedFile()->Name.c_str(); if(check_dir(newdir)) - printf("Wrong/unsupported recording dir %s\n", newdir); + printf("%s recording dir %s\n",wrong_str , newdir); else { strcpy(g_settings.update_dir, fileBrowser.getSelectedFile()->Name.c_str()); printf("[neutrino] new update dir %s\n", fileBrowser.getSelectedFile()->Name.c_str()); @@ -4215,7 +4216,7 @@ int CNeutrinoApp::exec(CMenuTarget* parent, const std::string & actionKey) if (b.exec(g_settings.epg_dir.c_str())) { const char * newdir = b.getSelectedFile()->Name.c_str(); if(check_dir(newdir)) - printf("Wrong/unsupported epg dir %s\n", newdir); + printf("%s epg dir %s\n",wrong_str , newdir); else { g_settings.epg_dir = b.getSelectedFile()->Name; SendSectionsdConfig(); @@ -4224,23 +4225,37 @@ int CNeutrinoApp::exec(CMenuTarget* parent, const std::string & actionKey) return menu_return::RETURN_REPAINT; } - else if(actionKey == "pluginhdddir") { + else if(actionKey == "plugin_dir") { parent->hide(); CFileBrowser b; b.Dir_Mode=true; if (b.exec(g_settings.plugin_hdd_dir.c_str())) { const char * newdir = b.getSelectedFile()->Name.c_str(); if(check_dir(newdir)) - printf("Wrong/unsupported plugin dir %s\n", newdir); + printf("%s plugin dir %s\n",wrong_str , newdir); else { g_settings.plugin_hdd_dir = b.getSelectedFile()->Name; - SendSectionsdConfig(); g_PluginList->loadPlugins(); } } return menu_return::RETURN_REPAINT; } + else if(actionKey == "logo_dir") { + parent->hide(); + CFileBrowser b; + b.Dir_Mode=true; + if (b.exec(g_settings.logo_hdd_dir.c_str())) { + const char * newdir = b.getSelectedFile()->Name.c_str(); + if(check_dir(newdir)) + printf("%s logo dir %s\n",wrong_str , newdir); + else { + g_settings.logo_hdd_dir = b.getSelectedFile()->Name; + } + } + + return menu_return::RETURN_REPAINT; + } else if(actionKey == "movieplugin") { parent->hide(); CMenuWidget MoviePluginSelector(LOCALE_MOVIEPLAYER_DEFPLUGIN, NEUTRINO_ICON_FEATURES); diff --git a/src/neutrino_menue.cpp b/src/neutrino_menue.cpp index f0bfe76dc..d8ed442d1 100644 --- a/src/neutrino_menue.cpp +++ b/src/neutrino_menue.cpp @@ -1321,7 +1321,8 @@ void CNeutrinoApp::InitMiscSettings(CMenuWidget &miscSettings) if (g_info.delivery_system == DVB_S) { miscSettingsGeneral->addItem(new CMenuOptionChooser(LOCALE_EXTRA_ROTORSWAP, &g_settings.rotor_swap, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); } - miscSettingsGeneral->addItem(new CMenuForwarder(LOCALE_PLUGINS_HDD_DIR, true, g_settings.plugin_hdd_dir, this, "pluginhdddir")); + miscSettingsGeneral->addItem(new CMenuForwarder(LOCALE_PLUGINS_HDD_DIR, true, g_settings.plugin_hdd_dir, this, "plugin_dir")); + miscSettingsGeneral->addItem(new CMenuForwarder(LOCALE_LOGO_HDD_DIR, true, g_settings.logo_hdd_dir, this, "logo_dir")); if(cs_get_revision() > 7){ diff --git a/src/system/locals.h b/src/system/locals.h index 544bb12b1..661b5bcec 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -509,6 +509,7 @@ typedef enum { LOCALE_LEDCONTROLER_ON_LED1, LOCALE_LEDCONTROLER_ON_LED2, LOCALE_LEDCONTROLER_BLINK, + LOCALE_LOGO_HDD_DIR, LOCALE_MAINMENU_AUDIOPLAYER, LOCALE_MAINMENU_CLEARSECTIONSD, LOCALE_MAINMENU_GAMES, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index e1626842f..a71bd0617 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -509,6 +509,7 @@ const char *locale_real_names[] = { "ledcontroler.on.led1", "ledcontroler.on.led2", "ledcontroler.blink", + "logo_hdd_dir", "mainmenu.audioplayer", "mainmenu.clearsectionsd", "mainmenu.games", diff --git a/src/system/settings.h b/src/system/settings.h index 4d995a39b..8085e60cb 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -256,6 +256,9 @@ struct SNeutrinoSettings std::string movieplayer_plugin; std::string onekey_plugin; std::string plugin_hdd_dir; + + std::string logo_hdd_dir; + //key configuration int key_tvradio_mode;