diff options
author | Slávek Banko <[email protected]> | 2013-09-22 14:56:47 +0200 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2013-09-22 14:56:47 +0200 |
commit | 160e6f21b8d578aeaba5105082cbb61f46811ef1 (patch) | |
tree | 62a3660023eefc4efc498c6025bde1759d6b2e1c /src/countdowndialog.cpp | |
parent | e113ed917ca8d86e607c7fc70accd681cfefb0a4 (diff) | |
download | tdepowersave-160e6f21b8d578aeaba5105082cbb61f46811ef1.tar.gz tdepowersave-160e6f21b8d578aeaba5105082cbb61f46811ef1.zip |
Add support for freeze suspend state
Diffstat (limited to 'src/countdowndialog.cpp')
-rw-r--r-- | src/countdowndialog.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/countdowndialog.cpp b/src/countdowndialog.cpp index 0adf891..99b519e 100644 --- a/src/countdowndialog.cpp +++ b/src/countdowndialog.cpp @@ -18,7 +18,7 @@ ***************************************************************************/ /*! \file countdowndialog.cpp - * \brief In this file can be found the countdown dialog related code. + * \brief In this file can be found the countdown dialog related code. * \author Danny Kukawka, <[email protected], [email protected]> * \date 2007 */ @@ -34,7 +34,7 @@ // QT headers: #include <tqdialog.h> -#include <tqlabel.h> +#include <tqlabel.h> #include <tqprogressbar.h> #include <tqpushbutton.h> #include <tqstring.h> @@ -66,7 +66,7 @@ countDownDialog::~countDownDialog() { kdDebugFuncOut(trace); } -/*! +/*! * This used to set Icon/pixmap for the dialog. * \param type TQString with the type of the current suspend * to set the pixmap in the dialog @@ -79,6 +79,8 @@ void countDownDialog::setPixmap( TQString type ) pixmap = TDEGlobal::iconLoader()->loadIcon("suspend_to_disk", TDEIcon::NoGroup, TDEIcon::SizeLarge); } else if (type.startsWith("suspend2ram")) { pixmap = TDEGlobal::iconLoader()->loadIcon("suspend_to_ram", TDEIcon::NoGroup, TDEIcon::SizeLarge); + } else if (type.startsWith("freeze")) { + pixmap = TDEGlobal::iconLoader()->loadIcon("suspend_to_ram", TDEIcon::NoGroup, TDEIcon::SizeLarge); } else if (type.startsWith("standby")) { pixmap = TDEGlobal::iconLoader()->loadIcon("stand_by", TDEIcon::NoGroup, TDEIcon::SizeLarge); } else { @@ -89,7 +91,7 @@ void countDownDialog::setPixmap( TQString type ) /*! * To set the message to the dialog, which should be shown to the user. - * \param text TQString with the message. + * \param text TQString with the message. */ void countDownDialog::setMessageText(TQString text) { kdDebugFuncIn(trace); @@ -153,12 +155,12 @@ void countDownDialog::updateProgress() { if (remaining == 0 ) { if (PROGRESS->isActive()) PROGRESS->stop(); - + chancel = false; close(); } else if ( remaining > 0) { int setTo = (int)((100.0/(float)timeOut)*(float)remaining); - + // set the progressBar progressBar->setFormat(i18n("%1 seconds").arg(remaining)); progressBar->setPercentageVisible(true); |