[gnome-calendar/search-improvements] search-view: reset states when performs the search
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/search-improvements] search-view: reset states when performs the search
- Date: Wed, 7 Jan 2015 21:35:29 +0000 (UTC)
commit 610811c0c54123b778b723b1bb3d65bd3b9561c3
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 5692548..d5a5fd1 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]