Increased maximum time limit for timers to 50000 min (almost 35 days). This relates to bug 2599.

NOTE: if the max limit is removed, the TQSpinBox reverts to the default value of 99.
Also fixed minimum limit for some timers and percentage fields.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/1/head
Michele Calgaro 9 years ago
parent b31060a8af
commit 2f0cf5202c

@ -327,7 +327,10 @@
<string> min</string> <string> min</string>
</property> </property>
<property name="maxValue"> <property name="maxValue">
<number>1500</number> <number>50000</number>
</property>
<property name="minValue">
<number>1</number>
</property> </property>
</widget> </widget>
<widget class="TQSpinBox" row="5" column="3"> <widget class="TQSpinBox" row="5" column="3">
@ -341,7 +344,10 @@
<string> min</string> <string> min</string>
</property> </property>
<property name="maxValue"> <property name="maxValue">
<number>1500</number> <number>50000</number>
</property>
<property name="minValue">
<number>1</number>
</property> </property>
</widget> </widget>
<widget class="TQSpinBox" row="4" column="3"> <widget class="TQSpinBox" row="4" column="3">
@ -355,7 +361,10 @@
<string> min</string> <string> min</string>
</property> </property>
<property name="maxValue"> <property name="maxValue">
<number>1500</number> <number>50000</number>
</property>
<property name="minValue">
<number>1</number>
</property> </property>
</widget> </widget>
</grid> </grid>
@ -656,6 +665,12 @@
<property name="suffix"> <property name="suffix">
<string> min</string> <string> min</string>
</property> </property>
<property name="maxValue">
<number>50000</number>
</property>
<property name="minValue">
<number>1</number>
</property>
</widget> </widget>
<widget class="TQPushButton" row="5" column="2" rowspan="1" colspan="2"> <widget class="TQPushButton" row="5" column="2" rowspan="1" colspan="2">
<property name="name"> <property name="name">
@ -881,7 +896,7 @@
<string> %</string> <string> %</string>
</property> </property>
<property name="maxValue"> <property name="maxValue">
<number>1500</number> <number>100</number>
</property> </property>
</widget> </widget>
<widget class="TQLabel" row="2" column="3" rowspan="1" colspan="2"> <widget class="TQLabel" row="2" column="3" rowspan="1" colspan="2">
@ -944,6 +959,12 @@
<property name="suffix"> <property name="suffix">
<string> min</string> <string> min</string>
</property> </property>
<property name="maxValue">
<number>50000</number>
</property>
<property name="minValue">
<number>1</number>
</property>
</widget> </widget>
</grid> </grid>
</widget> </widget>
@ -1329,6 +1350,9 @@
<property name="maxValue"> <property name="maxValue">
<number>100</number> <number>100</number>
</property> </property>
<property name="minValue">
<number>1</number>
</property>
</widget> </widget>
<widget class="TQSpinBox" row="3" column="6"> <widget class="TQSpinBox" row="3" column="6">
<property name="name"> <property name="name">
@ -1348,6 +1372,9 @@
<property name="maxValue"> <property name="maxValue">
<number>100</number> <number>100</number>
</property> </property>
<property name="minValue">
<number>1</number>
</property>
</widget> </widget>
<widget class="TQSpinBox" row="1" column="2"> <widget class="TQSpinBox" row="1" column="2">
<property name="name"> <property name="name">
@ -1367,6 +1394,9 @@
<property name="maxValue"> <property name="maxValue">
<number>100</number> <number>100</number>
</property> </property>
<property name="minValue">
<number>1</number>
</property>
</widget> </widget>
<widget class="TQSpinBox" row="2" column="2"> <widget class="TQSpinBox" row="2" column="2">
<property name="name"> <property name="name">
@ -1386,6 +1416,9 @@
<property name="maxValue"> <property name="maxValue">
<number>100</number> <number>100</number>
</property> </property>
<property name="minValue">
<number>1</number>
</property>
</widget> </widget>
<widget class="TQSpinBox" row="3" column="2"> <widget class="TQSpinBox" row="3" column="2">
<property name="name"> <property name="name">
@ -1405,6 +1438,9 @@
<property name="maxValue"> <property name="maxValue">
<number>100</number> <number>100</number>
</property> </property>
<property name="minValue">
<number>1</number>
</property>
</widget> </widget>
<widget class="TQSpinBox" row="1" column="6"> <widget class="TQSpinBox" row="1" column="6">
<property name="name"> <property name="name">
@ -1424,6 +1460,9 @@
<property name="maxValue"> <property name="maxValue">
<number>100</number> <number>100</number>
</property> </property>
<property name="minValue">
<number>1</number>
</property>
</widget> </widget>
</grid> </grid>
</widget> </widget>

