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 567094 - Visited and modified times for GtkRecentInfo are inaccurate
Visited and modified times for GtkRecentInfo are inaccurate
Status: RESOLVED WONTFIX
Product: gtk+
Classification: Platform
Component: Class: GtkRecent
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
Emmanuele Bassi (:ebassi)
Depends on:
Blocks:
 
 
Reported: 2009-01-08 23:08 UTC by Marina Zhurakhinskaya
Modified: 2016-04-10 16:37 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Marina Zhurakhinskaya 2009-01-08 23:08:50 UTC
While displaying recent files in gnome-shell, I noticed that visited and modified times returned by gtk_recent_info_get_visited () and gtk_recent_info_get_modified () are inaccurate. 

In particular:
 -- gtk_recent_info_get_visited () seems to always return the same time as gtk_recent_info_get_added ()
 -- gtk_recent_info_get_modified () gets updated when the file is modified, but also gets updated when the file is opened with an application, i.e. visited (though it's not updated when the file is visited once it's open within the application)
Comment 1 Matthias Clasen 2009-01-11 05:59:21 UTC
There are no calls to g_bookmark_file_set_modified or g_bookmark_file_set_visited in GTK+, and the recent manager api doesn't expose the bookmarkfile, so apps cannot do it themselves. Seems like something is missing here.
Comment 2 Emmanuele Bassi (:ebassi) 2009-02-16 18:07:28 UTC
yes. in theory, visited should only be set by applications launching the bookmarks -- as per XBEL spec. so, what was missing was a way to launch a GtkRecentInfo, like:

  gboolean gtk_recent_info_launch (GtkRecentInfo  *info,
                                   GdkScreen      *screen_or_null,
                                   const gchar    *app_name_or_null,
                                   GError        **error);

that would set the :visited value inside the GBookmarkFile. I never got around to do that, unfortunately.
Comment 3 Emmanuele Bassi (:ebassi) 2010-10-22 11:29:57 UTC
now that we have a gtk_recent_info_create_app_info() that returns a GAppInfo we can add a method on GtkRecentManager to set the :visited timestamp on a specific entry.

something like:

  void gtk_recent_manager_set_visited (GtkRecentManager *manager,
                                       const gchar      *uri);

for viewers like the Shell and the Panel; the newly added method should be called once the application has been successfully launched.
Comment 4 Emmanuele Bassi (:ebassi) 2016-04-10 16:37:45 UTC
Hasn't happened in six years.