From 160e6f21b8d578aeaba5105082cbb61f46811ef1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sun, 22 Sep 2013 14:56:47 +0200 Subject: Add support for freeze suspend state --- src/countdowndialog.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/countdowndialog.cpp') 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, * \date 2007 */ @@ -34,7 +34,7 @@ // QT headers: #include -#include +#include #include #include #include @@ -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); -- cgit v1.2.1