summaryrefslogtreecommitdiff
path: root/library/applnk.cpp
Side-by-side diff
Diffstat (limited to 'library/applnk.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/applnk.cpp29
1 files changed, 26 insertions, 3 deletions
diff --git a/library/applnk.cpp b/library/applnk.cpp
index 778ccab..9498f84 100644
--- a/library/applnk.cpp
+++ b/library/applnk.cpp
@@ -354,10 +354,10 @@ QString AppLnk::linkFile() const
while (QFile::exists((nn=that->mLinkFile+"_"+QString::number(n))+".desktop")){
n++;
AppLnk lnk(nn ); // just to be sure
- if(lnk.file() ==that->file() ){
+ if(lnk.file() ==that->file() ){
break;
- }
- }
+ }
+ }
that->mLinkFile = nn;
}
}
@@ -606,6 +606,29 @@ QString AppLnk::property(const QString& key) const
}
+bool AppLnk::isPreloaded() const {
+ // Preload information is stored in the Launcher config in v1.5.
+ Config cfg("Launcher");
+ cfg.setGroup("Preload");
+ QStringList apps = cfg.readListEntry("Apps",',');
+ if (apps.contains(exec()))
+ return true;
+ return false;
+}
+
+void AppLnk::setPreloaded(bool yesNo) {
+ // Preload information is stored in the Launcher config in v1.5.
+ Config cfg("Launcher");
+ cfg.setGroup("Preload");
+ QStringList apps = cfg.readListEntry("Apps", ',');
+ if (apps.contains(exec()) && !yesNo)
+ apps.remove(exec());
+ else if (yesNo && !apps.contains(exec()))
+ apps.append(exec());
+ cfg.writeEntry("Apps", apps, ',');
+}
+
+
/*!
Deletes both the linkFile() and file() associated with this AppLnk.
*/