Bug 53119 - pressing pause button before starting game cause bad pause button behaviour
Summary: pressing pause button before starting game cause bad pause button behaviour
Status: RESOLVED FIXED
Alias: None
Product: kbounce
Classification: Applications
Component: general (show other bugs)
Version: 0.5
Platform: Mandrake RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: schimmi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-17 21:02 UTC by Albert Astals Cid
Modified: 2003-01-24 23:23 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Corrects the bug 53119 (386 bytes, patch)
2003-01-19 15:47 UTC, Albert Astals Cid
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Albert Astals Cid 2003-01-17 21:02:13 UTC
Version:           0.5 (using KDE KDE 3.0.5)
Installed from:    Mandrake RPMs
Compiler:          gcc 3.2 Mandrake Linux 9.0 gcc 3.2-1
OS:          Linux

If you click on the pause button before starting a game, when you start the game, the button is already pushed (activated), if you deactivate it (i mean, you turn it to it's non pushed state) the game pauses.

I know it is a very minor bug, but the pause button should changed to not activated when a user clicks on the start button.

The same happens with the pause menu item.
Comment 1 Albert Astals Cid 2003-01-19 15:47:20 UTC
Created attachment 783 [details]
Corrects the bug 53119

In this .tar.bz2 i include the two diffs i have made to kbounce.h and
kbounce.cpp to correct the bug 53119
Comment 2 Andreas Beckermann 2003-01-24 23:23:21 UTC
Subject: kdegames/kbounce

CVS commit by andreas: 

- patch by Albert Astals Cid <tsdgeos@terra.es> to fix #53119

CCMAIL: 53119-done@bugs.kde.org


  M +4 -1      kbounce.cpp   1.8
  M +2 -0      kbounce.h   1.3


--- kdegames/kbounce/kbounce.cpp  #1.7:1.8
@@ -122,5 +122,5 @@ void KJezzball::initXMLUI()
     KStdGameAction::quit( this, SLOT(close()), actionCollection() );
     KStdGameAction::highscores(this, SLOT(showHighscore()), actionCollection() );
-    KStdGameAction::pause(this, SLOT(pauseGame()), actionCollection());
+    m_pauseButton = KStdGameAction::pause(this, SLOT(pauseGame()), actionCollection());
     KStdGameAction::end(this, SLOT(closeGame()), actionCollection());
 
@@ -142,4 +142,7 @@ void KJezzball::newGame()
     if ( m_state==Idle )
     {
+        // untoggles the pause button in case it was toggled
+        m_pauseButton->setChecked(false);
+
         // update displays
         m_game.level = 1;

--- kdegames/kbounce/kbounce.h  #1.2:1.3
@@ -25,4 +25,5 @@ class JezzGame;
 class QLCDNumber;
 class QGridLayout;
+class KToggleAction;
 
 class KJezzball : public KMainWindow
@@ -71,4 +72,5 @@ protected:
    QLCDNumber *m_percentLCD;
    QLCDNumber *m_timeLCD;
+   KToggleAction *m_pauseButton;
 
    QTimer *m_timer;