Improve and fix autostart support for KDE programs. This relates to issue #283

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Signed-off-by: WJaguar <wjaguar@users.sourceforge.net>
(cherry picked from commit e5631254bf)
pull/312/head
Michele Calgaro 4 months ago
parent 66028a6198
commit 20badf1428
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -178,23 +178,14 @@ AutoStart::loadAutoStartList()
if (config.hasKey("OnlyShowIn")) if (config.hasKey("OnlyShowIn"))
{ {
#ifdef WITH_OLD_XDG_STD
if ((!config.readListEntry("OnlyShowIn", ';').contains("TDE")) && (!config.readListEntry("OnlyShowIn", ';').contains("KDE")))
continue;
#else
if (!config.readListEntry("OnlyShowIn", ';').contains("TDE")) if (!config.readListEntry("OnlyShowIn", ';').contains("TDE"))
continue; continue;
#endif
} }
if (config.hasKey("NotShowIn")) if (config.hasKey("NotShowIn"))
{ {
#ifdef WITH_OLD_XDG_STD if (config.readListEntry("NotShowIn", ';').contains("TDE") ||
if ((config.readListEntry("NotShowIn", ';').contains("TDE")) || (config.readListEntry("NotShowIn", ';').contains("KDE"))) config.readListEntry("NotShowIn", ';').contains("KDE"))
continue;
#else
if (config.readListEntry("NotShowIn", ';').contains("TDE"))
continue; continue;
#endif
} }
AutoStartItem *item = new AutoStartItem; AutoStartItem *item = new AutoStartItem;
@ -203,13 +194,13 @@ AutoStart::loadAutoStartList()
if (config.hasKey("X-TDE-autostart-after")) if (config.hasKey("X-TDE-autostart-after"))
item->startAfter = config.readEntry("X-TDE-autostart-after"); item->startAfter = config.readEntry("X-TDE-autostart-after");
else else
item->startAfter = config.readEntry("X-TDE-autostart-after"); item->startAfter = config.readEntry("X-KDE-autostart-after");
if( m_newStartup ) if( m_newStartup )
{ {
if (config.hasKey("X-TDE-autostart-phase")) if (config.hasKey("X-TDE-autostart-phase"))
item->phase = config.readNumEntry("X-TDE-autostart-phase", 2); item->phase = config.readNumEntry("X-TDE-autostart-phase", 2);
else else
item->phase = config.readNumEntry("X-TDE-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;
} }
@ -218,7 +209,7 @@ AutoStart::loadAutoStartList()
if (config.hasKey("X-TDE-autostart-phase")) if (config.hasKey("X-TDE-autostart-phase"))
item->phase = config.readNumEntry("X-TDE-autostart-phase", 1); item->phase = config.readNumEntry("X-TDE-autostart-phase", 1);
else else
item->phase = config.readNumEntry("X-TDE-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;
} }

Loading…
Cancel
Save