summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2016-03-08 12:56:47 +0900
committerMichele Calgaro <[email protected]>2016-03-08 12:56:47 +0900
commit2f0cf5202c83fe9d034dc3254e8db127f5bdffe3 (patch)
treeacc77ab286cc64884b3c51d275f578b359f0a131
parentb31060a8af5c4cfa259c6917cea06745c21bc21b (diff)
downloadtdepowersave-2f0cf5202c83fe9d034dc3254e8db127f5bdffe3.tar.gz
tdepowersave-2f0cf5202c83fe9d034dc3254e8db127f5bdffe3.zip
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 <[email protected]>
-rw-r--r--src/configure_Dialog.ui47
-rw-r--r--src/inactivity.cpp6
-rw-r--r--src/tdepowersave.cpp10
3 files changed, 51 insertions, 12 deletions
diff --git a/src/configure_Dialog.ui b/src/configure_Dialog.ui
index 5ea68c5..956721a 100644
--- a/src/configure_Dialog.ui
+++ b/src/configure_Dialog.ui
@@ -327,7 +327,10 @@
<string> min</string>
</property>
<property name="maxValue">
- <number>1500</number>
+ <number>50000</number>
+ </property>
+ <property name="minValue">
+ <number>1</number>
</property>
</widget>
<widget class="TQSpinBox" row="5" column="3">
@@ -341,7 +344,10 @@
<string> min</string>
</property>
<property name="maxValue">
- <number>1500</number>
+ <number>50000</number>
+ </property>
+ <property name="minValue">
+ <number>1</number>
</property>
</widget>
<widget class="TQSpinBox" row="4" column="3">
@@ -355,7 +361,10 @@
<string> min</string>
</property>
<property name="maxValue">
- <number>1500</number>
+ <number>50000</number>
+ </property>
+ <property name="minValue">
+ <number>1</number>
</property>
</widget>
</grid>
@@ -656,6 +665,12 @@
<property name="suffix">
<string> min</string>
</property>
+ <property name="maxValue">
+ <number>50000</number>
+ </property>
+ <property name="minValue">
+ <number>1</number>
+ </property>
</widget>
<widget class="TQPushButton" row="5" column="2" rowspan="1" colspan="2">
<property name="name">
@@ -881,7 +896,7 @@
<string> %</string>
</property>
<property name="maxValue">
- <number>1500</number>
+ <number>100</number>
</property>
</widget>
<widget class="TQLabel" row="2" column="3" rowspan="1" colspan="2">
@@ -944,6 +959,12 @@
<property name="suffix">
<string> min</string>
</property>
+ <property name="maxValue">
+ <number>50000</number>
+ </property>
+ <property name="minValue">
+ <number>1</number>
+ </property>
</widget>
</grid>
</widget>
@@ -1329,6 +1350,9 @@
<property name="maxValue">
<number>100</number>
</property>
+ <property name="minValue">
+ <number>1</number>
+ </property>
</widget>
<widget class="TQSpinBox" row="3" column="6">
<property name="name">
@@ -1348,6 +1372,9 @@
<property name="maxValue">
<number>100</number>
</property>
+ <property name="minValue">
+ <number>1</number>
+ </property>
</widget>
<widget class="TQSpinBox" row="1" column="2">
<property name="name">
@@ -1367,6 +1394,9 @@
<property name="maxValue">
<number>100</number>
</property>
+ <property name="minValue">
+ <number>1</number>
+ </property>
</widget>
<widget class="TQSpinBox" row="2" column="2">
<property name="name">
@@ -1386,6 +1416,9 @@
<property name="maxValue">
<number>100</number>
</property>
+ <property name="minValue">
+ <number>1</number>
+ </property>
</widget>
<widget class="TQSpinBox" row="3" column="2">
<property name="name">
@@ -1405,6 +1438,9 @@
<property name="maxValue">
<number>100</number>
</property>
+ <property name="minValue">
+ <number>1</number>
+ </property>
</widget>
<widget class="TQSpinBox" row="1" column="6">
<property name="name">
@@ -1424,6 +1460,9 @@
<property name="maxValue">
<number>100</number>
</property>
+ <property name="minValue">
+ <number>1</number>
+ </property>
</widget>
</grid>
</widget>
diff --git a/src/inactivity.cpp b/src/inactivity.cpp
index 6da740d..8d7205e 100644
--- a/src/inactivity.cpp
+++ b/src/inactivity.cpp
@@ -32,8 +32,8 @@ extern "C" {
#include <X11/extensions/dpms.h>
#include <X11/extensions/scrnsaver.h>
}
-
-// KDE Headers
+
+// TDE Headers
#include <tdelocale.h>
/*! 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.
*/
void inactivity::recheck() {
diff --git a/src/tdepowersave.cpp b/src/tdepowersave.cpp
index 6779aae..7737089 100644
--- a/src/tdepowersave.cpp
+++ b/src/tdepowersave.cpp
@@ -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(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 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.
- * 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".
* \return boolean with the result of the operation
* \retval true if successful
@@ -986,11 +986,11 @@ void tdepowersave::do_autosuspendWarn() {
/*!
* \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
* \retval true if successful
* \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!
*/
bool tdepowersave::do_autosuspend(bool chancel) {
@@ -1021,7 +1021,7 @@ bool tdepowersave::do_autosuspend(bool chancel) {
return false;
}
} 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);
return false;
}