mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 07:23:09 +02:00
widget/msgbox: add overloaded version of setButtonText()
Allows usage of locale as parameter.
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
Günther@tuxbox.berlios.org
|
Günther@tuxbox.berlios.org
|
||||||
|
|
||||||
Implementation of CComponent Window class.
|
Implementation of CComponent Window class.
|
||||||
Copyright (C) 2014-2017 Thilo Graf 'dbt'
|
Copyright (C) 2014-2017, 2023 Thilo Graf 'dbt'
|
||||||
|
|
||||||
License: GPL
|
License: GPL
|
||||||
|
|
||||||
@@ -419,6 +419,11 @@ void CMsgBox::setButtonText(const int& showed_button, const std::string& text)
|
|||||||
initButtons();
|
initButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CMsgBox::setButtonText(const int &showed_button, const neutrino_locale_t &Locale)
|
||||||
|
{
|
||||||
|
setButtonText(showed_button, g_Locale->getText(Locale));
|
||||||
|
}
|
||||||
|
|
||||||
inline std::string CMsgBox::BTN_TEXT(const int& showed_button)
|
inline std::string CMsgBox::BTN_TEXT(const int& showed_button)
|
||||||
{
|
{
|
||||||
string ret = "";
|
string ret = "";
|
||||||
|
@@ -328,7 +328,19 @@ class CMsgBox : public CHintBox
|
|||||||
* @param[in] text
|
* @param[in] text
|
||||||
* @li expects type std::string, sets the new text for button
|
* @li expects type std::string, sets the new text for button
|
||||||
*/
|
*/
|
||||||
void setButtonText(const int& showed_button, const std::string& text);
|
void setButtonText(const int &showed_button, const std::string &text);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default defined button text is already predefiend with parameter 'ShowButtons' from constructor.
|
||||||
|
* This member allows to define an alternate text for an already defined button,
|
||||||
|
* Result values are not touched!
|
||||||
|
* @param[in] showed_button
|
||||||
|
* @li expects type int
|
||||||
|
* @see setShowedButtons()
|
||||||
|
* @param[in] text
|
||||||
|
* @li expects type neutrino_locale_t, sets the new text for button
|
||||||
|
*/
|
||||||
|
void setButtonText(const int &showed_button, const neutrino_locale_t &Locale);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* enables background of buttons
|
* enables background of buttons
|
||||||
|
Reference in New Issue
Block a user