EggRecent

Completion: 90% done

Owners: EmmanueleBassi, FedericoMenaQuintero

Implementation: lives inside the libegg/bookmarkfile and libegg/recentchooser CVS modules.

The ouline, rationales and discussion for the implementation live inside RecentFilesAndBookmarks; this is a small recap and pending items list.

API Details

The new approach for recently used files/resources uses three objects:

EggBookmarkFile

The parser object for the storage format. It is primarily designed to access and change the desktop bookmarks file in a low-level fashion; the API is roughly modelled on the GKeyFile one. It should be included inside GLib, since it comes handy for creating and accessing each type of bookmark, as long as it's based on valid URIs: the GtkFileChooser implementations could use this object for their shortcuts, thus resolving pending issues like gnomebug:147434 and gnomebug:157377.

EggRecentManager

This is the list manager, which should be used to add new resources to the recently used resources list; look up a resource meta-data; remove a resource from the list; get the resources list. It monitors the storage file for changes and gives the user notification using its changed signal.

EggRecentChooser

This is a GTypeInterface that should be used by each widget that displays the list.

Widgets should either create their own RecentManaher instance or connect to a previously created instance. Some widgets are already implemented:

  • EggRecentChooserMenu - a GtkMenu subclass that can easily be added as a sub-menu;

  • EggRecentChooserWidget - an embeddable, tree-view like widget;

  • EggRecentChooserDialog - a dialog embedding a EggRecentChooserWidget.

Pending issues

These issues should be solved either before or after the integration inside GTK:

  • implement a EggRecentChooserButton widget;

  • integrate a EggRecentManager inside the GtkUIManager so that we can add a <recent-files/> tag inside the GtkUIManager markup and handle the display of the recently used resources list;

  • allow the creation of a single, per-session, EggRecentManager instance available to all GTK-based applications, in order to factor out the file locking issues and minimize the memory footprint of such an object;

Attic/ProjectRidley/RecentFiles (last edited 2013-11-23 01:05:07 by WilliamJonMcCann)