Version: 0.7.1 (using KDE 3.1.3) Installed from: (3.0) Compiler: gcc version 2.95.4 20011002 (Debian prerelease) OS: Linux (i686) release 2.4.21 It would be really helpful if the status could automatically be set to "away" when the desktop is locked. Many users quickly click on the desktop lock when leaving their computer and so this could be combined with an Auto-Away.
Subject: Re: Auto-Away On Desktop Lock ok so i checked into this and it looks like there's not signal emitted when the desktop is locked. "<ossi> sadly, there is no such signal ... i had to hack it directly into kdesktop_lock to let kdm know ... :(" dcop mabey?
Subject: Re: [Kopete-devel] Auto-Away On Desktop Lock On Thursday 11 September 2003 22:21, Chris Chapin wrote: > ok so i checked into this and it looks like there's not signal emitted when > the desktop is locked. > "<ossi> sadly, there is no such signal ... i had to hack it directly into > kdesktop_lock to let kdm know ... :(" > dcop mabey? http://lists.kde.org/?l=kde-cvs&m=106330075012138&w=2 Whoever feels like it can add it or at least send a patch for review :)
Subject: kdenetwork/kopete/kopete CVS commit by ogoffart: make possible to go away with DCOP. also, commented code to go away when desktop lock. this is commented because of the feature frezee. CCMAIL: 63752@bugs.kde.org M +27 -0 kopeteiface.cpp 1.26 M +35 -0 kopeteiface.h 1.18 --- kdenetwork/kopete/kopete/kopeteiface.cpp #1.25:1.26 @@ -18,4 +18,6 @@ #include <kmessagebox.h> #include <klocale.h> +#include <kconfig.h> +#include <kglobal.h> #include "kopeteiface.h" @@ -25,8 +27,18 @@ #include "kopetepluginmanager.h" #include "kopeteprotocol.h" +#include "kopeteaway.h" KopeteIface::KopeteIface() : DCOPObject( "KopeteIface" ) { +#if 0 //disabled because of feature frezee. TODO: enable after kde 3.2 + KConfig *config = KGlobal::config(); + config->setGroup("AutoAway"); + + if (config->readBoolEntry("UseAutoAway", true)) + connectDCOPSignal("kdesktop", "KScreensaverIface", "KDE_start_screensaver()", "setAutoAway()", false); + else + disconnectDCOPSignal("kdesktop", "KScreensaverIface", "KDE_start_screensaver()", "setAutoAway()"); +#endif } @@ -187,4 +199,19 @@ bool KopeteIface::unloadPlugin( const QS argument.prepend( "kopete_" ); return KopetePluginManager::self()->unloadPlugin( argument ); +} + +void KopeteIface::setAway() +{ + KopeteAccountManager::manager()->setAwayAll(); +} + +void KopeteIface::setAvailable() +{ + KopeteAccountManager::manager()->setAvailableAll(); +} + +void KopeteIface::setAutoAway() +{ + KopeteAway::getInstance()->setAutoAway(); } --- kdenetwork/kopete/kopete/kopeteiface.h #1.17:1.18 @@ -65,11 +65,46 @@ k_dcop: const QString &displayName, const QString &groupName = QString::null ); + /** + * return a list of alls accounts. + * form: XXXProtocol||AccountId + */ QStringList accounts(); + /** + * connect a given account in the given protocol + */ void connect(const QString &protocolName, const QString &accountId); + /** + * disconnect a given account in the given protocol + */ void disconnect(const QString &protocolName, const QString &accountId); + /** + * load a plugin + * the name is the name of the library: example: kopete_msn + * but you can ommit the kopete_ prefix + */ bool loadPlugin( const QString& name ); + /** + * unload a plugin + * the name is the name of the library: example: kopete_msn + * but you can ommit the kopete_ prefix + */ bool unloadPlugin( const QString& name ); + + /** + * set all account away using the global away function + */ + void setAway(); + /** + * set Available all accountes + */ + void setAvailable(); + /** + * set all account away using the auto away funciton. + * accounts will return online if activity is detected again + */ + void setAutoAway(); + };
Created attachment 2487 [details] Patch to enable. Here is a patch to enable the autoAway when the desktop is locked.
close the bug since it's already in the code
*** Bug 71730 has been marked as a duplicate of this bug. ***