|
|
@ -123,8 +123,14 @@ AutoStart::loadAutoStartList()
|
|
|
|
++it)
|
|
|
|
++it)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
KDesktopFile config(*it, true);
|
|
|
|
KDesktopFile config(*it, true);
|
|
|
|
|
|
|
|
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")))
|
|
|
|
if (!startCondition(config.readEntry("X-KDE-autostart-condition")))
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
if (!config.tryExec())
|
|
|
|
if (!config.tryExec())
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
if (config.readBoolEntry("Hidden", false))
|
|
|
|
if (config.readBoolEntry("Hidden", false))
|
|
|
@ -172,12 +178,12 @@ AutoStart::loadAutoStartList()
|
|
|
|
|
|
|
|
|
|
|
|
if (config.hasKey("OnlyShowIn"))
|
|
|
|
if (config.hasKey("OnlyShowIn"))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!config.readListEntry("OnlyShowIn", ';').tqcontains("KDE"))
|
|
|
|
if (!config.readListEntry("OnlyShowIn", ';').tqcontains("TDE"))
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (config.hasKey("NotShowIn"))
|
|
|
|
if (config.hasKey("NotShowIn"))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (config.readListEntry("NotShowIn", ';').tqcontains("KDE"))
|
|
|
|
if (config.readListEntry("NotShowIn", ';').tqcontains("TDE"))
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -195,15 +201,24 @@ AutoStart::loadAutoStartList()
|
|
|
|
AutoStartItem *item = new AutoStartItem;
|
|
|
|
AutoStartItem *item = new AutoStartItem;
|
|
|
|
item->name = extractName(*it);
|
|
|
|
item->name = extractName(*it);
|
|
|
|
item->service = *it;
|
|
|
|
item->service = *it;
|
|
|
|
|
|
|
|
if (config.hasKey("X-TDE-autostart-after")
|
|
|
|
|
|
|
|
item->startAfter = config.readEntry("X-TDE-autostart-after");
|
|
|
|
|
|
|
|
else
|
|
|
|
item->startAfter = config.readEntry("X-KDE-autostart-after");
|
|
|
|
item->startAfter = config.readEntry("X-KDE-autostart-after");
|
|
|
|
if( m_newStartup )
|
|
|
|
if( m_newStartup )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
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);
|
|
|
|
item->phase = config.readNumEntry("X-KDE-autostart-phase", 2);
|
|
|
|
if (item->phase < 0)
|
|
|
|
if (item->phase < 0)
|
|
|
|
item->phase = 0;
|
|
|
|
item->phase = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
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);
|
|
|
|
item->phase = config.readNumEntry("X-KDE-autostart-phase", 1);
|
|
|
|
if (item->phase < 1)
|
|
|
|
if (item->phase < 1)
|
|
|
|
item->phase = 1;
|
|
|
|
item->phase = 1;
|
|
|
|