@ -33,7 +33,7 @@ extern "C" {
#include <X11/extensions/scrnsaver.h> #include <X11/extensions/scrnsaver.h>
} }
// KDE Headers // TDE Headers
#include <tdelocale.h> #include <tdelocale.h>
/*! The default constructor of the class autosuspend */ /*! The default constructor of the class autosuspend */
@ -93,7 +93,7 @@ void inactivity::start( int timeToExpire, TQStringList blacked ) {
} }
/*! /*!
* \b TQT_SLOT to call check as recheck inactivity if befor a running PID * \b TQT_SLOT to call check as recheck inactivity if before a running PID
* request was detected. * request was detected.
*/ */
void inactivity::recheck() { void inactivity::recheck() {

@ -101,7 +101,7 @@ tdepowersave::tdepowersave( bool force_acpi_check, bool trace_func ) : KSystemTr
connect(hwinfo, TQT_SIGNAL(ACStatus(bool)), this, TQT_SLOT(handleACStatusChange (bool))); connect(hwinfo, TQT_SIGNAL(ACStatus(bool)), this, TQT_SLOT(handleACStatusChange (bool)));
connect(hwinfo, TQT_SIGNAL(resumed(int)), this, TQT_SLOT(forwardResumeSignal(int))); connect(hwinfo, TQT_SIGNAL(resumed(int)), this, TQT_SLOT(forwardResumeSignal(int)));
// connect to error mesages // connect to error messages
connect(autoSuspend, TQT_SIGNAL(displayErrorMsg(TQString)), this, TQT_SLOT(showErrorMessage(TQString))); connect(autoSuspend, TQT_SIGNAL(displayErrorMsg(TQString)), this, TQT_SLOT(showErrorMessage(TQString)));
// connect to events // connect to events
@ -747,7 +747,7 @@ bool tdepowersave::do_suspend2disk(){
/*! /*!
* \b TQT_SLOT to send the command for "suspend to RAM" to the TDE hardware library. * \b TQT_SLOT to send the command for "suspend to RAM" to the TDE hardware library.
* If there is a error while "suspend to RAM" the user get e messagebox. * If there is a error while "suspend to RAM" the user get a messagebox.
* This function need a power management backend in TDE hardware library for "suspend to RAM". * This function need a power management backend in TDE hardware library for "suspend to RAM".
* \return boolean with the result of the operation * \return boolean with the result of the operation
* \retval true if successful * \retval true if successful
@ -986,11 +986,11 @@ void tdepowersave::do_autosuspendWarn() {
/*! /*!
* \b TQT_SLOT to send the related suspend command for autosuspend * \b TQT_SLOT to send the related suspend command for autosuspend
* \param chancel boolean with info if the autosuspend should get chanceld * \param chancel boolean with info if the autosuspend should get canceled
* \return boolean with the result of the operation * \return boolean with the result of the operation
* \retval true if successful * \retval true if successful
* \retval false if command not supported or on any other error * \retval false if command not supported or on any other error
* \todo add check if the requested command is supported befor send and * \todo add check if the requested command is supported before send and
* add message for this case to tell that maybe changed config! * add message for this case to tell that maybe changed config!
*/ */
bool tdepowersave::do_autosuspend(bool chancel) { bool tdepowersave::do_autosuspend(bool chancel) {
@ -1021,7 +1021,7 @@ bool tdepowersave::do_autosuspend(bool chancel) {
return false; return false;
} }
} else { } else {
kdDebug() << "The autosuspend was chanceled (via the chancel dialog), start again." << endl; kdDebug() << "The autosuspend was canceled (via the cancel dialog), start again." << endl;
setAutoSuspend(false); setAutoSuspend(false);
return false; return false;
} }

Loading…
Cancel
Save