summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-19 08:51:12 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-19 08:51:12 +0000
commitfea33ef237cf432e8f4b1a8336eecfccaf87edd1 (patch)
tree8377debc113dfdeac7d0e4b52cadc94426ad7d7d
parente0455e8952a8ad82686421cf6725b950e1c2bda1 (diff)
downloadtdelibs-fea33ef237cf432e8f4b1a8336eecfccaf87edd1.tar.gz
tdelibs-fea33ef237cf432e8f4b1a8336eecfccaf87edd1.zip
Added (disabled) code skeleton for eventual repair of bug 273
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1177058 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--kinit/autostart.cpp40
1 files changed, 40 insertions, 0 deletions
diff --git a/kinit/autostart.cpp b/kinit/autostart.cpp
index 63622e737..1468c4e64 100644
--- a/kinit/autostart.cpp
+++ b/kinit/autostart.cpp
@@ -130,6 +130,46 @@ 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();
+ ++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 (autostartOverriddenAndDisabled == true)
+ continue;
+#endif
+
if (config.hasKey("OnlyShowIn"))
{
if (!config.readListEntry("OnlyShowIn", ';').contains("KDE"))