GitLab repository storage has been migrated to hashed layout. Please contact Infrastructure team if you notice any issues with repositories or hooks.

Commit b858d45e authored by Matthias Clasen's avatar Matthias Clasen

GtkPlacesSidebar: Don't pile up duplicate bookmarks

We get multiple notifications from the bookmark manager when
something changes. Every time, we reconstruct the sidebar contents
completely, by clearing the store. The bookmarks are added with
async calls though, and the code was forgetting to cancel outstanding
async requests, leading to multiple instances of the same bookmark
getting added. Use the cancellable we already have to prevent that.

This could be made much more efficient by not recreating the entire
sidebar quite so often (3-5 times for a single bookmark rename).
parent fbad4f6c
......@@ -915,6 +915,11 @@ update_places (GtkPlacesSidebar *sidebar)
original_uri = NULL;
g_cancellable_cancel (sidebar->cancellable);
g_object_unref (sidebar->cancellable);
sidebar->cancellable = g_cancellable_new ();
gtk_list_store_clear (sidebar->store);
sidebar->devices_header_added = FALSE;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment