GNOME Bugzilla – Bug 567094
Visited and modified times for GtkRecentInfo are inaccurate
Last modified: 2016-04-10 16:37:45 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)
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.
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.
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.
Hasn't happened in six years.