From 78ebd5d8e7db8c5d816a4a17bc00eb34a0f764cc Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Mon, 9 Aug 2010 16:10:22 +0100 Subject: Execute calendar search post startup, not --- shell/e-shell-searchbar.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/shell/e-shell-searchbar.c b/shell/e-shell-searchbar.c index d1f8f65d62..a42fa18adc 100644 --- a/shell/e-shell-searchbar.c +++ b/shell/e-shell-searchbar.c @@ -1319,6 +1319,14 @@ e_shell_searchbar_set_state_group (EShellSearchbar *searchbar, g_object_notify (G_OBJECT (searchbar), "state-group"); } +static gboolean +idle_execute_search (gpointer shell_view) +{ + e_shell_view_execute_search (shell_view); + g_object_unref (shell_view); + return FALSE; +} + void e_shell_searchbar_load_state (EShellSearchbar *searchbar) { @@ -1420,9 +1428,10 @@ e_shell_searchbar_load_state (EShellSearchbar *searchbar) action = E_SHELL_WINDOW_ACTION_SEARCH_QUICK (shell_window); gtk_action_unblock_activate (action); - /* Now execute the search. */ + /* Execute the search when we have time. */ + g_object_ref (shell_view); searchbar->priv->state_dirty = FALSE; - e_shell_view_execute_search (shell_view); + g_idle_add (idle_execute_search, shell_view); } void -- cgit v1.2.3