[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdegames/kspaceduel
From: Andreas Zehender <az () azweb ! de>
Date: 2003-12-29 18:32:09
[Download RAW message or body]
CVS commit by azehende:
Fix bug #71135
Disable player actions so key press events are not suppressed after shortcut configuration
CCMAIL: 71135-done@bugs.kde.org
M +33 -21 topwidget.cpp 1.29
--- kdegames/kspaceduel/topwidget.cpp #1.28:1.29
@@ -85,25 +85,37 @@ void MyTopLevelWidget::initActions( )
// Default keys
actionCollection()->setAutoConnectShortcuts(false);
- (void)new KAction(i18n("Player 1 Rotate Left"), Key_S, 0, 0,
+ KAction* ac;
+ ac = new KAction(i18n("Player 1 Rotate Left"), Key_S, 0, 0,
actionCollection(), "P1KeyLeft");
- (void)new KAction(i18n("Player 1 Rotate Right"), Key_F, 0, 0,
+ ac->setEnabled( false );
+ ac = new KAction(i18n("Player 1 Rotate Right"), Key_F, 0, 0,
actionCollection(), "P1KeyRight");
- (void)new KAction(i18n("Player 1 Accelerate"), Key_E, 0, 0,
+ ac->setEnabled( false );
+ ac = new KAction(i18n("Player 1 Accelerate"), Key_E, 0, 0,
actionCollection(), "P1KeyAcc");
- (void)new KAction(i18n("Player 1 Shot"), Key_D, 0, 0,
+ ac->setEnabled( false );
+ ac = new KAction(i18n("Player 1 Shot"), Key_D, 0, 0,
actionCollection(), "P1Shot");
- (void)new KAction(i18n("Player 1 Mine"), Key_A, 0, 0,
+ ac->setEnabled( false );
+ ac = new KAction(i18n("Player 1 Mine"), Key_A, 0, 0,
actionCollection(), "P1Mine");
+ ac->setEnabled( false );
- (void)new KAction(i18n("Player 2 Rotate Left"), Key_Left, 0, 0,
+ ac = new KAction(i18n("Player 2 Rotate Left"), Key_Left, 0, 0,
actionCollection(), "P2KeyLeft");
- (void)new KAction(i18n("Player 2 Rotate Right"), Key_Right, 0, 0,
+ ac->setEnabled( false );
+ ac = new KAction(i18n("Player 2 Rotate Right"), Key_Right, 0, 0,
actionCollection(), "P2KeyRight");
- (void)new KAction(i18n("Player 2 Accelerate"), Key_Up, 0, 0,
+ ac->setEnabled( false );
+ ac = new KAction(i18n("Player 2 Accelerate"), Key_Up, 0, 0,
actionCollection(), "P2KeyAcc");
- (void)new KAction(i18n("Player 2 Shot"), Key_Down, 0, 0,
+ ac->setEnabled( false );
+ ac = new KAction(i18n("Player 2 Shot"), Key_Down, 0, 0,
actionCollection(), "P2Shot");
- (void)new KAction(i18n("Player 2 Mine"), Key_Insert, 0, 0,
+ ac->setEnabled( false );
+ ac = new KAction(i18n("Player 2 Mine"), Key_Insert, 0, 0,
actionCollection(), "P2Mine");
+ ac->setEnabled( false );
+
actionCollection()->setAutoConnectShortcuts(true);
playfield->setActionCollection(actionCollection());
@@ -134,5 +146,5 @@ void MyTopLevelWidget::keySetup()
{
playfield->pause();
- KKeyDialog::configure( actionCollection( ), this, false );
+ KKeyDialog::configure( actionCollection( ), this, true );
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic