summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmanoil Kotsev <[email protected]>2024-11-14 00:19:15 +0000
committerEmanoil Kotsev <[email protected]>2024-11-14 00:19:15 +0000
commitbcada5102addb1992bd0c3be05bff9cf4dd596bd (patch)
treec58f6b7d3d736082cf223c1cb91e14353510b2c3
parent892e22299c45ce261e0a53e4ba98bbf30abf44ab (diff)
downloadtdebase-feat/dbusscreensaver.tar.gz
tdebase-feat/dbusscreensaver.zip
removed and fixed commentsfeat/dbusscreensaver
Signed-off-by: Emanoil Kotsev <[email protected]>
-rw-r--r--kdesktop/dbusscreensaverservice.cpp19
-rw-r--r--kdesktop/dbusscreensaverservice.h2
2 files changed, 4 insertions, 17 deletions
diff --git a/kdesktop/dbusscreensaverservice.cpp b/kdesktop/dbusscreensaverservice.cpp
index 48f143a5b..36a16ab87 100644
--- a/kdesktop/dbusscreensaverservice.cpp
+++ b/kdesktop/dbusscreensaverservice.cpp
@@ -35,13 +35,13 @@ ScreenSaverInterfaceImpl::ScreenSaverInterfaceImpl(TQT_DBusConnection &conn) :
DCOPReply reply = m_kdesktopdcoprefobj.call("isEnabled");
if (!reply.isValid())
{
- tqDebug("ScreenSaverInterfaceImpl::SimulateUserActivity:1 there was some error using DCOP.");
+ tqDebug("ScreenSaverInterfaceImpl:1 there was some error using DCOP.");
}
else
{
if (!reply.get(isEnabled))
{
- tqDebug("ScreenSaverInterfaceImpl::SimulateUserActivity:2 there was some error getting the value from DCOPReply");
+ tqDebug("ScreenSaverInterfaceImpl:2 there was some error getting the value from DCOPReply");
}
else
{
@@ -72,13 +72,11 @@ bool ScreenSaverInterfaceImpl::restoreState()
void ScreenSaverInterfaceImpl::handleMethodReply(const TQT_DBusMessage& reply)
{
-// kdDebug() << __func__ << endl;
m_connection->send(reply);
}
bool ScreenSaverInterfaceImpl::handleSignalSend(const TQT_DBusMessage& reply)
{
-// kdDebug() << __func__ << endl;
return true;
}
@@ -100,31 +98,26 @@ bool ScreenSaverInterfaceImpl::Lock(TQT_DBusError& dbuserror) {
}
bool ScreenSaverInterfaceImpl::SimulateUserActivity(TQT_DBusError& dbuserror) {
-// kdDebug() << __func__ << endl;
tqDebug("SimulateUserActivity not implemented");
return true;
}
bool ScreenSaverInterfaceImpl::GetActive(bool& arg0, TQT_DBusError& dbuserror) {
-// kdDebug() << __func__ << endl;
tqDebug("GetActive not implemented");
return true;
}
bool ScreenSaverInterfaceImpl::GetActiveTime(TQ_UINT32& seconds, TQT_DBusError& dbuserror) {
-// kdDebug() << __func__ << endl;
tqDebug("GetActiveTime not implemented");
return true;
}
bool ScreenSaverInterfaceImpl::GetSessionIdleTime(TQ_UINT32& seconds, TQT_DBusError& dbuserror) {
-// kdDebug() << __func__ << endl;
tqDebug("GetSessionIdleTime not implemented");
return true;
}
bool ScreenSaverInterfaceImpl::SetActive(bool& arg0, bool e, TQT_DBusError& dbuserror) {
-// kdDebug() << __func__ << endl;
tqDebug("SetActive not implemented");
return true;
}
@@ -156,7 +149,6 @@ bool ScreenSaverInterfaceImpl::Inhibit(const TQString& application_name, const T
}
bool ScreenSaverInterfaceImpl::UnInhibit(TQ_UINT32 cookie, TQT_DBusError& dbuserror) {
-
tqDebug(TQString("UnInhibit:1 cookie(%1), application(%2), reason(%3)")
.arg(cookie)
.arg(m_cookies[cookie].name)
@@ -179,13 +171,11 @@ bool ScreenSaverInterfaceImpl::UnInhibit(TQ_UINT32 cookie, TQT_DBusError& dbuser
}
bool ScreenSaverInterfaceImpl::Throttle(const TQString& application_name, const TQString& reason_for_inhibit, TQ_UINT32& cookie, TQT_DBusError& dbuserror) {
-// kdDebug() << __func__ << endl;
tqDebug("Throttle not implemented");
return true;
}
bool ScreenSaverInterfaceImpl::UnThrottle(TQ_UINT32 cookie, TQT_DBusError& dbuserror) {
-// kdDebug() << __func__ << endl;
tqDebug("UnThrottle not implemented");
return true;
}
@@ -270,7 +260,6 @@ TQT_DBusObjectBase* ScreenSaverService::createInterface(const TQString& interfac
TDEDbusScreenSaver::TDEDbusScreenSaver()
{
-
// open connection to DBus and configure the service
if (!configureService())
{
@@ -300,8 +289,7 @@ bool TDEDbusScreenSaver::isConnectedToDBUS()
bool TDEDbusScreenSaver::configureService()
{
- // m_connection = TQT_DBusConnection::addConnection(TQT_DBusConnection::SystemBus, DBUS_SCREENSAVER_SERVICE);
- m_connection = TQT_DBusConnection::addConnection(TQT_DBusConnection::SessionBus, DBUS_SCREENSAVER_SERVICE);
+ m_connection = TQT_DBusConnection::addConnection(TQT_DBusConnection::SessionBus, DBUS_SCREENSAVER_SERVICE);
if (!m_connection.isConnected())
{
@@ -327,7 +315,6 @@ bool TDEDbusScreenSaver::configureService()
bool TDEDbusScreenSaver::unconfigureService()
{
-
screenSaverService->stopService(); // will restore the original state
screenSaverService=0;
diff --git a/kdesktop/dbusscreensaverservice.h b/kdesktop/dbusscreensaverservice.h
index a4553dac5..ab59ecc62 100644
--- a/kdesktop/dbusscreensaverservice.h
+++ b/kdesktop/dbusscreensaverservice.h
@@ -197,7 +197,7 @@ private:
TQMap<TQ_UINT32,Pair> m_cookies;
TQ_UINT32 m_cookiescounter;
/**
- * obtain and keep the original state if service is stopped,
+ * keep the original lock state,
* it is used to restored the original state
*/
bool isEnabled;