summaryrefslogtreecommitdiff
path: root/library/applnk.cpp
authorsandman <sandman>2002-10-06 03:26:59 (UTC)
committer sandman <sandman>2002-10-06 03:26:59 (UTC)
commita1ebad08d462e682554d39a9beabce125a374452 (patch) (side-by-side diff)
tree254d7ddc5b257b278172af4952b2bec27b5df3b5 /library/applnk.cpp
parent2c16c8767fa5c16c0eeebc7008202a68a61a5308 (diff)
downloadopie-a1ebad08d462e682554d39a9beabce125a374452.zip
opie-a1ebad08d462e682554d39a9beabce125a374452.tar.gz
opie-a1ebad08d462e682554d39a9beabce125a374452.tar.bz2
- support "Rotation" setting in .desktop applnk file
- changed properties dialog to make Rotation editable - fixed a long-standing QPE bug: launcher expects AppLnk::file() to return QString::null for *all real* applnks (as opposed to doclnks) -- but AppLnk itself initializes this field to the name of the dir, where the applnk is stored. This is why qcop "QPE/System" "linkChanged(QString)" xyz.desktop cleared a whole launcher tab I hope I didn't break anything with this change ;)
Diffstat (limited to 'library/applnk.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/applnk.cpp24
1 files changed, 22 insertions, 2 deletions
diff --git a/library/applnk.cpp b/library/applnk.cpp
index 44f3f58..a56da5d 100644
--- a/library/applnk.cpp
+++ b/library/applnk.cpp
@@ -374,3 +374,6 @@ AppLnk::AppLnk( const QString &file )
mFile = config.readEntry("File", QString::null);
- if ( mFile[0] != '/' ) {
+ if ( !mExec. isEmpty ( )) {
+ mFile = QString::null;
+ }
+ else if ( mFile[0] != '/' ) {
int slash = file.findRev('/');
@@ -522,3 +525,3 @@ QString AppLnk::file() const
{
- if ( mFile.isNull() ) {
+ if ( mExec.isEmpty ( ) && mFile.isNull() ) {
AppLnk* that = (AppLnk*)this;
@@ -531,2 +534,3 @@ QString AppLnk::file() const
? mLinkFile.left(mLinkFile.length()-8) : mLinkFile;
+ qDebug("mFile now == %s", mFile.latin1());
} else if ( mType.contains('/') ) {
@@ -699,2 +703,14 @@ void AppLnk::setExec( const QString& exec )
+#if 0 // this was inlined for better BC
+/*!
+ Sets the Rotation property to \a rot.
+
+ \sa rotation()
+*/
+void AppLnk::setRotation ( const QString &rot )
+{
+ mRotation = rot;
+}
+#endif
+
/*!
@@ -837,2 +853,6 @@ void AppLnk::storeLink() const
config.writeEntry("Type",type());
+ if(!rotation().isEmpty())
+ config.writeEntry("Rotation",rotation());
+ else
+ config.removeEntry("Rotation");
if ( !mComment.isNull() ) config.writeEntry("Comment",mComment);