GNOME Bugzilla – Bug 524219
add bulk addition to GtkRecentManager API
Last modified: 2014-12-22 22:22:25 UTC
sometimes adding multiple URIs in one go is preferable than having multiple additions inside an idle handler. a vector based variant of gtk_recent_manager_add()/add_full() would solve this particular issue. API proposal: void gtk_recent_manager_addv (GtkRecentManager *recent_manager, gint n_uris, const gchar * const uris[]); void gtk_recent_manager_add_fullv (GtkRecentManager *recent_manager, gint n_uris, const gchar * const uris[], GtkRecentData **data); the implementation would iterate over the passed uri list and emit the ::changed signal at the end of the changes (causing the updates to be written to disk).
the add_itemv() variant should take into account the asynchronous query performed by the GIO porting in bug 506062. the add_fullv() variant is straightforward, and will attach it shortly.
Created attachment 107984 [details] [review] [PATCH] Add gtk_recent_manager_add_fullv() this patch adds the gtk_recent_manager_add_fullv() function, which can be used to add multiple items to the GtkRecentManager with a single change notification. this function is useful for applications adding many items in a single pass (e.g. when closing). gtkrecentmanager.c | 250 ++++++++++++++++++++++++++++++++++------------------- gtkrecentmanager.h | 4 2 files changed, 165 insertions(+), 89 deletions(-)
After all these years, it is perhaps not worth doing anymore