[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/kio/misc/kwalletd
From: George Staikos <staikos () kde ! org>
Date: 2003-09-11 16:41:14
[Download RAW message or body]
CVS commit by staikos:
Lock all wallets when the screensaver activates (optional)
M +16 -0 kwalletd.cpp 1.44
M +2 -0 kwalletd.h 1.29
--- kdelibs/kio/misc/kwalletd/kwalletd.cpp #1.43:1.44
@@ -891,4 +891,10 @@ void KWalletD::reconfigure() {
_idleTime = cfg.readNumEntry("Idle Timeout", 10) * 60 * 1000;
+ if (cfg.readBoolEntry("Close on Screensaver", false)) {
+ connectDCOPSignal("kdesktop", "KScreensaverIface", \
"KDE_start_screensaver()", "closeAllWallets()", false); + } else {
+ disconnectDCOPSignal("kdesktop", "KScreensaverIface", \
"KDE_start_screensaver()", "closeAllWallets()"); + }
+
// Handle idle changes
if (_closeIdle) {
@@ -995,4 +1001,14 @@ void KWalletD::timedOut(int id) {
}
+
+void KWalletD::closeAllWallets() {
+ QIntDict<KWallet::Backend> tw = _wallets;
+
+ for (QIntDictIterator<KWallet::Backend> it(tw); it.current(); ++it) {
+ closeWallet(it.current(), it.currentKey(), true);
+ }
+
+ _wallets.clear();
+}
#include "kwalletd.moc"
--- kdelibs/kio/misc/kwalletd/kwalletd.h #1.28:1.29
@@ -127,4 +127,6 @@ class KWalletD : public KDEDModule {
virtual bool keyDoesNotExist(const QString& wallet, const QString& \
folder, const QString& key);
+ virtual void closeAllWallets();
+
private slots:
void slotAppUnregistered(const QCString& app);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic