[gnome-software] extras: Reset the state to LOADING when starting a new search



commit e1cf4caea890c30f1dddc4387c8730b066da20de
Author: Kalev Lember <kalevlember gmail com>
Date:   Mon May 11 12:40:14 2015 +0200

    extras: Reset the state to LOADING when starting a new search
    
    This ensures that we clear out any old results and start a spinner each
    time a new search comes in.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=746058

 src/gs-shell-extras.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-shell-extras.c b/src/gs-shell-extras.c
index 45d2343..41c1f43 100644
--- a/src/gs-shell-extras.c
+++ b/src/gs-shell-extras.c
@@ -676,6 +676,9 @@ gs_shell_extras_load (GsShellExtras *shell_extras, GPtrArray *array_search_data)
        /* remove old entries */
        gs_container_remove_all (GTK_CONTAINER (priv->list_box_results));
 
+       /* set state as loading */
+       priv->state = GS_SHELL_EXTRAS_STATE_LOADING;
+
        /* start new searches, separate one for each codec */
        for (i = 0; i < priv->array_search_data->len; i++) {
                SearchData *search_data;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]