[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [picmi] src/gui: Tweak congratulations dialog
From: Jakob Gruber <jakob.gruber () gmail ! com>
Date: 2016-01-26 13:26:45
Message-ID: E1aO3dt-00026g-QZ () scm ! kde ! org
[Download RAW message or body]
Git commit 02e330a3fde921c40b651222e709ff2b3ce1ab2a by Jakob Gruber.
Committed on 26/01/2016 at 13:27.
Pushed by gruber into branch 'master'.
Tweak congratulations dialog
This commit fixes two separate issues:
Caption and text arguments were swapped, resulting in a tiny box with
short text and long (but invisible) caption.
Completing a named board now displays the board's name within the
completion dialog.
BUG: 358394
M +10 -7 src/gui/mainwindow.cpp
http://commits.kde.org/picmi/02e330a3fde921c40b651222e709ff2b3ce1ab2a
diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp
index 0b85843..6797ff4 100644
--- a/src/gui/mainwindow.cpp
+++ b/src/gui/mainwindow.cpp
@@ -277,9 +277,9 @@ QSharedPointer<KScoreDialog> MainWindow::createScoreDialog() {
void MainWindow::gameWon() {
KScoreDialog::FieldInfo score = m_game->endGame();
- bool notified = false;
m_status_position->setVisible(false);
if (m_mode == Random) {
+ bool notified = false;
m_new_game->setVisible(true);
if (Kg::difficultyLevel() != KgDifficultyLevel::Custom) {
QSharedPointer<KScoreDialog> scoreDialog = createScoreDialog();
@@ -288,15 +288,18 @@ void MainWindow::gameWon() {
notified = true;
}
}
+
+ /* Ensure that the user gets some kind of feedback about solving the board. */
+ if (!notified) {
+ KMessageBox::information(this, i18n("Congratulations, you've solved this board!"),
+ i18n("Board Solved!"));
+ }
} else if (m_mode == Preset) {
m_load_game->setVisible(true);
m_current_level->setSolved(m_game->elapsedSecs());
- }
-
- /* Ensure that the user gets some kind of feedback about solving the board. */
- if (!notified) {
- KMessageBox::information(this, i18n("Board Solved!"),
- i18n("Congratulations, you've solved this board!"));
+ KMessageBox::information(this, i18n("Congratulations, you've solved board '%1'!",
+ m_current_level->name()),
+ i18n("Board Solved!"));
}
m_view.setFocus();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic