After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 336208 - EggRecentManager should allow overriding bookmarks filename
EggRecentManager should allow overriding bookmarks filename
Status: RESOLVED FIXED
Product: libegg
Classification: Other
Component: recent-files
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Emmanuele Bassi (:ebassi)
Libegg maintenance
Depends on:
Blocks:
 
 
Reported: 2006-03-27 16:07 UTC by Dan Winship
Modified: 2006-03-30 09:26 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Dan Winship 2006-03-27 16:07:37 UTC
There was a brief discussion on usability-list about the "recently-used
applications" code in the upcoming Novell Linux Desktop 10 main menu, and
possibly adding something similar to upstream GNOME. qv:
http://mail.gnome.org/archives/usability/2006-March/msg00215.html

As mentioned there, this is currently implemented using a hacked version
of EggRecentModel that lets you specify the name of the recently-used file,
so we can have separate recently-used-documents and recently-used-apps lists.
It would be nice to get that feature into the version of EggRecentManager
that's going into gtk+ 2.10.

(I was going to attach our patch, but it wouldn't apply against EggRecentManager,
and it's sort of ugly and wrong, and it's not like it's terribly complicated
anyway.)
Comment 1 Emmanuele Bassi (:ebassi) 2006-03-27 16:47:23 UTC
since the code can filter out the application launchers pretty well, compared to egg-recent-model filtering functions, I'm not entirely convinced that keeping the recently used applications, files and documents (differences between "files" and "documents"?) physically separated into their own files is the right approach. all in all, is just a matter of filtering on a pattern ("*.desktop"), a group ("Launchers") or a MIME type ("application/x-desktop").

anyway, adding a (constructor-only) "filename" property to the RecentManager wouldn't require many changes.
Comment 2 Emmanuele Bassi (:ebassi) 2006-03-27 16:48:59 UTC
obviously, the menu applet would have to save each .desktop file it launches, using the right MIME type, the right group and the right name.
Comment 3 Dan Winship 2006-03-27 17:13:44 UTC
Sure, it would be easy for the main menu to filter only the things it wants, the trick would be that the recent documents code would also have to filter those same things *out* of its list so that you didn't end up with applications in the Recent Files menu.

(For adding things to the recent-apps list, I'm pretty sure the only change we needed to make was to patch gnome_desktop_item_launch().)
Comment 4 Emmanuele Bassi (:ebassi) 2006-03-27 17:32:36 UTC
okay, I'm much more convinced. :-)

is using something like:

  manager = g_object_new (GTK_TYPE_RECENT_MANAGER,
                          "filename", recent_apps_file,
                          NULL);

enough or should I add a specific function, like:

  GtkRecentManager *gtk_recent_manager_for_file (const gchar *filename);
Comment 5 Dan Winship 2006-03-27 18:15:08 UTC
The former is probably fine. If people suddenly come up with tons of other use cases where we want additional recently-used lists, you could always add the explicit constructor later.
Comment 6 Matthias Clasen 2006-03-28 18:17:24 UTC
A construct-only property sounds like a fine approach to me.
Comment 7 Emmanuele Bassi (:ebassi) 2006-03-30 09:26:55 UTC
The GtkRecentManager in HEAD has the "filename" constructor-only property.