g_hash_table_remove_all (priv->sources);
if (priv->settings != NULL) {
+ g_signal_handlers_disconnect_by_data (priv->settings, object);
g_object_unref (priv->settings);
priv->settings = NULL;
}
registry->priv->thread_closure = closure;
- registry->priv->manager_thread = g_thread_new (NULL,
+ registry->priv->manager_thread = g_thread_new (
+ NULL,
source_registry_object_manager_thread,
closure);
exit:
g_main_context_pop_thread_default (main_context);
+
+ /* Make sure the main_context doesn't have pending operations;
+ workarounds https://bugzilla.gnome.org/show_bug.cgi?id=690126 */
+ while (g_main_context_pending (main_context))
+ g_main_context_iteration (main_context, FALSE);
+
g_main_context_unref (main_context);
return success;
uid = E_SOURCE_BUILTIN_ADDRESS_BOOK_UID;
source = e_source_registry_ref_source (registry, uid);
- g_return_val_if_fail (source != NULL, NULL);
return source;
}
source = e_source_registry_ref_source (registry, uid);
g_free (uid);
- /* The built-in source is always present. */
+ /* The built-in source is present in normal EDS installations. */
if (source == NULL)
source = e_source_registry_ref_builtin_address_book (registry);
- g_return_val_if_fail (E_IS_SOURCE (source), NULL);
-
return source;
}
uid = E_SOURCE_BUILTIN_CALENDAR_UID;
source = e_source_registry_ref_source (registry, uid);
- g_return_val_if_fail (source != NULL, NULL);
return source;
}
source = e_source_registry_ref_source (registry, uid);
g_free (uid);
- /* The built-in source is always present. */
+ /* The built-in source is present in normal EDS installations. */
if (source == NULL)
source = e_source_registry_ref_builtin_calendar (registry);
- g_return_val_if_fail (E_IS_SOURCE (source), NULL);
-
return source;
}