summaryrefslogtreecommitdiff
path: root/library/applnk.cpp
Unidiff
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
354 while (QFile::exists((nn=that->mLinkFile+"_"+QString::number(n))+".desktop")){ 354 while (QFile::exists((nn=that->mLinkFile+"_"+QString::number(n))+".desktop")){
355 n++; 355 n++;
356 AppLnk lnk(nn ); // just to be sure 356 AppLnk lnk(nn ); // just to be sure
357 if(lnk.file() ==that->file() ){ 357 if(lnk.file() ==that->file() ){
358 break; 358 break;
359 } 359 }
360 } 360 }
361 that->mLinkFile = nn; 361 that->mLinkFile = nn;
362 } 362 }
363 } 363 }
@@ -606,6 +606,29 @@ QString AppLnk::property(const QString& key) const
606} 606}
607 607
608 608
609bool AppLnk::isPreloaded() const {
610 // Preload information is stored in the Launcher config in v1.5.
611 Config cfg("Launcher");
612 cfg.setGroup("Preload");
613 QStringList apps = cfg.readListEntry("Apps",',');
614 if (apps.contains(exec()))
615 return true;
616 return false;
617}
618
619void AppLnk::setPreloaded(bool yesNo) {
620 // Preload information is stored in the Launcher config in v1.5.
621 Config cfg("Launcher");
622 cfg.setGroup("Preload");
623 QStringList apps = cfg.readListEntry("Apps", ',');
624 if (apps.contains(exec()) && !yesNo)
625 apps.remove(exec());
626 else if (yesNo && !apps.contains(exec()))
627 apps.append(exec());
628 cfg.writeEntry("Apps", apps, ',');
629}
630
631
609/*! 632/*!
610 Deletes both the linkFile() and file() associated with this AppLnk. 633 Deletes both the linkFile() and file() associated with this AppLnk.
611*/ 634*/