[prev in list] [next in list] [prev in thread] [next in thread]
List: kopete-devel
Subject: [Kopete-devel] Feature implementation: screensaver-controlled away/back
From: Brian Ledbetter <brian () shadowcom ! net>
Date: 2003-02-05 17:16:48
[Download RAW message or body]
Hello everyone,
I have attached a very small patch against -HEAD which will cause Kopete
to go away when the KDE 3.1 screensaver activates, and become available when
the screensaver comes back. (You may have seen this feature in the AIM client
for Windows) This is very rudimentary, and would probably need the following
to happen before it's acceptable to end-users:
* Perhaps add this as a configurable parameter (I haven't looked into
how to do this yet, but would be happy to add it if desired).
* The code should have #if wrappers to disable this feature if Kopete
is built on KDE pre-3.1.
As it stands, this patch would seem to only work against KDE out of CVS - the
"KDE_start_screensaver()" signal was added after the KDE 3.1 release. Hope you
find this useful! :)
--
Brian Ledbetter <brian@shadowcom.net>
http://www.shadowcom.net/brian/
["kopeteidentitymanager.cpp.patch" (text/plain)]
--- kopeteidentitymanager.cpp.orig Wed Feb 5 10:10:12 2003
+++ kopeteidentitymanager.cpp Wed Feb 5 12:11:43 2003
@@ -18,6 +18,8 @@
#include "kopeteidentitymanager.h"
#include <qapplication.h>
+#include <kapplication.h>
+#include <dcopclient.h>
#include <kdebug.h>
@@ -36,8 +38,11 @@
}
KopeteIdentityManager::KopeteIdentityManager()
- : QObject( qApp, "KopeteIdentityManager" )
+ : QObject( qApp, "KopeteIdentityManager" ), DCOPObject()
{
+
+ connectDCOPSignal( 0, 0, "KDE_start_screensaver()", "setAwayAll()", false );
+ connectDCOPSignal( 0, 0, "KDE_stop_screensaver()", "setAvailableAll()", false );
}
KopeteIdentityManager::~KopeteIdentityManager()
["kopeteidentitymanager.h.patch" (text/plain)]
--- kopeteidentitymanager.h.orig Wed Feb 5 10:25:07 2003
+++ kopeteidentitymanager.h Wed Feb 5 10:59:57 2003
@@ -18,6 +18,7 @@
#ifndef __kopeteidentitymanager_h__
#define __kopeteidentitymanager_h__
+#include <dcopobject.h>
#include <qobject.h>
/**
@@ -31,7 +32,7 @@
* Because this will need to change later I named the class after its
* future additional use already.
*/
-class KopeteIdentityManager : public QObject
+class KopeteIdentityManager : public QObject, public DCOPObject
{
Q_OBJECT
_______________________________________________
Kopete-devel mailing list
Kopete-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/kopete-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic