diff options
author | Michele Calgaro <[email protected]> | 2016-05-06 18:20:22 +1000 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2016-05-06 18:20:22 +1000 |
commit | 676fba0b9f08d41e68b115bc91931b5d0aa53376 (patch) | |
tree | 3cb909493c2e4337cd82f3ba7fb4e5291d20165f /src/countdowndialog.cpp | |
parent | fab0d1579f8be4859958217e7b632acfbf191de2 (diff) | |
download | tdepowersave-676fba0b9f08d41e68b115bc91931b5d0aa53376.tar.gz tdepowersave-676fba0b9f08d41e68b115bc91931b5d0aa53376.zip |
Fixed autosuspend functionality broken by commit fab0d15. This relates to bug 2632.
Signed-off-by: Michele Calgaro <[email protected]>
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); |