[gnome-calendar] search-view: reset states when performs the search
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] search-view: reset states when performs the search
- Date: Fri, 9 Jan 2015 14:33:40 +0000 (UTC)
commit 8933b1485a2e67e51c5b8771fbeb90c6e1bbcb84
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Wed Jan 7 19:35:21 2015 -0200
search-view: reset states when performs the search
Also, reset search when starting a new search from window.
src/gcal-search-view.c | 3 +++
src/gcal-window.c | 5 +----
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/gcal-search-view.c b/src/gcal-search-view.c
index cc5fbe4..2289874 100644
--- a/src/gcal-search-view.c
+++ b/src/gcal-search-view.c
@@ -792,6 +792,9 @@ gcal_search_view_search (GcalSearchView *view,
priv->query = g_strdup (query);
priv->field = g_strdup (field);
+ gtk_widget_show (priv->scrolled_window);
+ gtk_widget_hide (priv->no_results_grid);
+
/* Only perform search on valid non-empty strings */
if (query && g_utf8_strlen (query, -1) > 0)
{
diff --git a/src/gcal-window.c b/src/gcal-window.c
index 9b7d465..3881d52 100644
--- a/src/gcal-window.c
+++ b/src/gcal-window.c
@@ -529,10 +529,6 @@ search_view_closed (GtkPopover *popover,
priv = gcal_window_get_instance_private (GCAL_WINDOW (user_data));
- /* XXX: this is the destruction process */
- if (!gtk_widget_get_visible (priv->views_stack))
- return;
-
gtk_header_bar_set_custom_title (GTK_HEADER_BAR (priv->header_bar), priv->views_switcher);
}
@@ -1044,6 +1040,7 @@ search_toggled (GObject *object,
/* update header_bar widget */
gtk_header_bar_set_custom_title (GTK_HEADER_BAR (priv->header_bar), NULL);
+ gcal_search_view_search (GCAL_SEARCH_VIEW (priv->views[GCAL_WINDOW_VIEW_SEARCH]), NULL, NULL);
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]