CMsgBox: rework msgbox classes with Window class implementation

Replacing messagebox, hintbox_ext and some derivated parts with
basic class hintbox and derivated class CMsgBox. This should unify
window handling and avoids maintain of multiple classes with quasi
same purpose and adds more functionality.

TODO: fix and optimize details
This commit is contained in:
2016-04-04 21:57:17 +02:00
parent b8cf8167f4
commit dde298b1b7
81 changed files with 1981 additions and 1697 deletions

View File

@@ -43,7 +43,7 @@
#include <gui/movieplayer.h>
#include <gui/nfs.h>
#include <gui/widget/hintbox.h>
#include <gui/widget/messagebox.h>
#include <gui/widget/msgbox.h>
#include <gui/widget/mountchooser.h>
#include <daemonc/remotecontrol.h>
#include <system/setting_helpers.h>
@@ -1385,7 +1385,7 @@ int CRecordManager::exec(CMenuTarget* parent, const std::string & actionKey )
snprintf(rec_msg1, sizeof(rec_msg1)-1, "%s", g_Locale->getText(LOCALE_RECORDINGMENU_MULTIMENU_ASK_STOP_ALL));
snprintf(rec_msg, sizeof(rec_msg)-1, rec_msg1, records);
if(ShowMsg(LOCALE_SHUTDOWN_RECORDING_QUERY, rec_msg,
CMessageBox::mbrYes, CMessageBox::mbYes | CMessageBox::mbNo, NULL, 450, 30, false) == CMessageBox::mbrYes)
CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbNo, NULL, 450, 30) == CMsgBox::mbrYes)
{
snprintf(rec_msg1, sizeof(rec_msg1)-1, "%s", g_Locale->getText(LOCALE_RECORDINGMENU_MULTIMENU_INFO_STOP_ALL));
@@ -1418,7 +1418,7 @@ int CRecordManager::exec(CMenuTarget* parent, const std::string & actionKey )
inst->GetRecordString(title, duration);
title += duration;
tostart = (ShowMsg(LOCALE_RECORDING_IS_RUNNING, title.c_str(),
CMessageBox::mbrYes, CMessageBox::mbYes | CMessageBox::mbNo, NULL, 450, 30, false) == CMessageBox::mbrYes);
CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbNo, NULL, 450, 30) == CMsgBox::mbrYes);
}
if (tostart) {
CRecordManager::getInstance()->Record(live_channel_id);
@@ -1565,7 +1565,7 @@ bool CRecordManager::AskToStop(const t_channel_id channel_id, const int recid)
return false;
if(ShowMsg(LOCALE_SHUTDOWN_RECORDING_QUERY, title.c_str(),
CMessageBox::mbrYes, CMessageBox::mbYes | CMessageBox::mbNo, NULL, 450, 30, false) == CMessageBox::mbrYes) {
CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbNo, NULL, 450, 30) == CMsgBox::mbrYes) {
mutex.lock();
if (recid)
inst = FindInstanceID(recid);
@@ -1858,7 +1858,7 @@ bool CRecordManager::MountDirectory(const char *recordingDir)
strcat(msg,recordingDir);
ShowMsg(LOCALE_MESSAGEBOX_ERROR, msg,
CMessageBox::mbrBack, CMessageBox::mbBack,NEUTRINO_ICON_ERROR, 450, 10); // UTF-8
CMsgBox::mbrBack, CMsgBox::mbBack,NEUTRINO_ICON_ERROR, 450, 10); // UTF-8
ret = false;
}
break;