summaryrefslogtreecommitdiffstats
path: root/kinit/autostart.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-05 21:23:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-05 21:23:31 +0000
commit17ee5ab4768a5e55bfa929cd7f6d20eba214740b (patch)
tree0e1ce7faa213cc656b5a93b465036152dec663f8 /kinit/autostart.cpp
parent9de10454ff386f8d2b971d6615ea6513196bfe9f (diff)
downloadtdelibs-17ee5ab4768a5e55bfa929cd7f6d20eba214740b.tar.gz
tdelibs-17ee5ab4768a5e55bfa929cd7f6d20eba214740b.zip
Honor X-TDE-* autostart entries if present
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1245190 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kinit/autostart.cpp')
-rw-r--r--kinit/autostart.cpp33
1 files changed, 24 insertions, 9 deletions
diff --git a/kinit/autostart.cpp b/kinit/autostart.cpp
index cd968c0a8..f1f84fc25 100644
--- a/kinit/autostart.cpp
+++ b/kinit/autostart.cpp
@@ -123,8 +123,14 @@ AutoStart::loadAutoStartList()
++it)
{
KDesktopFile config(*it, true);
- if (!startCondition(config.readEntry("X-KDE-autostart-condition")))
- continue;
+ if (config.hasKey("X-TDE-autostart-condition") {
+ if (!startCondition(config.readEntry("X-TDE-autostart-condition")))
+ continue;
+ }
+ else {
+ if (!startCondition(config.readEntry("X-KDE-autostart-condition")))
+ continue;
+ }
if (!config.tryExec())
continue;
if (config.readBoolEntry("Hidden", false))
@@ -172,15 +178,15 @@ AutoStart::loadAutoStartList()
if (config.hasKey("OnlyShowIn"))
{
- if (!config.readListEntry("OnlyShowIn", ';').tqcontains("KDE"))
+ if (!config.readListEntry("OnlyShowIn", ';').tqcontains("TDE"))
continue;
}
if (config.hasKey("NotShowIn"))
{
- if (config.readListEntry("NotShowIn", ';').tqcontains("KDE"))
+ if (config.readListEntry("NotShowIn", ';').tqcontains("TDE"))
continue;
}
-
+
if (config.hasKey("OnlyShowIn"))
{
if (!config.readListEntry("OnlyShowIn", ';').tqcontains("KDE"))
@@ -195,22 +201,31 @@ AutoStart::loadAutoStartList()
AutoStartItem *item = new AutoStartItem;
item->name = extractName(*it);
item->service = *it;
- item->startAfter = config.readEntry("X-KDE-autostart-after");
+ if (config.hasKey("X-TDE-autostart-after")
+ item->startAfter = config.readEntry("X-TDE-autostart-after");
+ else
+ item->startAfter = config.readEntry("X-KDE-autostart-after");
if( m_newStartup )
{
- item->phase = config.readNumEntry("X-KDE-autostart-phase", 2);
+ if (config.hasKey("X-TDE-autostart-phase")
+ item->phase = config.readNumEntry("X-TDE-autostart-phase", 2);
+ else
+ item->phase = config.readNumEntry("X-KDE-autostart-phase", 2);
if (item->phase < 0)
item->phase = 0;
}
else
{
- item->phase = config.readNumEntry("X-KDE-autostart-phase", 1);
+ if (config.hasKey("X-TDE-autostart-phase")
+ item->phase = config.readNumEntry("X-TDE-autostart-phase", 1);
+ else
+ item->phase = config.readNumEntry("X-KDE-autostart-phase", 1);
if (item->phase < 1)
item->phase = 1;
}
m_startList->append(item);
}
-}
+}
TQString
AutoStart::startService()