search-view: keep a cached count of results

This commit is contained in:
Georges Basile Stavracas Neto
2015-01-09 08:36:15 -05:00
committed by Erick Pérez Castellanos
parent a3c12fe092
commit f937489dcd
+3
View File
@@ -35,6 +35,7 @@ typedef struct
GtkWidget *no_results_grid;
/* misc */
gint num_results;
gchar *time_mask;
gchar *date_mask;
@@ -401,6 +402,7 @@ gcal_search_view_component_added (ECalDataModelSubscriber *subscriber,
grid = make_grid_for_event (GCAL_SEARCH_VIEW (subscriber), GCAL_EVENT_WIDGET (event));
gtk_container_add (GTK_CONTAINER (priv->listbox), grid);
priv->num_results++;
}
static void
@@ -451,6 +453,7 @@ gcal_search_view_component_removed (ECalDataModelSubscriber *subscriber,
}
g_list_free (children);
priv->num_results--;
}
static void