author | kergoth <kergoth> | 2002-01-31 18:35:48 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2002-01-31 18:35:48 (UTC) |
commit | 2802e5a2b474101a50bf95e707061ca5542876fd (patch) (side-by-side diff) | |
tree | a1015514ef9e48df091903cccf0d3174e272f663 /core/launcher | |
parent | 48a922e687e82dc8ebe2bc3cb17dcaa8dcae62bd (diff) | |
download | opie-2802e5a2b474101a50bf95e707061ca5542876fd.zip opie-2802e5a2b474101a50bf95e707061ca5542876fd.tar.gz opie-2802e5a2b474101a50bf95e707061ca5542876fd.tar.bz2 |
*** empty log message ***
-rw-r--r-- | core/launcher/launcher.pro | 2 | ||||
-rw-r--r-- | core/launcher/launcherview.cpp | 27 |
2 files changed, 19 insertions, 10 deletions
diff --git a/core/launcher/launcher.pro b/core/launcher/launcher.pro index 0078faf..32cb95f 100644 --- a/core/launcher/launcher.pro +++ b/core/launcher/launcher.pro @@ -8,2 +8,3 @@ HEADERS = background.h \ desktop.h \ + qprocess.h \ info.h \ @@ -48,2 +49,3 @@ SOURCES = background.cpp \ desktop.cpp \ + qprocess.cpp qprocess_unix.cpp \ info.cpp \ diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp index ed39720..e8741a2 100644 --- a/core/launcher/launcherview.cpp +++ b/core/launcher/launcherview.cpp @@ -214,6 +214,4 @@ public: case Date: { - QFileInfo fa(a->linkFile()); - if ( !fa.exists() ) fa.setFile(a->file()); - QFileInfo fb(b->linkFile()); - if ( !fb.exists() ) fb.setFile(b->file()); + QFileInfo fa(a->linkFileKnown() ? a->linkFile() : a->file()); + QFileInfo fb(b->linkFileKnown() ? b->linkFile() : b->file()); return fa.lastModified().secsTo(fb.lastModified()); @@ -364,2 +362,4 @@ void LauncherIconView::hideOrShowItems(bool resort) } + bool oldAutoArrange = autoArrange(); + setAutoArrange( FALSE ); clear(); @@ -373,2 +373,3 @@ void LauncherIconView::hideOrShowItems(bool resort) sort(); + setAutoArrange( oldAutoArrange ); } @@ -378,6 +379,11 @@ bool LauncherIconView::removeLink(const QString& linkfile) LauncherItem* item = (LauncherItem*)firstItem(); + AppLnk* l; + bool did = FALSE; + DocLnk dl(linkfile); while (item) { - if ( item->appLnk()->linkFile() == linkfile ) { + l = item->appLnk(); + if ( l->linkFileKnown() && l->linkFile() == linkfile || l->file() == linkfile + || dl.isValid() && dl.file() == l->file() ) { delete item; - return TRUE; + did = TRUE; } @@ -386,11 +392,12 @@ bool LauncherIconView::removeLink(const QString& linkfile) QListIterator<AppLnk> it(hidden); - AppLnk* l; while ((l=it.current())) { ++it; - if ( l->linkFile() == linkfile ) { + if ( l->linkFileKnown() && l->linkFile() == linkfile + || l->file() == linkfile + || dl.isValid() && dl.file() == l->file() ) { hidden.removeRef(l); - return TRUE; + did = TRUE; } } - return FALSE; + return did; } |