diff --git a/src/gui/widget/msgbox.cpp b/src/gui/widget/msgbox.cpp index 99c858c93..4f699096f 100644 --- a/src/gui/widget/msgbox.cpp +++ b/src/gui/widget/msgbox.cpp @@ -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 = ""; diff --git a/src/gui/widget/msgbox.h b/src/gui/widget/msgbox.h index 0134323c5..744dab14b 100644 --- a/src/gui/widget/msgbox.h +++ b/src/gui/widget/msgbox.h @@ -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