summaryrefslogtreecommitdiff
path: root/library/applnk.cpp
Side-by-side diff
Diffstat (limited to 'library/applnk.cpp') (more/less context) (show whitespace changes)
-rw-r--r--library/applnk.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/library/applnk.cpp b/library/applnk.cpp
index 778ccab..9498f84 100644
--- a/library/applnk.cpp
+++ b/library/applnk.cpp
@@ -603,12 +603,35 @@ QString AppLnk::property(const QString& key) const
return QString::null;
Config cfg(lf, Config::File);
return cfg.readEntry(key);
}
+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.
*/
void AppLnk::removeFiles()
{
bool valid = isValid();