summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--library/applnk.cpp23
-rw-r--r--library/applnk.h5
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
@@ -603,12 +603,35 @@ QString AppLnk::property(const QString& key) const
603 return QString::null; 603 return QString::null;
604 Config cfg(lf, Config::File); 604 Config cfg(lf, Config::File);
605 return cfg.readEntry(key); 605 return cfg.readEntry(key);
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*/
612void AppLnk::removeFiles() 635void AppLnk::removeFiles()
613{ 636{
614 bool valid = isValid(); 637 bool valid = isValid();
diff --git a/library/applnk.h b/library/applnk.h
index 18e20b6..9b5523e 100644
--- a/library/applnk.h
+++ b/library/applnk.h
@@ -75,12 +75,17 @@ public:
75 void setCategories( const QArray<int> &v ); 75 void setCategories( const QArray<int> &v );
76 bool writeLink() const; 76 bool writeLink() const;
77 77
78 void setProperty(const QString& key, const QString& value); 78 void setProperty(const QString& key, const QString& value);
79 QString property(const QString& key) const; 79 QString property(const QString& key) const;
80 80
81//#ifdef QTOPIA_INTERNAL_PRELOADACCESS
82 bool isPreloaded() const;
83 void setPreloaded(bool yesNo);
84//#endif
85
81protected: 86protected:
82 QString mName; 87 QString mName;
83 QPixmap mPixmap; 88 QPixmap mPixmap;
84 QPixmap mBigPixmap; 89 QPixmap mBigPixmap;
85 QString mExec; 90 QString mExec;
86 QString mType; 91 QString mType;