Rebase recent documents on top of ShellDocSystem

Rather of calling .exists() synchronously for all documents, use
ShellDocSystem's async API to only stat docs we're showing.

Use the doc opening functionality in ShellDocSystem.

Also, more intelligently do redisplay(); don't recreate actors
for recent docs if we already have one for that URI.  We may
need more intelligent caching here; if e.g. just the associated
application changes, we should probably reread the info.

https://bugzilla.gnome.org/show_bug.cgi?id=603522
This commit is contained in:
Colin Walters
2009-11-29 17:43:25 -05:00
parent a442dfea14
commit 949f67469c
3 changed files with 87 additions and 99 deletions

View File

@ -354,8 +354,7 @@ RecentDocsWidget.prototype = {
for (i = 0; i < docs.length; i++) {
let docInfo = new DocInfo.DocInfo (docs[i]);
if (docInfo.exists())
items.push(docInfo);
items.push(docInfo);
}
items.sort(function (a,b) { return b.timestamp - a.timestamp; });