[gnome-calendar] search-view: keep a cached count of results
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] search-view: keep a cached count of results
- Date: Fri, 9 Jan 2015 14:29:25 +0000 (UTC)
commit f937489dcd390e1e08a77cbc7b9eb7158bdc60aa
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sat Jan 3 23:41:48 2015 -0200
search-view: keep a cached count of results
src/gcal-search-view.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-search-view.c b/src/gcal-search-view.c
index 18bfd7e..bb45e1c 100644
--- a/src/gcal-search-view.c
+++ b/src/gcal-search-view.c
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]