From 7272851afd9e3a8fcdb531900a8e5c43af417a4b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 18 Aug 2014 21:52:57 +0300 Subject: Add parameter for button name in okdialog. --- src/gui/widgets/tabs/setup_input.cpp | 5 ++++- src/gui/widgets/tabs/setup_theme.cpp | 10 ++++++++-- src/gui/widgets/tabs/setup_video.cpp | 23 +++++++++++++++++++---- 3 files changed, 31 insertions(+), 7 deletions(-) (limited to 'src/gui/widgets/tabs') diff --git a/src/gui/widgets/tabs/setup_input.cpp b/src/gui/widgets/tabs/setup_input.cpp index 50bdf96ec..b6e245c2b 100644 --- a/src/gui/widgets/tabs/setup_input.cpp +++ b/src/gui/widgets/tabs/setup_input.cpp @@ -150,7 +150,10 @@ void Setup_Input::apply() // TRANSLATORS: input settings error strprintf(_("Conflict \"%s\" and \"%s\" keys. " "Resolve them, or gameplay may result in strange behaviour."), - gettext(str1.c_str()), gettext(str2.c_str())), DialogType::ERROR, + gettext(str1.c_str()), gettext(str2.c_str())), + // TRANSLATORS: ok dialog button + _("OK"), + DialogType::ERROR, true, true, nullptr, 260); } keyboard.setEnabled(true); diff --git a/src/gui/widgets/tabs/setup_theme.cpp b/src/gui/widgets/tabs/setup_theme.cpp index b719537f7..c74a8bade 100644 --- a/src/gui/widgets/tabs/setup_theme.cpp +++ b/src/gui/widgets/tabs/setup_theme.cpp @@ -306,7 +306,10 @@ void Setup_Theme::action(const ActionEvent &event) else if (eventId == ACTION_INFO) { // TRANSLATORS: theme info dialog header - new OkDialog(_("Theme info"), mThemeInfo, DialogType::OK, + new OkDialog(_("Theme info"), mThemeInfo, + // TRANSLATORS: ok dialog button + _("OK"), + DialogType::OK, false, true, nullptr, 600); } } @@ -334,7 +337,10 @@ void Setup_Theme::apply() { // TRANSLATORS: theme message dialog new OkDialog(_("Theme Changed"), _("Restart your client for " - "the change to take effect."), DialogType::OK, + "the change to take effect."), + // TRANSLATORS: ok dialog button + _("OK"), + DialogType::OK, true, true, nullptr, 260); } diff --git a/src/gui/widgets/tabs/setup_video.cpp b/src/gui/widgets/tabs/setup_video.cpp index 116541d2d..41cf19a7f 100644 --- a/src/gui/widgets/tabs/setup_video.cpp +++ b/src/gui/widgets/tabs/setup_video.cpp @@ -242,7 +242,11 @@ void Setup_Video::apply() // TRANSLATORS: video settings warning new OkDialog(_("Switching to Full Screen"), // TRANSLATORS: video settings warning - _("Restart needed for changes to take effect.")); + _("Restart needed for changes to take effect."), + // TRANSLATORS: ok dialog button + _("OK"), + DialogType::OK, + true, true, nullptr, 260); } #endif config.setValue("screen", fullscreen); @@ -263,7 +267,10 @@ void Setup_Video::apply() new OkDialog(_("Changing to OpenGL"), // TRANSLATORS: video settings warning _("Applying change to OpenGL requires restart."), - DialogType::OK, true, true, nullptr, 260); + // TRANSLATORS: ok dialog button + _("OK"), + DialogType::OK, + true, true, nullptr, 260); } mFps = mFpsCheckBox->isSelected() ? @@ -374,7 +381,11 @@ void Setup_Video::action(const ActionEvent &event) // TRANSLATORS: video settings warning _("Restart your client for the change to take effect.") + std::string("\n") + _("Some windows may be moved to " - "fit the lowered resolution.")); + "fit the lowered resolution."), + // TRANSLATORS: ok dialog button + _("OK"), + DialogType::OK, + true, true, nullptr, 260); } else { @@ -382,7 +393,11 @@ void Setup_Video::action(const ActionEvent &event) new OkDialog(_("Screen Resolution Changed"), // TRANSLATORS: video settings warning _("Restart your client for the change" - " to take effect.")); + " to take effect."), + // TRANSLATORS: ok dialog button + _("OK"), + DialogType::OK, + true, true, nullptr, 260); } } #else -- cgit v1.2.3-70-g09d2