author | harlekin <harlekin> | 2002-09-09 18:14:37 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-09-09 18:14:37 (UTC) |
commit | 3044db24e632adbcf5dbbf1874944d54cee7c8e3 (patch) (side-by-side diff) | |
tree | 9961a3531e7fd16709002f82faa7494dd3dafed3 /library | |
parent | 2e56c4b88cfb1ebdbc0d952791af48c870f9f14b (diff) | |
download | opie-3044db24e632adbcf5dbbf1874944d54cee7c8e3.zip opie-3044db24e632adbcf5dbbf1874944d54cee7c8e3.tar.gz opie-3044db24e632adbcf5dbbf1874944d54cee7c8e3.tar.bz2 |
add preloaded app control needed to runningappsbar
-rw-r--r-- | library/applnk.cpp | 23 | ||||
-rw-r--r-- | library/applnk.h | 5 |
2 files changed, 28 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 @@ -607,4 +607,27 @@ 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. diff --git a/library/applnk.h b/library/applnk.h index 18e20b6..9b5523e 100644 --- a/library/applnk.h +++ b/library/applnk.h @@ -79,4 +79,9 @@ public: QString property(const QString& key) const; +//#ifdef QTOPIA_INTERNAL_PRELOADACCESS + bool isPreloaded() const; + void setPreloaded(bool yesNo); +//#endif + protected: QString mName; |