mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 08:21:07 +02:00
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
Origin commit data
------------------
Commit: dde298b1b7
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-04-04 (Mon, 04 Apr 2016)
This commit is contained in:
@@ -170,7 +170,7 @@
|
||||
#include <driver/screen_max.h>
|
||||
#include <daemonc/remotecontrol.h>
|
||||
#include <gui/widget/helpbox.h>
|
||||
#include "widget/messagebox.h"
|
||||
#include "widget/msgbox.h"
|
||||
#include "widget/hintbox.h"
|
||||
#include "widget/keychooser.h"
|
||||
#include "color.h"
|
||||
@@ -734,13 +734,15 @@ bool CPersonalizeGui::changeNotify(const neutrino_locale_t locale, void *data)
|
||||
//shows a short help message
|
||||
void CPersonalizeGui::ShowHelpPersonalize()
|
||||
{
|
||||
Helpbox helpbox;
|
||||
Helpbox helpbox(g_Locale->getText(LOCALE_PERSONALIZE_HELP));
|
||||
|
||||
for (int i = (int)LOCALE_PERSONALIZE_HELP_LINE1; i<= (int)LOCALE_PERSONALIZE_HELP_LINE8; i++)
|
||||
helpbox.addLine(g_Locale->getText((neutrino_locale_t)i));
|
||||
helpbox.addLine(g_Locale->getText((neutrino_locale_t)i), CTextBox::CENTER);
|
||||
|
||||
|
||||
helpbox.show(LOCALE_PERSONALIZE_HELP);
|
||||
helpbox.addExitKey(CRCInput::RC_ok);
|
||||
helpbox.show();
|
||||
helpbox.exec();
|
||||
helpbox.hide();
|
||||
}
|
||||
|
||||
void CPersonalizeGui::ApplySettings()
|
||||
@@ -763,7 +765,7 @@ void CPersonalizeGui::SaveAndExit()
|
||||
ApplySettings();
|
||||
return;
|
||||
}
|
||||
if (ShowMsg(LOCALE_PERSONALIZE_HEAD, g_Locale->getText(LOCALE_PERSONALIZE_APPLY_SETTINGS), CMessageBox::mbrYes, CMessageBox::mbYes | CMessageBox::mbNo, NEUTRINO_ICON_QUESTION) == CMessageBox::mbrYes)
|
||||
if (ShowMsg(LOCALE_PERSONALIZE_HEAD, g_Locale->getText(LOCALE_PERSONALIZE_APPLY_SETTINGS), CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbNo, NEUTRINO_ICON_QUESTION) == CMsgBox::mbrYes)
|
||||
{
|
||||
CHintBox hintBox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_MAINSETTINGS_SAVESETTINGSNOW_HINT)); // UTF-8
|
||||
hintBox.paint();
|
||||
@@ -772,7 +774,7 @@ void CPersonalizeGui::SaveAndExit()
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ShowMsg(LOCALE_PERSONALIZE_HEAD, g_Locale->getText(LOCALE_MESSAGEBOX_DISCARD), CMessageBox::mbrNo, CMessageBox::mbYes | CMessageBox::mbNo, NEUTRINO_ICON_QUESTION) == CMessageBox::mbrYes)
|
||||
if (ShowMsg(LOCALE_PERSONALIZE_HEAD, g_Locale->getText(LOCALE_MESSAGEBOX_DISCARD), CMsgBox::mbrNo, CMsgBox::mbYes | CMsgBox::mbNo, NEUTRINO_ICON_QUESTION) == CMsgBox::mbrYes)
|
||||
exec(NULL, "restore");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user