[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: =?utf-8?q?=5Bknights=5D_src=3A_Don=27t_pause_the_game_after_undo?=
From: Miha Čančula <miha.cancula () gmail ! com>
Date: 2011-01-30 9:19:53
Message-ID: 20110130091953.57D24A6094 () git ! kde ! org
[Download RAW message or body]
Git commit 8cb8a62d3bba77bb57996e29d0686d6840e2c9b0 by Miha Čančula.
Pushed by mihac into branch 'master'.
Don't pause the game after undo or redo.
M +2 -23 src/knights.cpp
M +0 -2 src/knights.h
http://commits.kde.org/knights/8cb8a62d3bba77bb57996e29d0686d6840e2c9b0
diff --git a/src/knights.cpp b/src/knights.cpp
index 8eaebc4..d090883 100644
--- a/src/knights.cpp
+++ b/src/knights.cpp
@@ -96,11 +96,11 @@ namespace Knights
resignAction->setHelpText(i18n("Admit your inevitable defeat"));
resignAction->setIcon(KIcon(QLatin1String("flag-red")));
- KAction* undoAction = KStandardAction::undo( this, SLOT(undo()), \
actionCollection() ); + KAction* undoAction = KStandardAction::undo( \
Manager::self(), SLOT(undo()), actionCollection() ); undoAction->setEnabled(false);
connect ( Manager::self(), SIGNAL(undoPossible(bool)), undoAction, \
SLOT(setEnabled(bool)) );
- KAction* redoAction = KStandardAction::redo( this, SLOT(redo()), \
actionCollection() ); + KAction* redoAction = KStandardAction::redo( \
Manager::self(), SLOT(redo()), actionCollection() ); redoAction->setEnabled(false);
connect ( Manager::self(), SIGNAL(redoPossible(bool)), redoAction, \
SLOT(setEnabled(bool)) ); }
@@ -132,27 +132,6 @@ namespace Knights
}
}
- void MainWindow::undo()
- {
- QAction* pauseAction = \
actionCollection()->action(QLatin1String(KStandardGameAction::name(KStandardGameAction::Pause)));
- if ( pauseAction && !pauseAction->isChecked() )
- {
- pauseAction->trigger();
- }
- Manager::self()->undo();
- }
-
- void MainWindow::redo()
- {
- QAction* pauseAction = \
actionCollection()->action(QLatin1String(KStandardGameAction::name(KStandardGameAction::Pause)));
-
- if ( pauseAction && !pauseAction->isChecked() )
- {
- pauseAction->trigger();
- }
- Manager::self()->redo();
- }
-
void MainWindow::showFicsDialog(Color color, bool computer)
{
if ( computer || true) // TODO: Implement, and remove this check
diff --git a/src/knights.h b/src/knights.h
index a168ac0..dc0d9c2 100644
--- a/src/knights.h
+++ b/src/knights.h
@@ -52,8 +52,6 @@ namespace Knights
private Q_SLOTS:
void fileNew();
void pauseGame ( bool pause );
- void undo();
- void redo();
void optionsPreferences();
void protocolInitSuccesful();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic