app chooser: Avoid duplicates

At the time we populate the model "initially" in constructed(),
it has already been filled and cleared a couple of times (we do
that every time one of the construct properties gets set). So
we can't assume that the model is empty, and have to clear it
first. Otherwise, we add duplicates to the list.

https://bugzilla.gnome.org/show_bug.cgi?id=748080
This commit is contained in:
Matthias Clasen 2015-09-22 15:14:00 -04:00
parent 5bb9c1891c
commit 08e25b9ef7

View File

@ -813,7 +813,7 @@ gtk_app_chooser_widget_initialize_items (GtkAppChooserWidget *self)
NULL);
/* populate the widget */
gtk_app_chooser_widget_real_add_items (self);
gtk_app_chooser_refresh (GTK_APP_CHOOSER (self));
}
static void