[SCM] ktp-kded-integration-module packaging branch, master, updated. debian/15.12.1-2-382-gbd961c2
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:12:34 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-kded-module.git;a=commitdiff;h=f0cf073
The following commit has been merged in the master branch:
commit f0cf073060afcbf933e5eef1ea95d40511379b7e
Author: Martin Klapetek <martin.klapetek at gmail.com>
Date: Wed Sep 28 14:08:13 2011 +0200
Prevent multiple timeouts being added on each config change
Reviewed-by: George Kiagiadakis
---
autoaway.cpp | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/autoaway.cpp b/autoaway.cpp
index 22bab24..436cddd 100644
--- a/autoaway.cpp
+++ b/autoaway.cpp
@@ -84,11 +84,14 @@ void AutoAway::readConfig()
bool autoAwayEnabled = kdedConfig.readEntry("autoAwayEnabled", true);
bool autoXAEnabled = kdedConfig.readEntry("autoXAEnabled", true);
+ //remove all our timeouts and only readd them if auto-away is enabled
+ //WARNING: can't use removeAllTimeouts because this runs inside KDED, it would remove other KDED timeouts as well
+ KIdleTime::instance()->removeIdleTimeout(m_awayTimeoutId);
+ KIdleTime::instance()->removeIdleTimeout(m_extAwayTimeoutId);
+
if (autoAwayEnabled) {
int awayTime = kdedConfig.readEntry("awayAfter", 5);
m_awayTimeoutId = KIdleTime::instance()->addIdleTimeout(awayTime * 60 * 1000);
- } else if (!autoAwayEnabled && m_awayTimeoutId != -1) {
- KIdleTime::instance()->removeAllIdleTimeouts();
}
if (autoAwayEnabled && autoXAEnabled) {
int xaTime = kdedConfig.readEntry("xaAfter", 15);
--
ktp-kded-integration-module packaging
More information about the pkg-kde-commits
mailing list