Honor local XDG autostart override through Hidden directive in desktop file

Closes bug 273


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1177236 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 14 years ago
parent 12fcd913a2
commit 3033222c21

@ -130,45 +130,45 @@ AutoStart::loadAutoStartList()
if (config.readBoolEntry("Hidden", false)) if (config.readBoolEntry("Hidden", false))
continue; continue;
#if 0
// Check to see if the most important ( usually ~/.config/autostart or ~/.kde3/Autostart) XDG directory // Check to see if the most important ( usually ~/.config/autostart or ~/.kde3/Autostart) XDG directory
// has overridden the Hidden directive and honor it if set to True // has overridden the Hidden directive and honor it if set to True
bool autostartOverriddenAndDisabled = false; bool autostartOverriddenAndDisabled = false;
for(TQStringList::ConstIterator localit = kdefiles.begin(); for(TQStringList::ConstIterator localit = files.begin();
localit != kdefiles.end(); localit != files.end();
++localit) ++localit)
{ {
// Same local file name? if (((*localit).startsWith(KGlobal::dirs()->localxdgconfdir()) == true) || ((*localit).startsWith(KGlobal::dirs()->localkdedir()) == true)) {
TQString localOuter; // Same local file name?
TQString localInner; TQString localOuter;
int slashPos = (*it).findRev( '/', -1, TRUE ); TQString localInner;
if (slashPos == -1) { int slashPos = (*it).findRev( '/', -1, TRUE );
localOuter = (*it); if (slashPos == -1) {
} localOuter = (*it);
else { }
localOuter = (*it).mid(slashPos+1); else {
} localOuter = (*it).mid(slashPos+1);
slashPos = (*localit).findRev( '/', -1, TRUE ); }
if (slashPos == -1) { slashPos = (*localit).findRev( '/', -1, TRUE );
localInner = (*localit); if (slashPos == -1) {
} localInner = (*localit);
else { }
localInner = (*localit).mid(slashPos+1); else {
} localInner = (*localit).mid(slashPos+1);
if (localOuter == localInner) { }
// Overridden! if (localOuter == localInner) {
// But is Hidden == True? // Overridden!
KDesktopFile innerConfig(*it, true); // But is Hidden == True?
if (innerConfig.readBoolEntry("Hidden", false)) { KDesktopFile innerConfig(*localit, true);
// Override confirmed; exit speedily without autostarting if (innerConfig.readBoolEntry("Hidden", false)) {
autostartOverriddenAndDisabled = true; // Override confirmed; exit speedily without autostarting
autostartOverriddenAndDisabled = true;
}
} }
} }
} }
if (autostartOverriddenAndDisabled == true) if (autostartOverriddenAndDisabled == true)
continue; continue;
#endif
if (config.hasKey("OnlyShowIn")) if (config.hasKey("OnlyShowIn"))
{ {

Loading…
Cancel
Save