summaryrefslogtreecommitdiffstats
path: root/kinit
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-19 20:27:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-19 20:27:47 +0000
commit3033222c21d070743c3153b52e38fade9769208a (patch)
tree1387a05ae5a7d3c193c2b9e822eb13350743478b /kinit
parent12fcd913a21f6f80e6945e1ce77a9051b82a5b60 (diff)
downloadtdelibs-3033222c21d070743c3153b52e38fade9769208a.tar.gz
tdelibs-3033222c21d070743c3153b52e38fade9769208a.zip
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
Diffstat (limited to 'kinit')
-rw-r--r--kinit/autostart.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/kinit/autostart.cpp b/kinit/autostart.cpp
index 1468c4e64..8c54a255c 100644
--- a/kinit/autostart.cpp
+++ b/kinit/autostart.cpp
@@ -130,45 +130,45 @@ AutoStart::loadAutoStartList()
if (config.readBoolEntry("Hidden", false))
continue;
-#if 0
// 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
bool autostartOverriddenAndDisabled = false;
- for(TQStringList::ConstIterator localit = kdefiles.begin();
- localit != kdefiles.end();
+ for(TQStringList::ConstIterator localit = files.begin();
+ localit != files.end();
++localit)
{
- // Same local file name?
- TQString localOuter;
- TQString localInner;
- int slashPos = (*it).findRev( '/', -1, TRUE );
- if (slashPos == -1) {
- localOuter = (*it);
- }
- else {
- localOuter = (*it).mid(slashPos+1);
- }
- slashPos = (*localit).findRev( '/', -1, TRUE );
- if (slashPos == -1) {
- localInner = (*localit);
- }
- else {
- localInner = (*localit).mid(slashPos+1);
- }
- if (localOuter == localInner) {
- // Overridden!
- // But is Hidden == True?
- KDesktopFile innerConfig(*it, true);
- if (innerConfig.readBoolEntry("Hidden", false)) {
- // Override confirmed; exit speedily without autostarting
- autostartOverriddenAndDisabled = true;
+ if (((*localit).startsWith(KGlobal::dirs()->localxdgconfdir()) == true) || ((*localit).startsWith(KGlobal::dirs()->localkdedir()) == true)) {
+ // Same local file name?
+ TQString localOuter;
+ TQString localInner;
+ int slashPos = (*it).findRev( '/', -1, TRUE );
+ if (slashPos == -1) {
+ localOuter = (*it);
+ }
+ else {
+ localOuter = (*it).mid(slashPos+1);
+ }
+ slashPos = (*localit).findRev( '/', -1, TRUE );
+ if (slashPos == -1) {
+ localInner = (*localit);
+ }
+ else {
+ localInner = (*localit).mid(slashPos+1);
+ }
+ if (localOuter == localInner) {
+ // Overridden!
+ // But is Hidden == True?
+ KDesktopFile innerConfig(*localit, true);
+ if (innerConfig.readBoolEntry("Hidden", false)) {
+ // Override confirmed; exit speedily without autostarting
+ autostartOverriddenAndDisabled = true;
+ }
}
}
}
if (autostartOverriddenAndDisabled == true)
continue;
-#endif
if (config.hasKey("OnlyShowIn"))
{