author | kergoth <kergoth> | 2002-01-31 18:35:48 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2002-01-31 18:35:48 (UTC) |
commit | 2802e5a2b474101a50bf95e707061ca5542876fd (patch) (unidiff) | |
tree | a1015514ef9e48df091903cccf0d3174e272f663 /core/launcher/launcherview.cpp | |
parent | 48a922e687e82dc8ebe2bc3cb17dcaa8dcae62bd (diff) | |
download | opie-2802e5a2b474101a50bf95e707061ca5542876fd.zip opie-2802e5a2b474101a50bf95e707061ca5542876fd.tar.gz opie-2802e5a2b474101a50bf95e707061ca5542876fd.tar.bz2 |
*** empty log message ***
Diffstat (limited to 'core/launcher/launcherview.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/launcher/launcherview.cpp | 27 |
1 files changed, 17 insertions, 10 deletions
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: | |||
214 | case Date: { | 214 | case Date: { |
215 | QFileInfo fa(a->linkFile()); | 215 | QFileInfo fa(a->linkFileKnown() ? a->linkFile() : a->file()); |
216 | if ( !fa.exists() ) fa.setFile(a->file()); | 216 | QFileInfo fb(b->linkFileKnown() ? b->linkFile() : b->file()); |
217 | QFileInfo fb(b->linkFile()); | ||
218 | if ( !fb.exists() ) fb.setFile(b->file()); | ||
219 | return fa.lastModified().secsTo(fb.lastModified()); | 217 | return fa.lastModified().secsTo(fb.lastModified()); |
@@ -364,2 +362,4 @@ void LauncherIconView::hideOrShowItems(bool resort) | |||
364 | } | 362 | } |
363 | bool oldAutoArrange = autoArrange(); | ||
364 | setAutoArrange( FALSE ); | ||
365 | clear(); | 365 | clear(); |
@@ -373,2 +373,3 @@ void LauncherIconView::hideOrShowItems(bool resort) | |||
373 | sort(); | 373 | sort(); |
374 | setAutoArrange( oldAutoArrange ); | ||
374 | } | 375 | } |
@@ -378,6 +379,11 @@ bool LauncherIconView::removeLink(const QString& linkfile) | |||
378 | LauncherItem* item = (LauncherItem*)firstItem(); | 379 | LauncherItem* item = (LauncherItem*)firstItem(); |
380 | AppLnk* l; | ||
381 | bool did = FALSE; | ||
382 | DocLnk dl(linkfile); | ||
379 | while (item) { | 383 | while (item) { |
380 | if ( item->appLnk()->linkFile() == linkfile ) { | 384 | l = item->appLnk(); |
385 | if ( l->linkFileKnown() && l->linkFile() == linkfile || l->file() == linkfile | ||
386 | || dl.isValid() && dl.file() == l->file() ) { | ||
381 | delete item; | 387 | delete item; |
382 | return TRUE; | 388 | did = TRUE; |
383 | } | 389 | } |
@@ -386,11 +392,12 @@ bool LauncherIconView::removeLink(const QString& linkfile) | |||
386 | QListIterator<AppLnk> it(hidden); | 392 | QListIterator<AppLnk> it(hidden); |
387 | AppLnk* l; | ||
388 | while ((l=it.current())) { | 393 | while ((l=it.current())) { |
389 | ++it; | 394 | ++it; |
390 | if ( l->linkFile() == linkfile ) { | 395 | if ( l->linkFileKnown() && l->linkFile() == linkfile |
396 | || l->file() == linkfile | ||
397 | || dl.isValid() && dl.file() == l->file() ) { | ||
391 | hidden.removeRef(l); | 398 | hidden.removeRef(l); |
392 | return TRUE; | 399 | did = TRUE; |
393 | } | 400 | } |
394 | } | 401 | } |
395 | return FALSE; | 402 | return did; |
396 | } | 403 | } |