On 2011-05-04 at 11:15, Colin Walters wrote: > On Tue, May 3, 2011 at 10:13 PM, Federico Mena Quintero > <[email protected]> wrote: > > > > Apps which don't deal in files don't use GtkRecentManager, and *those* > > do require changes to log to Zeitgeist directly. Web browsers, IM > > clients, etc. The Zeitgeist-dataproviders are exactly this kind of > > extensions to various apps. > > What I'm saying is in the big picture the API for applications should be GTK+. > > If the design calls for apps clients to "log" something, then I think > it would make sense to have a more expansive set of "recent" than > "files" - which might include say recent notes for GNote, or recently > viewed web pages for a browser.
this is why the documentation for GtkRecentManager says "recently used resources" and not "recently used files"; it's designed around URI and not path. if it has a URI, and there is a URI handler for it, you can store it in the list. this means: no made up stuff, like "gedit:/path#line-number" or "tomboy:/note-uuid" unless it's a global URI handler - i.e. you can use gnome-open with it. > We could simply implement this as > tomboy://note-uuid1 for example, or we could add new API like > gtk_recent_manager_add_app_item () which will be defined to open your > app with the URI, and not go through the MIME system. that is already possible; it's the reason why applications have to describe themselves when adding a new item in the recently used resources list. the fact that everyone uses the MIME instead of one of the applications that registered a URI in the list is just that nobody has done it because it's easier to use the default handler for the MIME type; but you *can* get a list of applications that opened a URI, and you can get the timestamp when that happened, and the amount of times that happened. this information was added to the spec exactly because of this use case, and I think (without having seen the code) that's something Zeitgeist has been using. ciao, Emmanuele. -- W: http://www.emmanuelebassi.name B: http://blogs.gnome.org/ebassi _______________________________________________ gnome-shell-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gnome-shell-list
