[gnome-calendar] window: fix calendars popover population
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] window: fix calendars popover population
- Date: Fri, 6 Feb 2015 14:27:39 +0000 (UTC)
commit 06768733f7a82c4065d88d88717ad13c2bb831cd
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Thu Feb 5 18:41:26 2015 -0500
window: fix calendars popover population
When the application load as a service by the time a user opens a window
GcalManager:source-added signals has passed and the calendars popover
does not contains any items. Use GcalManager::load_completed API
src/gcal-window.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-window.c b/src/gcal-window.c
index 3ea289f..8c33a53 100644
--- a/src/gcal-window.c
+++ b/src/gcal-window.c
@@ -1377,6 +1377,17 @@ gcal_window_constructed (GObject *object)
/* refresh timeout, first is fast */
priv->refresh_timeout_id = g_timeout_add (FAST_REFRESH_TIMEOUT, (GSourceFunc) refresh_sources, object);
+
+ /* calendars popover */
+ if (gcal_manager_load_completed (priv->manager))
+ {
+ GList *sources, *l;
+ sources = gcal_manager_get_sources_connected (priv->manager);
+ for (l = sources; l != NULL; l = g_list_next (l))
+ add_source (priv->manager, l->data, gcal_manager_source_enabled (priv->manager, l->data), object);
+
+ g_list_free (sources);
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]