diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2016-05-06 18:20:22 +1000 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2016-05-06 18:22:52 +1000 |
commit | b729f8a2459ba6a227740d152c8481790bb46488 (patch) | |
tree | d606ab37d02cb8e261710aba0af0b84974b87492 /src/countdowndialog.cpp | |
parent | 10677701f9f1f9a58486e686020b0d26d8d6a5a2 (diff) | |
download | tdepowersave-b729f8a2459ba6a227740d152c8481790bb46488.tar.gz tdepowersave-b729f8a2459ba6a227740d152c8481790bb46488.zip |
Fixed autosuspend functionality broken by commit fab0d15. This relates to bug 2632.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 676fba0b9f08d41e68b115bc91931b5d0aa53376)
Diffstat (limited to 'src/countdowndialog.cpp')
-rw-r--r-- | src/countdowndialog.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/countdowndialog.cpp b/src/countdowndialog.cpp index 6393875..0037100 100644 --- a/src/countdowndialog.cpp +++ b/src/countdowndialog.cpp @@ -45,7 +45,6 @@ countDownDialog::countDownDialog( int timeout, TQWidget *parent, const char *nam :countdown_Dialog(parent, name, false, TQt::WStyle_StaysOnTop | TQt::WDestructiveClose ) { kdDebugFuncIn(trace); - chancel = false; remaining = timeout; timeOut = timeout; @@ -61,7 +60,7 @@ countDownDialog::countDownDialog( int timeout, TQWidget *parent, const char *nam countDownDialog::~countDownDialog() { kdDebugFuncIn(trace); // no need to delete child widgets, TQt does it all for us - emit dialogClosed(chancel); + emit dialogClosed(remaining > 0); kdDebugFuncOut(trace); } @@ -140,7 +139,6 @@ void countDownDialog::pB_cancel_pressed() { if (PROGRESS->isActive()) PROGRESS->stop(); - chancel = true; close(); kdDebugFuncOut(trace); @@ -152,8 +150,6 @@ void countDownDialog::reject() { if (PROGRESS->isActive()) PROGRESS->stop(); - chancel = true; - countdown_Dialog::reject(); kdDebugFuncOut(trace); @@ -169,7 +165,6 @@ void countDownDialog::updateProgress() { if (PROGRESS->isActive()) PROGRESS->stop(); - chancel = false; close(); } else if ( remaining > 0) { int setTo = (int)((100.0/(float)timeOut)*(float)remaining); |