manager: unify completion flags

Instead of having a completion flag for GOA and calendars,
unify both of them and simplify some code.
This commit is contained in:
Georges Basile Stavracas Neto
2017-03-17 12:46:40 -03:00
parent 1d64b00df3
commit be137fca02
5 changed files with 78 additions and 73 deletions
+2 -2
View File
@@ -78,7 +78,7 @@ execute_search (GcalShellSearchProvider *search_provider)
priv = search_provider->priv;
if (!gcal_manager_load_completed (priv->manager))
if (gcal_manager_get_loading (priv->manager))
return TRUE;
zone = gcal_manager_get_system_timezone (priv->manager);
@@ -151,7 +151,7 @@ schedule_search (GcalShellSearchProvider *search_provider,
priv->pending_search->invocation = g_object_ref (invocation);
priv->pending_search->terms = g_strdupv (terms);
if (!gcal_manager_load_completed (priv->manager))
if (gcal_manager_get_loading (priv->manager))
{
priv->scheduled_search_id = g_timeout_add_seconds (1, (GSourceFunc) execute_search, search_provider);
return;