From gtk-devel Fri Jul 22 22:05:48 2005 From: Emmanuele Bassi Date: Fri, 22 Jul 2005 22:05:48 +0000 To: gtk-devel Subject: Re: Recent Files Manager in libegg - Take 2 Message-Id: <5e41cfd6050722150536a9742c () mail ! gmail ! com> X-MARC-Message: https://marc.info/?l=gtk-devel&m=112206997107412 Hi, On 7/22/05, Kristof Vansant wrote: > Cool :) This looks very promising. Will there be a big api change or > will it be easy to port existing apps to recent-files? I tried to keep the RecentManager API simple - in fact, similar to the RecentModel API - regarding the operations on the recently used resources list (adding, removing, getting the list). All you have to do is to fill up a RecentData struct with the MIME type of the recent file, the application's name (g_get_application_name() will be enough, if you don't want anything fancy) and a command line useful to launch the item; then, you pass this struct to the manager, along with a URI, and the item is added to the list. When you retrieve the list (or directly the data associated to a URI inside the list), you'll get a RecentInfo object, which holds the meta-data bound to an item, and has some utility functions (such as the URI/basename conversion, or the retrieval of the icon bound to the resource MIME type). As for displaying the list inside a widget, the RecentChooser interface should mask the user from actually having to deal with the RecentManager object, so that showing the recently used resources list should be painless. There are examples in the source, anyway. Regards, Emmanuele. -- Emmanuele Bassi Web site: http://log.emmanuelebassi.net _______________________________________________ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list