[gnome-calendar] calendars-page: Add already connected calendars on startup
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] calendars-page: Add already connected calendars on startup
- Date: Thu, 2 Apr 2020 02:10:24 +0000 (UTC)
commit 6586c8738c03bfa5226d1fa808b4f0932d41468d
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Wed Apr 1 21:34:09 2020 -0300
calendars-page: Add already connected calendars on startup
Fixes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/479
src/gui/calendar-management/gcal-calendars-page.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/src/gui/calendar-management/gcal-calendars-page.c
b/src/gui/calendar-management/gcal-calendars-page.c
index 960414d7..ef712a38 100644
--- a/src/gui/calendar-management/gcal-calendars-page.c
+++ b/src/gui/calendar-management/gcal-calendars-page.c
@@ -1,6 +1,6 @@
/* gcal-calendars-page.c
*
- * Copyright 2019 Georges Basile Stavracas Neto <georges stavracas gmail com>
+ * Copyright 2019-2020 Georges Basile Stavracas Neto <georges stavracas gmail com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -458,7 +458,9 @@ gcal_calendars_page_set_property (GObject *object,
{
case PROP_CONTEXT:
{
+ g_autoptr (GList) calendars = NULL;
GcalManager *manager;
+ GList *l;
self->context = g_value_dup_object (value);
g_assert (self->context != NULL);
@@ -466,6 +468,10 @@ gcal_calendars_page_set_property (GObject *object,
manager = gcal_context_get_manager (self->context);
g_signal_connect_object (manager, "calendar-added", G_CALLBACK (on_manager_calendar_added_cb),
self, 0);
g_signal_connect_object (manager, "calendar-removed", G_CALLBACK (on_manager_calendar_removed_cb),
self, 0);
+
+ calendars = gcal_manager_get_calendars (manager);
+ for (l = calendars; l; l = l->next)
+ add_calendar (self, l->data);
}
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]