diff --git a/src/driver/record.cpp b/src/driver/record.cpp index b1c3dd307..13f796c28 100644 --- a/src/driver/record.cpp +++ b/src/driver/record.cpp @@ -1437,7 +1437,7 @@ int CRecordManager::exec(CMenuTarget* parent, const std::string & actionKey ) } else if(actionKey == "Stop_record") { if(!CRecordManager::getInstance()->RecordingStatus()) { - ShowHintUTF(LOCALE_MAINMENU_RECORDING_STOP, g_Locale->getText(LOCALE_RECORDINGMENU_RECORD_IS_NOT_RUNNING), 450, 2); + ShowHint(LOCALE_MAINMENU_RECORDING_STOP, g_Locale->getText(LOCALE_RECORDINGMENU_RECORD_IS_NOT_RUNNING), 450, 2); return menu_return::RETURN_EXIT_ALL; } } diff --git a/src/gui/cam_menu.cpp b/src/gui/cam_menu.cpp index 3314228c0..d0dc13e7f 100644 --- a/src/gui/cam_menu.cpp +++ b/src/gui/cam_menu.cpp @@ -250,7 +250,7 @@ int CCAMMenuHandler::handleCamMsg (const neutrino_msg_t msg, neutrino_msg_data_t snprintf(str, sizeof(str), "%s %d", g_Locale->getText(SlotType == CA_SLOT_TYPE_CI ? LOCALE_CI_INSERTED : LOCALE_SC_INSERTED), (int)curslot+1); printf("CCAMMenuHandler::handleCamMsg: %s\n", str); - ShowHintUTF(LOCALE_MESSAGEBOX_INFO, str); + ShowHint(LOCALE_MESSAGEBOX_INFO, str); #if 0 showHintBox(LOCALE_MESSAGEBOX_INFO, str, CI_MSG_TIME); #endif @@ -261,7 +261,7 @@ int CCAMMenuHandler::handleCamMsg (const neutrino_msg_t msg, neutrino_msg_data_t g_Locale->getText(SlotType == CA_SLOT_TYPE_CI ? LOCALE_CI_REMOVED : LOCALE_SC_REMOVED), (int)curslot+1); printf("CCAMMenuHandler::handleCamMsg: %s\n", str); - ShowHintUTF(LOCALE_MESSAGEBOX_INFO, str); + ShowHint(LOCALE_MESSAGEBOX_INFO, str); #if 0 showHintBox(LOCALE_MESSAGEBOX_INFO, str, CI_MSG_TIME); #endif @@ -279,7 +279,7 @@ int CCAMMenuHandler::handleCamMsg (const neutrino_msg_t msg, neutrino_msg_data_t g_Locale->getText(SlotType == CA_SLOT_TYPE_CI ? LOCALE_CI_INIT_OK : LOCALE_SC_INIT_OK), (int)curslot+1, name); printf("CCAMMenuHandler::handleCamMsg: %s\n", str); CCamManager::getInstance()->Start(CZapit::getInstance()->GetCurrentChannelID(), CCamManager::PLAY, true); - ShowHintUTF(LOCALE_MESSAGEBOX_INFO, str); + ShowHint(LOCALE_MESSAGEBOX_INFO, str); #if 0 showHintBox(LOCALE_MESSAGEBOX_INFO, str, CI_MSG_TIME); #endif @@ -294,7 +294,7 @@ int CCAMMenuHandler::handleCamMsg (const neutrino_msg_t msg, neutrino_msg_data_t g_Locale->getText(SlotType == CA_SLOT_TYPE_CI ? LOCALE_CI_INIT_FAILED : LOCALE_SC_INIT_FAILED), (int)curslot+1, name); printf("CCAMMenuHandler::handleCamMsg: %s\n", str); - ShowHintUTF(LOCALE_MESSAGEBOX_INFO, str); + ShowHint(LOCALE_MESSAGEBOX_INFO, str); #if 0 showHintBox(LOCALE_MESSAGEBOX_INFO, str, CI_MSG_TIME); #endif @@ -371,13 +371,13 @@ int CCAMMenuHandler::handleCamMsg (const neutrino_msg_t msg, neutrino_msg_data_t if(strlen(pMenu->bottom)) slen += snprintf(&lstr[slen], 255-slen, "\n%s", pMenu->bottom); - ShowHintUTF(LOCALE_MESSAGEBOX_INFO, convertDVBUTF8(lstr, slen, 0).c_str()); + ShowHint(LOCALE_MESSAGEBOX_INFO, convertDVBUTF8(lstr, slen, 0).c_str()); #else if(strlen(pMenu->subtitle)) slen += snprintf(&lstr[slen], 255-slen, "\n%s", pMenu->subtitle); if(strlen(pMenu->bottom)) slen += snprintf(&lstr[slen], 255-slen, "\n%s", pMenu->bottom); - ShowHintUTF(convertDVBUTF8(pMenu->title, strlen(pMenu->title), 0).c_str(), convertDVBUTF8(lstr, slen, 0).c_str()); + ShowHint(convertDVBUTF8(pMenu->title, strlen(pMenu->title), 0).c_str(), convertDVBUTF8(lstr, slen, 0).c_str()); #endif #if 0 showHintBox(LOCALE_MESSAGEBOX_INFO, convertDVBUTF8(lstr, slen, 0).c_str()); @@ -463,7 +463,7 @@ int CCAMMenuHandler::doMenu(int slot, CA_SLOT_TYPE slotType) if (msg == CRCInput::RC_timeout) { printf("CCAMMenuHandler::doMenu: menu timeout\n"); hideHintBox(); - ShowHintUTF(LOCALE_MESSAGEBOX_INFO, + ShowHint(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(slotType == CA_SLOT_TYPE_CI ? LOCALE_CI_TIMEOUT : LOCALE_SC_TIMEOUT)); #if 0 showHintBox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_CI_TIMEOUT), 5); diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index 1116d8bde..f90515da1 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -465,7 +465,7 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start if (epgData.title.empty()) /* no epg info found */ { - ShowHintUTF(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_EPGVIEWER_NOTFOUND)); // UTF-8 + ShowHint(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_EPGVIEWER_NOTFOUND)); // UTF-8 hide(); return res; } diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index f55b44f27..ccfea0f2d 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -1078,7 +1078,7 @@ void CInfoViewer::showSubchan () void CInfoViewer::showFailure () { - ShowHintUTF (LOCALE_MESSAGEBOX_ERROR, g_Locale->getText (LOCALE_INFOVIEWER_NOTAVAILABLE), 430); // UTF-8 + ShowHint (LOCALE_MESSAGEBOX_ERROR, g_Locale->getText (LOCALE_INFOVIEWER_NOTAVAILABLE), 430); // UTF-8 } void CInfoViewer::showMotorMoving (int duration) @@ -1087,7 +1087,7 @@ void CInfoViewer::showMotorMoving (int duration) char text[256]; snprintf(text, sizeof(text), "%s (%ds)", g_Locale->getText (LOCALE_INFOVIEWER_MOTOR_MOVING), duration); - ShowHintUTF (LOCALE_MESSAGEBOX_INFO, text, g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth (text, true) + 10, duration); // UTF-8 + ShowHint (LOCALE_MESSAGEBOX_INFO, text, g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth (text, true) + 10, duration); // UTF-8 } void CInfoViewer::killRadiotext() diff --git a/src/gui/scan_setup.cpp b/src/gui/scan_setup.cpp index 1d203d60f..a00bfde8e 100644 --- a/src/gui/scan_setup.cpp +++ b/src/gui/scan_setup.cpp @@ -1553,7 +1553,7 @@ int CTPSelectHandler::exec(CMenuTarget* parent, const std::string &actionkey) if (i == 0) { std::string text = "No transponders found for "; text += name; - ShowHintUTF(LOCALE_MESSAGEBOX_ERROR, text.c_str(), 450, 2); + ShowHint(LOCALE_MESSAGEBOX_ERROR, text.c_str(), 450, 2); return menu_return::RETURN_REPAINT; } diff --git a/src/gui/timerlist.cpp b/src/gui/timerlist.cpp index 146c782b3..d3b42a66f 100644 --- a/src/gui/timerlist.cpp +++ b/src/gui/timerlist.cpp @@ -650,7 +650,7 @@ int CTimerList::show() if (timer->epgID != 0) res = g_EpgData->show(timer->channel_id, timer->epgID, &timer->epg_starttime); else - ShowLocalizedHint(LOCALE_MESSAGEBOX_INFO, LOCALE_EPGVIEWER_NOTFOUND); + ShowHint(LOCALE_MESSAGEBOX_INFO, LOCALE_EPGVIEWER_NOTFOUND); if (res==menu_return::RETURN_EXIT_ALL) loop=false; else diff --git a/src/gui/update.cpp b/src/gui/update.cpp index d6f28f846..4e3ee8b91 100644 --- a/src/gui/update.cpp +++ b/src/gui/update.cpp @@ -332,7 +332,7 @@ printf("[update] mode is %d\n", softupdate_mode); (ShowMsgUTF(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_FLASHUPDATE_WRONGBASE), CMessageBox::mbrYes, CMessageBox::mbYes | CMessageBox::mbNo, NEUTRINO_ICON_UPDATE) != CMessageBox::mbrYes)) { delete versionInfo; - //ShowHintUTF(LOCALE_MESSAGEBOX_ERROR, g_Locale->getText(LOCALE_FLASHUPDATE_WRONGBASE)); // UTF-8 + //ShowHint(LOCALE_MESSAGEBOX_ERROR, g_Locale->getText(LOCALE_FLASHUPDATE_WRONGBASE)); // UTF-8 return false; } @@ -378,7 +378,7 @@ printf("[update] mode is %d\n", softupdate_mode); else { hide(); printf("flash-file not found: %s\n", filename.c_str()); - ShowHintUTF(LOCALE_MESSAGEBOX_ERROR, g_Locale->getText(LOCALE_FLASHUPDATE_CANTOPENFILE)); // UTF-8 + ShowHint(LOCALE_MESSAGEBOX_ERROR, g_Locale->getText(LOCALE_FLASHUPDATE_CANTOPENFILE)); // UTF-8 return false; } hide(); @@ -415,7 +415,7 @@ int CFlashUpdate::exec(CMenuTarget* parent, const std::string &actionKey) paint(); if(sysfs.size() < 8) { - ShowHintUTF(LOCALE_MESSAGEBOX_ERROR, g_Locale->getText(LOCALE_FLASHUPDATE_CANTOPENMTD)); + ShowHint(LOCALE_MESSAGEBOX_ERROR, g_Locale->getText(LOCALE_FLASHUPDATE_CANTOPENMTD)); hide(); return menu_return::RETURN_REPAINT; } @@ -440,7 +440,7 @@ int CFlashUpdate::exec(CMenuTarget* parent, const std::string &actionKey) if(!getUpdateImage(newVersion)) { hide(); - ShowHintUTF(LOCALE_MESSAGEBOX_ERROR, g_Locale->getText(LOCALE_FLASHUPDATE_GETUPDATEFILEERROR)); // UTF-8 + ShowHint(LOCALE_MESSAGEBOX_ERROR, g_Locale->getText(LOCALE_FLASHUPDATE_GETUPDATEFILEERROR)); // UTF-8 return menu_return::RETURN_REPAINT; } sprintf(fullname, "%s/%s", g_settings.update_dir.c_str(), fname); @@ -457,7 +457,7 @@ int CFlashUpdate::exec(CMenuTarget* parent, const std::string &actionKey) showStatusMessageUTF(g_Locale->getText(LOCALE_FLASHUPDATE_MD5CHECK)); // UTF-8 if((softupdate_mode==1) && !ft.check_md5(filename, file_md5)) { hide(); - ShowHintUTF(LOCALE_MESSAGEBOX_ERROR, g_Locale->getText(LOCALE_FLASHUPDATE_MD5SUMERROR)); // UTF-8 + ShowHint(LOCALE_MESSAGEBOX_ERROR, g_Locale->getText(LOCALE_FLASHUPDATE_MD5SUMERROR)); // UTF-8 return menu_return::RETURN_REPAINT; } if(softupdate_mode==1) { //internet-update @@ -491,7 +491,7 @@ int CFlashUpdate::exec(CMenuTarget* parent, const std::string &actionKey) if(!ft.program(filename, 80, 100)) { #endif hide(); - ShowHintUTF(LOCALE_MESSAGEBOX_ERROR, ft.getErrorMessage().c_str()); // UTF-8 + ShowHint(LOCALE_MESSAGEBOX_ERROR, ft.getErrorMessage().c_str()); // UTF-8 return menu_return::RETURN_REPAINT; } @@ -499,7 +499,7 @@ int CFlashUpdate::exec(CMenuTarget* parent, const std::string &actionKey) showGlobalStatus(100); showStatusMessageUTF(g_Locale->getText(LOCALE_FLASHUPDATE_READY)); // UTF-8 hide(); - ShowHintUTF(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_FLASHUPDATE_FLASHREADYREBOOT)); // UTF-8 + ShowHint(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_FLASHUPDATE_FLASHREADYREBOOT)); // UTF-8 sleep(2); ft.reboot(); } @@ -528,7 +528,7 @@ int CFlashUpdate::exec(CMenuTarget* parent, const std::string &actionKey) my_system(3, install_sh, g_settings.update_dir.c_str(), filename.c_str()); #endif showGlobalStatus(100); - ShowHintUTF(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_FLASHUPDATE_READY)); // UTF-8 + ShowHint(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_FLASHUPDATE_READY)); // UTF-8 } hide(); return menu_return::RETURN_REPAINT; @@ -567,7 +567,7 @@ bool CFlashExpert::checkSize(int mtd, std::string &backupFile) std::string path = getPathName(backupFile); if (!file_exists(path.c_str())) { snprintf(errMsg, sizeof(errMsg)-1, g_Locale->getText(LOCALE_FLASHUPDATE_READ_DIRECTORY_NOT_EXIST), path.c_str()); - ShowHintUTF(LOCALE_MESSAGEBOX_ERROR, errMsg); + ShowHint(LOCALE_MESSAGEBOX_ERROR, errMsg); return false; } @@ -578,7 +578,7 @@ bool CFlashExpert::checkSize(int mtd, std::string &backupFile) if (mtd == -1) { // check disk space for image creation if (!get_fs_usage("/", btotal, bused, &bsize)) { snprintf(errMsg, sizeof(errMsg)-1, g_Locale->getText(LOCALE_FLASHUPDATE_READ_VOLUME_ERROR), "root0"); - ShowHintUTF(LOCALE_MESSAGEBOX_ERROR, errMsg); + ShowHint(LOCALE_MESSAGEBOX_ERROR, errMsg); return false; } backupRequiredSize = ((bused * bsize) / 1024ULL) * 2ULL; // twice disk space for summarized image @@ -590,7 +590,7 @@ bool CFlashExpert::checkSize(int mtd, std::string &backupFile) btotal = 0; bused = 0; bsize = 0; if (!get_fs_usage(path.c_str(), btotal, bused, &bsize)) { snprintf(errMsg, sizeof(errMsg)-1, g_Locale->getText(LOCALE_FLASHUPDATE_READ_VOLUME_ERROR), path.c_str()); - ShowHintUTF(LOCALE_MESSAGEBOX_ERROR, errMsg); + ShowHint(LOCALE_MESSAGEBOX_ERROR, errMsg); return false; } uint64_t backupMaxSize = (btotal - bused) * (uint64_t)bsize; @@ -601,7 +601,7 @@ bool CFlashExpert::checkSize(int mtd, std::string &backupFile) if (backupMaxSize < backupRequiredSize) { snprintf(errMsg, sizeof(errMsg)-1, g_Locale->getText(LOCALE_FLASHUPDATE_READ_NO_AVAILABLE_SPACE), path.c_str(), backupMaxSize, backupRequiredSize); - ShowHintUTF(LOCALE_MESSAGEBOX_ERROR, errMsg); + ShowHint(LOCALE_MESSAGEBOX_ERROR, errMsg); return false; } @@ -674,7 +674,7 @@ void CFlashExpert::readmtdJFFS2(std::string &filename) char message[500]; sprintf(message, g_Locale->getText(LOCALE_FLASHUPDATE_SAVESUCCESS), filename.c_str()); - ShowHintUTF(LOCALE_MESSAGEBOX_INFO, message); + ShowHint(LOCALE_MESSAGEBOX_INFO, message); } #endif @@ -746,9 +746,9 @@ void CFlashExpert::readmtd(int preadmtd) hide(); #ifdef BOXMODEL_APOLLO if (!forceOtherFilename) - ShowHintUTF(LOCALE_MESSAGEBOX_INFO, message); + ShowHint(LOCALE_MESSAGEBOX_INFO, message); #else - ShowHintUTF(LOCALE_MESSAGEBOX_INFO, message); + ShowHint(LOCALE_MESSAGEBOX_INFO, message); #endif } } @@ -783,7 +783,7 @@ void CFlashExpert::writemtd(const std::string & filename, int mtdNumber) showStatusMessageUTF(g_Locale->getText(LOCALE_FLASHUPDATE_READY)); // UTF-8 sleep(2); hide(); - ShowHintUTF(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_FLASHUPDATE_FLASHREADYREBOOT)); // UTF-8 + ShowHint(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_FLASHUPDATE_FLASHREADYREBOOT)); // UTF-8 ft.reboot(); } } diff --git a/src/gui/videosettings.cpp b/src/gui/videosettings.cpp index 90a6fe3d3..60a3d8329 100644 --- a/src/gui/videosettings.cpp +++ b/src/gui/videosettings.cpp @@ -496,7 +496,7 @@ void CVideoSettings::next43Mode(void) #ifdef ENABLE_PIP pipDecoder->setAspectRatio(-1, g_settings.video_43mode); #endif - ShowHintUTF(LOCALE_VIDEOMENU_43MODE, g_Locale->getText(text), 450, 2); + ShowHint(LOCALE_VIDEOMENU_43MODE, g_Locale->getText(text), 450, 2); } void CVideoSettings::SwitchFormat() @@ -522,7 +522,7 @@ void CVideoSettings::SwitchFormat() #ifdef ENABLE_PIP pipDecoder->setAspectRatio(g_settings.video_Format, -1); #endif - ShowHintUTF(LOCALE_VIDEOMENU_VIDEOFORMAT, g_Locale->getText(text), 450, 2); + ShowHint(LOCALE_VIDEOMENU_VIDEOFORMAT, g_Locale->getText(text), 450, 2); } void CVideoSettings::nextMode(void) @@ -543,7 +543,7 @@ void CVideoSettings::nextMode(void) while(1) { CVFD::getInstance()->ShowText(text); - int res = ShowHintUTF(LOCALE_VIDEOMENU_VIDEOMODE, text, 450, 2); + int res = ShowHint(LOCALE_VIDEOMENU_VIDEOMODE, text, 450, 2); if(disp_cur && res != messages_return::handled) break; @@ -578,7 +578,7 @@ void CVideoSettings::nextMode(void) break; } CVFD::getInstance()->showServicename(g_RemoteControl->getCurrentChannelName()); - //ShowHintUTF(LOCALE_VIDEOMENU_VIDEOMODE, text, 450, 2); + //ShowHint(LOCALE_VIDEOMENU_VIDEOMODE, text, 450, 2); } //sets menu mode to "wizard" or "default" diff --git a/src/gui/widget/hintbox.cpp b/src/gui/widget/hintbox.cpp index 3c9828678..314b0519a 100644 --- a/src/gui/widget/hintbox.cpp +++ b/src/gui/widget/hintbox.cpp @@ -3,14 +3,7 @@ Copyright (C) 2001 Steffen Hehn 'McClean' Homepage: http://dbox.cyberphoria.org/ - - Kommentar: - - Diese GUI wurde von Grund auf neu programmiert und sollte nun vom - Aufbau und auch den Ausbaumoeglichkeiten gut aussehen. Neutrino basiert - auf der Client-Server Idee, diese GUI ist also von der direkten DBox- - Steuerung getrennt. Diese wird dann von Daemons uebernommen. - + Copyright (C) 2008-2009, 2011, 2013 Stefan Seyfried License: GPL @@ -25,8 +18,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program. If not, see . */ @@ -177,7 +169,7 @@ void CHintBox::refresh(void) //window->paintBoxRel(borderwidth, height, width, borderwidth, COL_INFOBAR_SHADOW_PLUS_0); //window->paintBoxRel(width, borderwidth, borderwidth, height - borderwidth, COL_INFOBAR_SHADOW_PLUS_0); - window->paintBoxRel(width-20, borderwidth, borderwidth+20, height - borderwidth, COL_INFOBAR_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_TOP); // right + window->paintBoxRel(width - 20, borderwidth, borderwidth + 20, height - borderwidth - 20, COL_INFOBAR_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_TOP); // right window->paintBoxRel(borderwidth, height-20, width, borderwidth+20, COL_INFOBAR_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM); // bottom //window->paintBoxRel(0, 0, width, theight, (CFBWindow::color_t)COL_MENUHEAD_PLUS_0); @@ -245,14 +237,14 @@ void CHintBox::hide(void) } } -int ShowHintUTF(const neutrino_locale_t Caption, const char * const Text, const int Width, int timeout, const char * const Icon) +int ShowHint(const neutrino_locale_t Caption, const char * const Text, const int Width, int timeout, const char * const Icon) { const char * caption = g_Locale->getText(Caption); - return ShowHintUTF(caption, Text, Width, timeout, Icon); + return ShowHint(caption, Text, Width, timeout, Icon); } -int ShowHintUTF(const char * const Caption, const char * const Text, const int Width, int timeout, const char * const Icon) +int ShowHint(const char * const Caption, const char * const Text, const int Width, int timeout, const char * const Icon) { neutrino_msg_t msg; neutrino_msg_data_t data; @@ -315,8 +307,13 @@ int ShowHintUTF(const char * const Caption, const char * const Text, const int W return res; } -int ShowLocalizedHint(const neutrino_locale_t Caption, const neutrino_locale_t Text, const int Width, int timeout, const char * const Icon) +int ShowHint(const neutrino_locale_t Caption, const neutrino_locale_t Text, const int Width, int timeout, const char * const Icon) { - return ShowHintUTF(Caption, g_Locale->getText(Text),Width,timeout,Icon); + return ShowHint(Caption, g_Locale->getText(Text),Width,timeout,Icon); +} + +int ShowHint(const char * const Caption, const neutrino_locale_t Text, const int Width, int timeout, const char * const Icon) +{ + return ShowHint(Caption, g_Locale->getText(Text),Width,timeout,Icon); } diff --git a/src/gui/widget/hintbox.h b/src/gui/widget/hintbox.h index 7e7a5f36b..d58761c7d 100644 --- a/src/gui/widget/hintbox.h +++ b/src/gui/widget/hintbox.h @@ -77,9 +77,10 @@ class CHintBox }; // Text is UTF-8 encoded -int ShowHintUTF(const neutrino_locale_t Caption, const char * const Text, const int Width = 450, int timeout = -1, const char * const Icon = NEUTRINO_ICON_INFO); -int ShowHintUTF(const char * const Caption, const char * const Text, const int Width = 450, int timeout = -1, const char * const Icon = NEUTRINO_ICON_INFO); -int ShowLocalizedHint(const neutrino_locale_t Caption, const neutrino_locale_t Text, const int Width = 450, int timeout = -1, const char * const Icon = NEUTRINO_ICON_INFO); +int ShowHint(const neutrino_locale_t Caption, const char * const Text, const int Width = 450, int timeout = -1, const char * const Icon = NEUTRINO_ICON_INFO); +int ShowHint(const neutrino_locale_t Caption, const neutrino_locale_t Text, const int Width = 450, int timeout = -1, const char * const Icon = NEUTRINO_ICON_INFO); +int ShowHint(const char * const Caption, const char * const Text, const int Width = 450, int timeout = -1, const char * const Icon = NEUTRINO_ICON_INFO); +int ShowHint(const char * const Caption, const neutrino_locale_t Text, const int Width = 450, int timeout = -1, const char * const Icon = NEUTRINO_ICON_INFO); #endif diff --git a/src/neutrino.cpp b/src/neutrino.cpp index ced01ca64..f58b548ae 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -1968,7 +1968,7 @@ TIMER_START(); if(loadSettingsErg) { hintBox->hide(); dprintf(DEBUG_INFO, "config file or options missing\n"); - ShowHintUTF(LOCALE_MESSAGEBOX_INFO, loadSettingsErg == 1 ? g_Locale->getText(LOCALE_SETTINGS_NOCONFFILE) + ShowHint(LOCALE_MESSAGEBOX_INFO, loadSettingsErg == 1 ? g_Locale->getText(LOCALE_SETTINGS_NOCONFFILE) : g_Locale->getText(LOCALE_SETTINGS_MISSINGOPTIONSCONFFILE)); configfile.setModifiedFlag(true); saveSetup(NEUTRINO_SETTINGS_FILE); @@ -2255,8 +2255,8 @@ void CNeutrinoApp::RealRun(CMenuWidget &mainMenu) usermenu.showUserMenu(SNeutrinoSettings::BUTTON_RED); StartSubtitles(); } - else - ShowHintUTF(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_PERSONALIZE_MENUDISABLEDHINT),450, 10); + else + ShowHint(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_PERSONALIZE_MENUDISABLEDHINT),450, 10); } else if ((msg == CRCInput::RC_audio) && !g_settings.audio_run_player) { @@ -2273,7 +2273,7 @@ void CNeutrinoApp::RealRun(CMenuWidget &mainMenu) StartSubtitles(); } else - ShowHintUTF(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_PERSONALIZE_MENUDISABLEDHINT),450, 10); + ShowHint(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_PERSONALIZE_MENUDISABLEDHINT),450, 10); } else if( msg == CRCInput::RC_yellow ) { // NVODs if (g_settings.personalize[SNeutrinoSettings::P_MAIN_YELLOW_BUTTON] == CPersonalizeGui::PERSONALIZE_ACTIVE_MODE_ENABLED) @@ -2283,7 +2283,7 @@ void CNeutrinoApp::RealRun(CMenuWidget &mainMenu) StartSubtitles(); } else - ShowHintUTF(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_PERSONALIZE_MENUDISABLEDHINT),450, 10); + ShowHint(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_PERSONALIZE_MENUDISABLEDHINT),450, 10); } else if( (msg == CRCInput::RC_green) || ((msg == CRCInput::RC_audio) && !g_settings.audio_run_player) ) { @@ -2303,8 +2303,8 @@ void CNeutrinoApp::RealRun(CMenuWidget &mainMenu) usermenu.showUserMenu(SNeutrinoSettings::BUTTON_BLUE); StartSubtitles(); } - else - ShowHintUTF(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_PERSONALIZE_MENUDISABLEDHINT), 450, 10); + else + ShowHint(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_PERSONALIZE_MENUDISABLEDHINT), 450, 10); } else if( (msg == CRCInput::RC_audio) && g_settings.audio_run_player) { //open mediaplayer menu in audio mode, user can select between audioplayer and internetradio @@ -2478,7 +2478,7 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data) scrambled_timer = 0; if(g_settings.scrambled_message && videoDecoder->getBlank() && videoDecoder->getPlayState()) { const char * text = g_Locale->getText(LOCALE_SCRAMBLED_CHANNEL); - ShowHintUTF (LOCALE_MESSAGEBOX_INFO, text, g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth (text, true) + 10, 5); + ShowHint (LOCALE_MESSAGEBOX_INFO, text, g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth (text, true) + 10, 5); } return messages_return::handled; } @@ -2811,7 +2811,7 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data) CTimerd::RecordingInfo * eventinfo = (CTimerd::RecordingInfo *) data; std::string name = g_Locale->getText(LOCALE_ZAPTOTIMER_ANNOUNCE); getAnnounceEpgName( eventinfo, name); - ShowHintUTF( LOCALE_MESSAGEBOX_INFO, name.c_str() ); + ShowHint( LOCALE_MESSAGEBOX_INFO, name.c_str() ); } delete [] (unsigned char*) data; return messages_return::handled; @@ -2847,7 +2847,7 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data) if(( mode != mode_scart ) && ( mode != mode_standby ) && g_settings.recording_startstop_msg) { std::string name = g_Locale->getText(LOCALE_RECORDTIMER_ANNOUNCE); getAnnounceEpgName(eventinfo, name); - ShowHintUTF(LOCALE_MESSAGEBOX_INFO, name.c_str()); + ShowHint(LOCALE_MESSAGEBOX_INFO, name.c_str()); } delete[] (unsigned char*) data; return messages_return::handled; @@ -2938,7 +2938,7 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data) } if (msg == NeutrinoMessages::EVT_POPUP) - ShowHintUTF(LOCALE_MESSAGEBOX_INFO, text.c_str(), 0, atoi(timeout.c_str())); + ShowHint(LOCALE_MESSAGEBOX_INFO, text.c_str(), 0, atoi(timeout.c_str())); else if (msg == NeutrinoMessages::EVT_EXTMSG) ShowMsgUTF(LOCALE_MESSAGEBOX_INFO, text, CMessageBox::mbrBack, CMessageBox::mbBack, NEUTRINO_ICON_INFO, 0, atoi(timeout.c_str())); @@ -3032,7 +3032,7 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data) g_RCInput->postMsg(NeutrinoMessages::SHOW_INFOBAR , 0); } return messages_return::handled; -// ShowHintUTF(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_EXTRA_ZAPIT_SDT_CHANGED), +// ShowHint(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_EXTRA_ZAPIT_SDT_CHANGED), // CMessageBox::mbrBack,CMessageBox::mbBack, NEUTRINO_ICON_INFO); } if ((msg >= CRCInput::RC_WithData) && (msg < CRCInput::RC_WithData + 0x10000000))