mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-26 15:02:56 +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
|
||||
|
||||
Implementation of CComponent Window class.
|
||||
Copyright (C) 2014-2017 Thilo Graf 'dbt'
|
||||
Copyright (C) 2014-2017, 2023 Thilo Graf 'dbt'
|
||||
|
||||
License: GPL
|
||||
|
||||
@@ -419,6 +419,11 @@ void CMsgBox::setButtonText(const int& showed_button, const std::string& text)
|
||||
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)
|
||||
{
|
||||
string ret = "";
|
||||
|
@@ -328,7 +328,19 @@ class CMsgBox : public CHintBox
|
||||
* @param[in] text
|
||||
* @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
|
||||
|
Reference in New Issue
Block a user