summaryrefslogtreecommitdiffstats
path: root/kded
diff options
context:
space:
mode:
authorDarrell Anderson <humanreadable@yahoo.com>2013-03-02 17:55:52 -0600
committerDarrell Anderson <humanreadable@yahoo.com>2013-03-02 17:55:52 -0600
commit3dfc6fd192be0573af8815b9ad02fbf78006a969 (patch)
treee5c7ba21f51e309e27bc0e4170767855a8f01e53 /kded
parentdcc1ddf6f97b4c005095d4016039d5c4d8d71c78 (diff)
downloadtdelibs-3dfc6fd192be0573af8815b9ad02fbf78006a969.tar.gz
tdelibs-3dfc6fd192be0573af8815b9ad02fbf78006a969.zip
Fix "KDE4 is running" message.
This resolves bug report 1200.
Diffstat (limited to 'kded')
-rw-r--r--kded/kded.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/kded/kded.cpp b/kded/kded.cpp
index 947d3b816..16cbfa2ce 100644
--- a/kded/kded.cpp
+++ b/kded/kded.cpp
@@ -156,17 +156,19 @@ void Kded::initModules()
{
m_dontLoad.clear();
TDEConfig *config = kapp->config();
- bool kde_running = !( getenv( "TDE_FULL_SESSION" ) == NULL || getenv( "TDE_FULL_SESSION" )[ 0 ] == '\0' );
+ bool tde_running = !( getenv( "TDE_FULL_SESSION" ) == NULL || getenv( "TDE_FULL_SESSION" )[ 0 ] == '\0' );
// not the same user like the one running the session (most likely we're run via sudo or something)
if( getenv( "TDE_SESSION_UID" ) != NULL && uid_t( atoi( getenv( "TDE_SESSION_UID" ))) != getuid())
- kde_running = false;
+ tde_running = false;
// Preload kded modules.
KService::List kdedModules = KServiceType::offers("KDEDModule");
TQString version = getenv( "KDE_SESSION_VERSION" );
TQStringList blacklist;
- if ( version >= "4" )
+ if ( !(version == NULL) && version >= "4" )
{
- kdDebug(7020) << "KDE4 is running." << endl;
+ kdDebug(7020) << "KDE4 is running:" << endl;
+ kdDebug(7020) << " KDE_SESSION_VERSION: " << version << endl;
+ kdDebug(7020) << " Blacklisting mediamanager, medianotifier, kmilod, kwrited." << endl;
blacklist << "mediamanager" << "medianotifier" << "kmilod" << "kwrited";
}
for(KService::List::ConstIterator it = kdedModules.begin(); it != kdedModules.end(); ++it)
@@ -193,11 +195,11 @@ void Kded::initModules()
{
case 0: // always autoload
break;
- case 1: // autoload only in KDE
- if( !kde_running )
+ case 1: // autoload only in TDE
+ if( !tde_running )
prevent_autoload = true;
break;
- case 2: // autoload delayed, only in KDE
+ case 2: // autoload delayed, only in TDE
default:
prevent_autoload = true;
break;
@@ -207,7 +209,7 @@ void Kded::initModules()
}
else
{
- if (autoload && kde_running)
+ if (autoload && tde_running)
loadModule(service, false);
}
bool dontLoad = false;
@@ -918,7 +920,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
if (!KUniqueApplication::start())
{
- fprintf(stderr, "[kded] KDE Daemon (kded) already running.\n");
+ fprintf(stderr, "[kded] Daemon (kded) is already running.\n");
exit(0);
}