Package: src:almanah Version: 0.11.1-2 Severity: wishlist Tags: patch upstream
Control: block 933577 by -1 Hi, This is in experimental-NEW at the minute, but you can grab the packages out of evolution-data-server Vcs-Git to test this. tl;dr is that ecal broke API with this release. There are patches upstream which I grabbed and applied to the Debian package (untested though). Diff attached for you to review. If you wanted to upload to experimental now that would be OK, or you can wait until we're ready to go to unstable - at which point I'll raise the severity of this bug. Cheers, -- Iain Lane [ i...@orangesquash.org.uk ] Debian Developer [ la...@debian.org ] Ubuntu Developer [ la...@ubuntu.com ]
diff -Nru almanah-0.11.1/debian/changelog almanah-0.11.1/debian/changelog --- almanah-0.11.1/debian/changelog 2018-03-26 17:21:29.000000000 +0100 +++ almanah-0.11.1/debian/changelog 2019-08-01 17:21:20.000000000 +0100 @@ -1,3 +1,18 @@ +almanah (0.11.1-2.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * events-Removed-Evolution-runtime-dependency.patch, + trivial-Fixed-indentation.patch, + event-factories-Port-to-libecal-2.0.patch, + data-Updated-the-AppData-format.patch, + Update-the-AppData-file-to-version-0.7.patch, + Add-a-missing-tag-to-the-AppData-file.patch, + libecal-2.0: + Backport a load of patches from upstream to enable building against + libecal-2.0. + + -- Iain Lane <la...@debian.org> Thu, 01 Aug 2019 17:21:20 +0100 + almanah (0.11.1-2) unstable; urgency=medium * Increase Priority to optional. Priority: extra is deprecated diff -Nru almanah-0.11.1/debian/control almanah-0.11.1/debian/control --- almanah-0.11.1/debian/control 2018-01-05 08:46:04.000000000 +0000 +++ almanah-0.11.1/debian/control 2019-08-01 16:56:47.000000000 +0100 @@ -2,15 +2,17 @@ Section: gnome Priority: optional Maintainer: Angel Abad <an...@debian.org> -Build-Depends: debhelper (>= 9), - autotools-dev, +Build-Depends: appstream-util, + debhelper (>= 9), + dh-autoreconf, + gnome-common, intltool (>= 0.35.0), libglib2.0-dev, libgtk-3-dev (>= 3.5.6), libsqlite3-dev, libcryptui-dev (>= 3.0.0), libgpgme11-dev, - libecal1.2-dev (>= 3.6.0), + libecal2.0-dev, libedataserver1.2-dev (>= 3.6.0), libgtkspell3-3-dev Standards-Version: 3.9.6 diff -Nru almanah-0.11.1/debian/patches/Add-a-missing-tag-to-the-AppData-file.patch almanah-0.11.1/debian/patches/Add-a-missing-tag-to-the-AppData-file.patch --- almanah-0.11.1/debian/patches/Add-a-missing-tag-to-the-AppData-file.patch 1970-01-01 01:00:00.000000000 +0100 +++ almanah-0.11.1/debian/patches/Add-a-missing-tag-to-the-AppData-file.patch 2019-08-01 17:11:39.000000000 +0100 @@ -0,0 +1,22 @@ +From 9c94abafe29415dbac1b6460af17c5af254e5859 Mon Sep 17 00:00:00 2001 +From: Richard Hughes <rich...@hughsie.com> +Date: Mon, 25 Jan 2016 15:12:21 +0000 +Subject: [PATCH] Add a missing tag to the AppData file + +--- + data/almanah.appdata.xml.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/data/almanah.appdata.xml.in b/data/almanah.appdata.xml.in +index df93a75..d50f20c 100644 +--- a/data/almanah.appdata.xml.in ++++ b/data/almanah.appdata.xml.in +@@ -31,4 +31,5 @@ + <kudo>AppMenu</kudo> + <kudo>ModernToolkit</kudo> + </kudos> ++ <translation type="gettext">almanah</translation> + </component> +-- +2.20.1 + diff -Nru almanah-0.11.1/debian/patches/data-Updated-the-AppData-format.patch almanah-0.11.1/debian/patches/data-Updated-the-AppData-format.patch --- almanah-0.11.1/debian/patches/data-Updated-the-AppData-format.patch 1970-01-01 01:00:00.000000000 +0100 +++ almanah-0.11.1/debian/patches/data-Updated-the-AppData-format.patch 2019-08-01 17:13:02.000000000 +0100 @@ -0,0 +1,26 @@ +From 45971f9b492b366989ae0afd89243218be9b5fb1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=C3=81lvaro=20Pe=C3=B1a?= <alvar...@gmail.com> +Date: Sat, 7 Mar 2015 20:54:43 +0100 +Subject: [PATCH] data: Updated the AppData format + +Included the fields "name" and "summary". +--- + data/almanah.appdata.xml.in | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/data/almanah.appdata.xml.in b/data/almanah.appdata.xml.in +index 17a0a7d..31db07d 100644 +--- a/data/almanah.appdata.xml.in ++++ b/data/almanah.appdata.xml.in +@@ -4,6 +4,8 @@ + <id type="desktop">almanah.desktop</id> + <metadata_license>CC0-1.0</metadata_license> + <project_license>GPL-3.0+</project_license> ++ <name>Almanah Diary</name> ++ <_summary>Keep a diary of your life</_summary> + <description> + <_p> + Almanah Diary is an application to allow you to keep a diary of your life. +-- +2.20.1 + diff -Nru almanah-0.11.1/debian/patches/event-factories-Port-to-libecal-2.0.patch almanah-0.11.1/debian/patches/event-factories-Port-to-libecal-2.0.patch --- almanah-0.11.1/debian/patches/event-factories-Port-to-libecal-2.0.patch 1970-01-01 01:00:00.000000000 +0100 +++ almanah-0.11.1/debian/patches/event-factories-Port-to-libecal-2.0.patch 2019-08-01 16:52:27.000000000 +0100 @@ -0,0 +1,821 @@ +From cb11d217448161562ae6eb4b94d01186e89b275f Mon Sep 17 00:00:00 2001 +From: Milan Crha <mc...@redhat.com> +Date: Fri, 17 May 2019 12:22:09 +0200 +Subject: [PATCH] event-factories: Port to libecal-2.0 + +Closes https://gitlab.gnome.org/GNOME/almanah/merge_requests/3 +--- + src/event-factories/calendar-client.c | 452 ++++++++++++------------- + src/event-factories/calendar-sources.c | 11 +- + 3 files changed, 227 insertions(+), 238 deletions(-) + +Index: b/src/event-factories/calendar-client.c +=================================================================== +--- a/src/event-factories/calendar-client.c ++++ b/src/event-factories/calendar-client.c +@@ -80,7 +80,7 @@ + GSList *appointment_sources; + GSList *task_sources; + +- icaltimezone *zone; ++ ICalTimezone *zone; + + GFileMonitor *tz_monitor; + +@@ -229,17 +229,17 @@ + 0); + } + +-static icaltimezone * ++static ICalTimezone * + calendar_client_config_get_icaltimezone (void) + { + char *location; +- icaltimezone *zone = NULL; ++ ICalTimezone *zone = NULL; + + location = e_cal_util_get_system_timezone_location (); + if (!location) +- return icaltimezone_get_utc_timezone (); ++ return i_cal_timezone_get_utc_timezone (); + +- zone = icaltimezone_get_builtin_timezone (location); ++ zone = i_cal_timezone_get_builtin_timezone (location); + g_free (location); + + return zone; +@@ -272,51 +272,6 @@ + } + + static void +-cal_opened_cb (GObject *source_object, +- GAsyncResult *result, +- gpointer user_data) +-{ +- EClient *ecal = E_CLIENT (source_object); +- CalendarClientSource *cl_source = user_data; +- ECalClientSourceType s_type; +- CalendarClient *client = cl_source->client; +- GError *error = NULL; +- +- e_client_open_finish (ecal, result, &error); +- +- s_type = e_cal_client_get_source_type (E_CAL_CLIENT (ecal)); +- +- if (g_error_matches (error, E_CLIENT_ERROR, E_CLIENT_ERROR_BUSY) && +- !e_client_is_opened (ecal)) +- { +- g_clear_error (&error); +- e_client_open (ecal, TRUE, NULL, cal_opened_cb, cl_source); +- return; +- } +- +- if (error) +- { +- if (s_type == E_CAL_CLIENT_SOURCE_TYPE_EVENTS) +- client->priv->appointment_sources = g_slist_remove (client->priv->appointment_sources, +- cl_source); +- else +- client->priv->task_sources = g_slist_remove (client->priv->task_sources, +- cl_source); +- +- calendar_client_source_finalize (cl_source); +- g_free (cl_source); +- +- g_clear_error (&error); +- return; +- } +- +- if (s_type == E_CAL_CLIENT_SOURCE_TYPE_EVENTS) +- calendar_client_update_appointments (client); +- else +- calendar_client_update_tasks (client); +-} +- +-static void + load_calendars (CalendarClient *client, + CalendarEventType type) + { +@@ -337,15 +292,12 @@ + + for (l = clients; l != NULL; l = l->next) + { +- EClient *ecal; + CalendarClientSource *cl_source = l->data; + +- ecal = E_CLIENT (cl_source->cal_client); +- +- if (e_client_is_opened (ecal)) +- continue; +- +- e_client_open (ecal, TRUE, NULL, cal_opened_cb, cl_source); ++ if (type == CALENDAR_EVENT_APPOINTMENT) ++ calendar_client_update_appointments (cl_source->client); ++ else ++ calendar_client_update_tasks (cl_source->client); + } + } + +@@ -523,113 +475,129 @@ + } + + static time_t +-get_time_from_property (icalcomponent *ical, +- icalproperty_kind prop_kind, +- struct icaltimetype (* get_prop_func) (const icalproperty *prop), +- icaltimezone *default_zone) +-{ +- icalproperty *prop; +- struct icaltimetype ical_time; +- icalparameter *param; +- icaltimezone *time_zone = NULL; ++get_time_from_property (ICalComponent *ical, ++ ICalPropertyKind prop_kind, ++ ICalTime * (* get_prop_func) (ICalProperty *prop), ++ ICalTimezone *default_zone) ++{ ++ ICalProperty *prop; ++ ICalTime *ical_time; ++ ICalParameter *param; ++ ICalTimezone *time_zone = NULL; ++ time_t retval; + +- prop = icalcomponent_get_first_property (ical, prop_kind); ++ prop = i_cal_component_get_first_property (ical, prop_kind); + if (!prop) + return 0; + + ical_time = get_prop_func (prop); + +- param = icalproperty_get_first_parameter (prop, ICAL_TZID_PARAMETER); ++ param = i_cal_property_get_first_parameter (prop, I_CAL_TZID_PARAMETER); + if (param) +- time_zone = icaltimezone_get_builtin_timezone_from_tzid (icalparameter_get_tzid (param)); +- else if (icaltime_is_utc (ical_time)) +- time_zone = icaltimezone_get_utc_timezone (); ++ time_zone = i_cal_timezone_get_builtin_timezone_from_tzid (i_cal_parameter_get_tzid (param)); ++ else if (i_cal_time_is_utc (ical_time)) ++ time_zone = i_cal_timezone_get_utc_timezone (); + else + time_zone = default_zone; + +- return icaltime_as_timet_with_zone (ical_time, time_zone); ++ retval = i_cal_time_as_timet_with_zone (ical_time, time_zone); ++ ++ g_clear_object (&ical_time); ++ g_clear_object (¶m); ++ g_clear_object (&prop); ++ ++ return retval; + } + + static char * +-get_ical_uid (icalcomponent *ical) ++get_ical_uid (ICalComponent *ical) + { +- return g_strdup (icalcomponent_get_uid (ical)); ++ return g_strdup (i_cal_component_get_uid (ical)); + } + + static char * +-get_ical_rid (icalcomponent *ical) ++get_ical_rid (ICalComponent *ical) + { +- icalproperty *prop; +- struct icaltimetype ical_time; +- +- prop = icalcomponent_get_first_property (ical, ICAL_RECURRENCEID_PROPERTY); +- if (!prop) +- return NULL; +- +- ical_time = icalproperty_get_recurrenceid (prop); +- +- return icaltime_is_valid_time (ical_time) && !icaltime_is_null_time (ical_time) ? +- g_strdup (icaltime_as_ical_string (ical_time)) : NULL; ++ return e_cal_util_component_get_recurid_as_string (ical); + } + + static char * +-get_ical_summary (icalcomponent *ical) ++get_ical_summary (ICalComponent *ical) + { +- icalproperty *prop; ++ ICalProperty *prop; ++ char *retval; + +- prop = icalcomponent_get_first_property (ical, ICAL_SUMMARY_PROPERTY); ++ prop = i_cal_component_get_first_property (ical, I_CAL_SUMMARY_PROPERTY); + if (!prop) + return NULL; + +- return g_strdup (icalproperty_get_summary (prop)); ++ retval = g_strdup (i_cal_property_get_summary (prop)); ++ ++ g_object_unref (prop); ++ ++ return retval; + } + + static char * +-get_ical_description (icalcomponent *ical) ++get_ical_description (ICalComponent *ical) + { +- icalproperty *prop; ++ ICalProperty *prop; ++ char *retval; + +- prop = icalcomponent_get_first_property (ical, ICAL_DESCRIPTION_PROPERTY); ++ prop = i_cal_component_get_first_property (ical, I_CAL_DESCRIPTION_PROPERTY); + if (!prop) + return NULL; + +- return g_strdup (icalproperty_get_description (prop)); ++ retval = g_strdup (i_cal_property_get_description (prop)); ++ ++ g_object_unref (prop); ++ ++ return retval; + } + + static inline time_t +-get_ical_start_time (icalcomponent *ical, +- icaltimezone *default_zone) ++get_ical_start_time (ICalComponent *ical, ++ ICalTimezone *default_zone) + { + return get_time_from_property (ical, +- ICAL_DTSTART_PROPERTY, +- icalproperty_get_dtstart, ++ I_CAL_DTSTART_PROPERTY, ++ i_cal_property_get_dtstart, + default_zone); + } + + static inline time_t +-get_ical_end_time (icalcomponent *ical, +- icaltimezone *default_zone) ++get_ical_end_time (ICalComponent *ical, ++ ICalTimezone *default_zone) + { + return get_time_from_property (ical, +- ICAL_DTEND_PROPERTY, +- icalproperty_get_dtend, ++ I_CAL_DTEND_PROPERTY, ++ i_cal_property_get_dtend, + default_zone); + } + + static gboolean +-get_ical_is_all_day (icalcomponent *ical, ++get_ical_is_all_day (ICalComponent *ical, + time_t start_time, +- icaltimezone *default_zone) ++ ICalTimezone *default_zone) + { +- icalproperty *prop; +- struct tm *start_tm; +- time_t end_time; +- struct icaldurationtype duration; +- struct icaltimetype start_icaltime; ++ ICalProperty *prop; ++ struct tm *start_tm; ++ time_t end_time; ++ ICalDuration *duration; ++ ICalTime *start_icaltime; ++ gboolean retval; + +- start_icaltime = icalcomponent_get_dtstart (ical); +- if (start_icaltime.is_date) +- return TRUE; ++ start_icaltime = i_cal_component_get_dtstart (ical); ++ if (!start_icaltime) ++ return FALSE; ++ ++ if (i_cal_time_is_date (start_icaltime)) ++ { ++ g_object_unref (start_icaltime); ++ return TRUE; ++ } ++ ++ g_clear_object (&start_icaltime); + + start_tm = gmtime (&start_time); + if (start_tm->tm_sec != 0 || +@@ -640,69 +608,80 @@ + if ((end_time = get_ical_end_time (ical, default_zone))) + return (end_time - start_time) % 86400 == 0; + +- prop = icalcomponent_get_first_property (ical, ICAL_DURATION_PROPERTY); ++ prop = i_cal_component_get_first_property (ical, I_CAL_DURATION_PROPERTY); + if (!prop) + return FALSE; + +- duration = icalproperty_get_duration (prop); ++ duration = i_cal_property_get_duration (prop); + +- return icaldurationtype_as_int (duration) % 86400 == 0; ++ retval = i_cal_duration_as_int (duration) % 86400 == 0; ++ ++ g_object_unref (duration); ++ g_object_unref (prop); ++ ++ return retval; + } + + static inline time_t +-get_ical_due_time (icalcomponent *ical, +- icaltimezone *default_zone) ++get_ical_due_time (ICalComponent *ical, ++ ICalTimezone *default_zone) + { + return get_time_from_property (ical, +- ICAL_DUE_PROPERTY, +- icalproperty_get_due, ++ I_CAL_DUE_PROPERTY, ++ i_cal_property_get_due, + default_zone); + } + + static guint +-get_ical_percent_complete (icalcomponent *ical) ++get_ical_percent_complete (ICalComponent *ical) + { +- icalproperty *prop; +- icalproperty_status status; ++ ICalProperty *prop; ++ ICalPropertyStatus status; + int percent_complete; + +- status = icalcomponent_get_status (ical); +- if (status == ICAL_STATUS_COMPLETED) ++ status = i_cal_component_get_status (ical); ++ if (status == I_CAL_STATUS_COMPLETED) + return 100; + +- prop = icalcomponent_get_first_property (ical, ICAL_COMPLETED_PROPERTY); +- if (prop) ++ if (e_cal_util_component_has_property (ical, I_CAL_COMPLETED_PROPERTY)) + return 100; + +- prop = icalcomponent_get_first_property (ical, ICAL_PERCENTCOMPLETE_PROPERTY); ++ prop = i_cal_component_get_first_property (ical, I_CAL_PERCENTCOMPLETE_PROPERTY); + if (!prop) + return 0; + +- percent_complete = icalproperty_get_percentcomplete (prop); ++ percent_complete = i_cal_property_get_percentcomplete (prop); ++ ++ g_object_unref (prop); + + return CLAMP (percent_complete, 0, 100); + } + + static inline time_t +-get_ical_completed_time (icalcomponent *ical, +- icaltimezone *default_zone) ++get_ical_completed_time (ICalComponent *ical, ++ ICalTimezone *default_zone) + { + return get_time_from_property (ical, +- ICAL_COMPLETED_PROPERTY, +- icalproperty_get_completed, ++ I_CAL_COMPLETED_PROPERTY, ++ i_cal_property_get_completed, + default_zone); + } + + static int +-get_ical_priority (icalcomponent *ical) ++get_ical_priority (ICalComponent *ical) + { +- icalproperty *prop; ++ ICalProperty *prop; ++ int retval; + +- prop = icalcomponent_get_first_property (ical, ICAL_PRIORITY_PROPERTY); ++ prop = i_cal_component_get_first_property (ical, I_CAL_PRIORITY_PROPERTY); + if (!prop) + return -1; + +- return icalproperty_get_priority (prop); ++ retval = i_cal_property_get_priority (prop); ++ ++ g_object_unref (prop); ++ ++ return retval; + } + + static char * +@@ -827,9 +806,9 @@ + + static void + calendar_appointment_init (CalendarAppointment *appointment, +- icalcomponent *ical, ++ ICalComponent *ical, + CalendarClientSource *source, +- icaltimezone *default_zone) ++ ICalTimezone *default_zone) + { + appointment->uid = get_ical_uid (ical); + appointment->rid = get_ical_rid (ical); +@@ -844,34 +823,38 @@ + default_zone); + } + +-static icaltimezone * ++static ICalTimezone * + resolve_timezone_id (const char *tzid, +- gpointer user_data) ++ gpointer user_data, ++ GCancellable *cancellable, ++ GError **error) + { +- icaltimezone *retval; ++ ICalTimezone *retval; + ECalClient *source = user_data; + +- retval = icaltimezone_get_builtin_timezone_from_tzid (tzid); ++ retval = i_cal_timezone_get_builtin_timezone_from_tzid (tzid); + if (!retval) + { +- e_cal_client_get_timezone_sync (source, tzid, &retval, NULL, NULL); ++ retval = e_cal_client_tzlookup_cb (tzid, source, cancellable, error); + } + + return retval; + } + + static gboolean +-calendar_appointment_collect_occurrence (ECalComponent *component, +- time_t occurrence_start, +- time_t occurrence_end, +- gpointer data) ++calendar_appointment_collect_occurrence (ICalComponent *component, ++ ICalTime *occurrence_start, ++ ICalTime *occurrence_end, ++ gpointer data, ++ GCancellable *cancellable, ++ GError **error) + { + CalendarOccurrence *occurrence; + GSList **collect_loc = data; + + occurrence = g_new0 (CalendarOccurrence, 1); +- occurrence->start_time = occurrence_start; +- occurrence->end_time = occurrence_end; ++ occurrence->start_time = i_cal_time_as_timet (occurrence_start); ++ occurrence->end_time = i_cal_time_as_timet (occurrence_end); + + *collect_loc = g_slist_prepend (*collect_loc, occurrence); + +@@ -880,30 +863,32 @@ + + static void + calendar_appointment_generate_ocurrences (CalendarAppointment *appointment, +- icalcomponent *ical, ++ ICalComponent *ical, + ECalClient *source, + time_t start, + time_t end, +- icaltimezone *default_zone) ++ ICalTimezone *default_zone) + { +- ECalComponent *ecal; ++ ICalTime *interval_start, *interval_end; + + g_assert (appointment->occurrences == NULL); + +- ecal = e_cal_component_new (); +- e_cal_component_set_icalcomponent (ecal, +- icalcomponent_new_clone (ical)); +- +- e_cal_recur_generate_instances (ecal, +- start, +- end, +- calendar_appointment_collect_occurrence, +- &appointment->occurrences, +- resolve_timezone_id, +- source, +- default_zone); ++ interval_start = i_cal_time_new_from_timet_with_zone (start, FALSE, NULL); ++ interval_end = i_cal_time_new_from_timet_with_zone (end, FALSE, NULL); + +- g_object_unref (ecal); ++ e_cal_recur_generate_instances_sync (ical, ++ interval_start, ++ interval_end, ++ calendar_appointment_collect_occurrence, ++ &appointment->occurrences, ++ resolve_timezone_id, ++ source, ++ default_zone, ++ NULL, ++ NULL); ++ ++ g_clear_object (&interval_start); ++ g_clear_object (&interval_end); + + appointment->occurrences = g_slist_reverse (appointment->occurrences); + } +@@ -962,9 +947,9 @@ + + static void + calendar_task_init (CalendarTask *task, +- icalcomponent *ical, ++ ICalComponent *ical, + CalendarClientSource *source, +- icaltimezone *default_zone) ++ ICalTimezone *default_zone) + { + task->uid = get_ical_uid (ical); + task->summary = get_ical_summary (ical); +@@ -998,57 +983,57 @@ + } + + static CalendarEvent * +-calendar_event_new (icalcomponent *ical, ++calendar_event_new (ICalComponent *ical, + CalendarClientSource *source, +- icaltimezone *default_zone) ++ ICalTimezone *default_zone) + { + CalendarEvent *event; + + event = g_new0 (CalendarEvent, 1); + +- switch (icalcomponent_isa (ical)) ++ switch (i_cal_component_isa (ical)) + { +- case ICAL_VEVENT_COMPONENT: ++ case I_CAL_VEVENT_COMPONENT: + event->type = CALENDAR_EVENT_APPOINTMENT; + calendar_appointment_init (CALENDAR_APPOINTMENT (event), + ical, + source, + default_zone); + break; +- case ICAL_VTODO_COMPONENT: ++ case I_CAL_VTODO_COMPONENT: + event->type = CALENDAR_EVENT_TASK; + calendar_task_init (CALENDAR_TASK (event), + ical, + source, + default_zone); + break; +- case ICAL_NO_COMPONENT: +- case ICAL_ANY_COMPONENT: +- case ICAL_XROOT_COMPONENT: +- case ICAL_XATTACH_COMPONENT: +- case ICAL_VJOURNAL_COMPONENT: +- case ICAL_VCALENDAR_COMPONENT: +- case ICAL_VAGENDA_COMPONENT: +- case ICAL_VFREEBUSY_COMPONENT: +- case ICAL_VALARM_COMPONENT: +- case ICAL_XAUDIOALARM_COMPONENT: +- case ICAL_XDISPLAYALARM_COMPONENT: +- case ICAL_XEMAILALARM_COMPONENT: +- case ICAL_XPROCEDUREALARM_COMPONENT: +- case ICAL_VTIMEZONE_COMPONENT: +- case ICAL_XSTANDARD_COMPONENT: +- case ICAL_XDAYLIGHT_COMPONENT: +- case ICAL_X_COMPONENT: +- case ICAL_VSCHEDULE_COMPONENT: +- case ICAL_VQUERY_COMPONENT: +- case ICAL_VREPLY_COMPONENT: +- case ICAL_VCAR_COMPONENT: +- case ICAL_VCOMMAND_COMPONENT: +- case ICAL_XLICINVALID_COMPONENT: +- case ICAL_XLICMIMEPART_COMPONENT: ++ case I_CAL_NO_COMPONENT: ++ case I_CAL_ANY_COMPONENT: ++ case I_CAL_XROOT_COMPONENT: ++ case I_CAL_XATTACH_COMPONENT: ++ case I_CAL_VJOURNAL_COMPONENT: ++ case I_CAL_VCALENDAR_COMPONENT: ++ case I_CAL_VAGENDA_COMPONENT: ++ case I_CAL_VFREEBUSY_COMPONENT: ++ case I_CAL_VALARM_COMPONENT: ++ case I_CAL_XAUDIOALARM_COMPONENT: ++ case I_CAL_XDISPLAYALARM_COMPONENT: ++ case I_CAL_XEMAILALARM_COMPONENT: ++ case I_CAL_XPROCEDUREALARM_COMPONENT: ++ case I_CAL_VTIMEZONE_COMPONENT: ++ case I_CAL_XSTANDARD_COMPONENT: ++ case I_CAL_XDAYLIGHT_COMPONENT: ++ case I_CAL_X_COMPONENT: ++ case I_CAL_VSCHEDULE_COMPONENT: ++ case I_CAL_VQUERY_COMPONENT: ++ case I_CAL_VREPLY_COMPONENT: ++ case I_CAL_VCAR_COMPONENT: ++ case I_CAL_VCOMMAND_COMPONENT: ++ case I_CAL_XLICINVALID_COMPONENT: ++ case I_CAL_XLICMIMEPART_COMPONENT: + default: + g_warning ("Unknown calendar component type: %d\n", +- icalcomponent_isa (ical)); ++ i_cal_component_isa (ical)); + g_free (event); + return NULL; + } +@@ -1140,11 +1125,11 @@ + + static void + calendar_event_generate_ocurrences (CalendarEvent *event, +- icalcomponent *ical, ++ ICalComponent *ical, + ECalClient *source, + time_t start, + time_t end, +- icaltimezone *default_zone) ++ ICalTimezone *default_zone) + { + if (event->type != CALENDAR_EVENT_APPOINTMENT) + return; +@@ -1337,7 +1322,7 @@ + { + CalendarEvent *event; + CalendarEvent *old_event; +- icalcomponent *ical = l->data; ++ ICalComponent *ical = l->data; + char *uid; + + event = calendar_event_new (ical, source, client->priv->zone); +@@ -1416,13 +1401,14 @@ + { + CalendarEvent *event; + ECalComponentId *id = l->data; +- char *uid = g_strdup_printf ("%s%s", id->uid, id->rid ? id->rid : ""); ++ char *uid = g_strdup_printf ("%s%s", e_cal_component_id_get_uid (id), ++ e_cal_component_id_get_rid (id) ? e_cal_component_id_get_rid (id) : ""); + +- if (!id->rid || !(*id->rid)) ++ if (!e_cal_component_id_get_rid (id) || !(e_cal_component_id_get_rid (id)[0])) + { + unsigned int size = g_hash_table_size (query->events); + +- g_hash_table_foreach_remove (query->events, check_object_remove, id->uid); ++ g_hash_table_foreach_remove (query->events, check_object_remove, (gpointer) e_cal_component_id_get_uid (id)); + + if (size != g_hash_table_size (query->events)) + events_changed = TRUE; +@@ -1560,9 +1546,6 @@ + { + CalendarClientSource *cs = l->data; + +- if (!e_client_is_opened (E_CLIENT (cs->cal_client))) +- continue; +- + calendar_client_start_query (client, cs, query); + } + +@@ -1627,9 +1610,6 @@ + { + CalendarClientSource *cs = l->data; + +- if (!e_client_is_opened (E_CLIENT (cs->cal_client))) +- continue; +- + calendar_client_start_query (client, cs, query); + } + +@@ -2066,11 +2046,11 @@ + gboolean task_completed, + guint percent_complete) + { +- GSList *l; +- ECalClient *esource; +- icalcomponent *ical; +- icalproperty *prop; +- icalproperty_status status; ++ GSList *l; ++ ECalClient *esource; ++ ICalComponent *ical; ++ ICalProperty *prop; ++ ICalPropertyStatus status; + + g_return_if_fail (CALENDAR_IS_CLIENT (client)); + g_return_if_fail (task_uid != NULL); +@@ -2097,53 +2077,59 @@ + g_assert (esource != NULL); + + /* Completed time */ +- prop = icalcomponent_get_first_property (ical, +- ICAL_COMPLETED_PROPERTY); ++ prop = i_cal_component_get_first_property (ical, ++ ICAL_COMPLETED_PROPERTY); + if (task_completed) + { +- struct icaltimetype completed_time; ++ ICalTime *completed_time; + +- completed_time = icaltime_current_time_with_zone (client->priv->zone); ++ completed_time = i_cal_time_new_current_with_zone (client->priv->zone); + if (!prop) + { +- icalcomponent_add_property (ical, +- icalproperty_new_completed (completed_time)); ++ i_cal_component_take_property (ical, ++ i_cal_property_new_completed (completed_time)); + } + else + { +- icalproperty_set_completed (prop, completed_time); ++ i_cal_property_set_completed (prop, completed_time); + } ++ ++ g_clear_object (&completed_time); + } + else if (prop) + { +- icalcomponent_remove_property (ical, prop); ++ i_cal_component_remove_property (ical, prop); + } + ++ g_clear_object (&prop); ++ + /* Percent complete */ +- prop = icalcomponent_get_first_property (ical, +- ICAL_PERCENTCOMPLETE_PROPERTY); ++ prop = i_cal_component_get_first_property (ical, ++ I_CAL_PERCENTCOMPLETE_PROPERTY); + if (!prop) + { +- icalcomponent_add_property (ical, +- icalproperty_new_percentcomplete (percent_complete)); ++ i_cal_component_take_property (ical, ++ i_cal_property_new_percentcomplete (percent_complete)); + } + else + { +- icalproperty_set_percentcomplete (prop, percent_complete); ++ i_cal_property_set_percentcomplete (prop, percent_complete); ++ g_object_unref (prop); + } + + /* Status */ +- status = task_completed ? ICAL_STATUS_COMPLETED : ICAL_STATUS_NEEDSACTION; +- prop = icalcomponent_get_first_property (ical, ICAL_STATUS_PROPERTY); ++ status = task_completed ? I_CAL_STATUS_COMPLETED : I_CAL_STATUS_NEEDSACTION; ++ prop = i_cal_component_get_first_property (ical, I_CAL_STATUS_PROPERTY); + if (prop) + { +- icalproperty_set_status (prop, status); ++ i_cal_property_set_status (prop, status); ++ g_object_unref (prop); + } + else + { +- icalcomponent_add_property (ical, +- icalproperty_new_status (status)); ++ i_cal_component_take_property (ical, ++ i_cal_property_new_status (status)); + } + +- e_cal_client_modify_object_sync (esource, ical, CALOBJ_MOD_ALL, NULL, NULL); ++ e_cal_client_modify_object_sync (esource, ical, E_CAL_OBJ_MOD_ALL, E_CAL_OPERATION_FLAG_NONE, NULL, NULL); + } +Index: b/src/event-factories/calendar-sources.c +=================================================================== +--- a/src/event-factories/calendar-sources.c ++++ b/src/event-factories/calendar-sources.c +@@ -54,7 +54,7 @@ + CalendarSources *sources; + guint changed_signal; + +- GSList *clients; ++ GSList *clients; /* ECalClient * */ + ESourceSelector *esource_selector; + + guint timeout_id; +@@ -251,7 +251,7 @@ + ECalClientSourceType client_type, + GSList *existing_clients) + { +- ECalClient *retval; ++ EClient *retval; + GError *error = NULL; + + if (existing_clients) +@@ -271,17 +271,20 @@ + } + } + +- retval = e_cal_client_new (esource, client_type, &error); ++ /* Basically do not wait for the connected state */ ++ retval = e_cal_client_connect_sync (esource, client_type, -1, NULL, &error); + if (!retval) + { + g_warning ("Could not load source '%s' from '%s': %s", + e_source_get_display_name (esource), + e_source_get_uid (esource), + error ? error->message : "Unknown error"); ++ g_clear_error (&error); ++ + return NULL; + } + +- return retval; ++ return E_CAL_CLIENT (retval); + } + + /* - Order doesn't matter diff -Nru almanah-0.11.1/debian/patches/events-Removed-Evolution-runtime-dependency.patch almanah-0.11.1/debian/patches/events-Removed-Evolution-runtime-dependency.patch --- almanah-0.11.1/debian/patches/events-Removed-Evolution-runtime-dependency.patch 1970-01-01 01:00:00.000000000 +0100 +++ almanah-0.11.1/debian/patches/events-Removed-Evolution-runtime-dependency.patch 2019-08-01 16:47:12.000000000 +0100 @@ -0,0 +1,185 @@ +From 54ccb8255eaf136a853acef4666b561a561654f2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=C3=81lvaro=20Pe=C3=B1a?= <alvar...@gmail.com> +Date: Mon, 9 Nov 2015 11:27:26 +0100 +Subject: [PATCH] events: Removed Evolution runtime dependency + +We have a runtime dependecy in Almanah because we check for the +org.gnome.evolution.calendar settings to read the timezone, so just use +the EDS e_cal_util_get_system_timezone_location and watch for changes +in /etc/timezone + +https://bugzilla.gnome.org/show_bug.cgi?id=745497 +--- + configure.ac | 3 +- + src/event-factories/calendar-client.c | 71 ++++++++++----------------- + 2 files changed, 29 insertions(+), 45 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 243dfb9..88df7f3 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -124,7 +124,8 @@ AC_SUBST(STANDARD_CFLAGS) + AC_SUBST(STANDARD_LIBS) + + dnl Evolution +-PKG_CHECK_MODULES(EVO, libecal-1.2 >= 3.5.91 libedataserver-1.2, have_evo=yes, have_evo=no) ++EDS_MIN_VERSION=2.28 ++PKG_CHECK_MODULES(EVO, libecal-1.2 >= 3.5.91 libedataserver-1.2 >= $EDS_MIN_VERSION, have_evo=yes, have_evo=no) + if test "x$have_evo" = "xyes"; then + AC_DEFINE(HAVE_EVO, 1, [Defined if libecal-1.2 is installed]) + fi +diff --git a/src/event-factories/calendar-client.c b/src/event-factories/calendar-client.c +index 7cd6187..c529dbe 100644 +--- a/src/event-factories/calendar-client.c ++++ b/src/event-factories/calendar-client.c +@@ -1,5 +1,7 @@ ++/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2-*- */ + /* + * Copyright (C) 2004 Free Software Foundation, Inc. ++ * Copyright (C) 2015 Álvaro Peña <alvar...@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 +@@ -19,6 +21,9 @@ + * William Jon McCann <mcc...@jhu.edu> + * Martin Grimme <mar...@pycage.de> + * Christian Kellner <gi...@xatom.net> ++ * ++ * Modified by: ++ * Álvaro Peña <alvar...@gmail.com> + */ + + #include <config.h> +@@ -77,8 +82,7 @@ struct _CalendarClientPrivate + + icaltimezone *zone; + +- guint zone_listener; +- GSettings *settings; ++ GFileMonitor *tz_monitor; + + guint day; + guint month; +@@ -225,45 +229,29 @@ calendar_client_class_init (CalendarClientClass *klass) + 0); + } + +-/* Timezone code adapted from evolution/calendar/gui/calendar-config.c */ +-/* The current timezone, e.g. "Europe/London". It may be NULL, in which case +- you should assume UTC. */ +-static gchar * +-calendar_client_config_get_timezone (GSettings *settings) +-{ +- char *location; +- +- if (g_settings_get_boolean (settings, "use-system-timezone")) +- location = e_cal_util_get_system_timezone_location (); +- else +- location = g_settings_get_string (settings, "timezone"); +- +- return location; +-} +- + static icaltimezone * +-calendar_client_config_get_icaltimezone (GSettings *settings) ++calendar_client_config_get_icaltimezone (void) + { + char *location; + icaltimezone *zone = NULL; +- +- location = calendar_client_config_get_timezone (settings); ++ ++ location = e_cal_util_get_system_timezone_location (); + if (!location) + return icaltimezone_get_utc_timezone (); + + zone = icaltimezone_get_builtin_timezone (location); + g_free (location); +- ++ + return zone; + } + + static void +-calendar_client_set_timezone (CalendarClient *client) ++calendar_client_set_timezone (CalendarClient *client) + { + GSList *l; + GSList *esources; + +- client->priv->zone = calendar_client_config_get_icaltimezone (client->priv->settings); ++ client->priv->zone = calendar_client_config_get_icaltimezone (); + + esources = calendar_sources_get_appointment_sources (client->priv->calendar_sources); + for (l = esources; l; l = l->next) { +@@ -274,13 +262,13 @@ calendar_client_set_timezone (CalendarClient *client) + } + + static void +-calendar_client_timezone_changed_cb (GSettings *settings, +- const gchar *key, +- CalendarClient *client) ++calendar_client_timezone_changed_cb (G_GNUC_UNUSED GFileMonitor *monitor, ++ G_GNUC_UNUSED GFile *file, ++ G_GNUC_UNUSED GFile *other_file, ++ G_GNUC_UNUSED GFileMonitorEvent *event, ++ gpointer user_data) + { +- if (g_strcmp0 (key, "timezone") == 0 || +- g_strcmp0 (key, "use-system-timezone") == 0) +- calendar_client_set_timezone (client); ++ calendar_client_set_timezone (CALENDAR_CLIENT (user_data)); + } + + static void +@@ -365,11 +353,11 @@ static void + calendar_client_init (CalendarClient *client) + { + GSList *esources; ++ GFile *tz; + + client->priv = CALENDAR_CLIENT_GET_PRIVATE (client); + + client->priv->calendar_sources = calendar_sources_get (); +- client->priv->settings = g_settings_new ("org.gnome.evolution.calendar"); + + esources = calendar_sources_get_appointment_sources (client->priv->calendar_sources); + client->priv->appointment_sources = +@@ -393,9 +381,13 @@ calendar_client_init (CalendarClient *client) + G_CALLBACK (calendar_client_task_sources_changed), + client); + +- client->priv->zone_listener = g_signal_connect (client->priv->settings, "changed", +- G_CALLBACK (calendar_client_timezone_changed_cb), +- client); ++ tz = g_file_new_for_path ("/etc/localtime"); ++ client->priv->tz_monitor = g_file_monitor_file (tz, G_FILE_MONITOR_NONE, NULL, NULL); ++ g_object_unref (tz); ++ if (client->priv->tz_monitor == NULL) ++ g_warning ("Can't monitor /etc/localtime for changes"); ++ else ++ g_signal_connect (client->priv->tz_monitor, "changed", G_CALLBACK (calendar_client_timezone_changed_cb), client); + + client->priv->day = G_MAXUINT; + client->priv->month = G_MAXUINT; +@@ -408,16 +400,7 @@ calendar_client_finalize (GObject *object) + CalendarClient *client = CALENDAR_CLIENT (object); + GSList *l; + +- if (client->priv->zone_listener) +- { +- g_signal_handler_disconnect (client->priv->settings, +- client->priv->zone_listener); +- client->priv->zone_listener = 0; +- } +- +- if (client->priv->settings) +- g_object_unref (client->priv->settings); +- client->priv->settings = NULL; ++ g_clear_object (&client->priv->tz_monitor); + + for (l = client->priv->appointment_sources; l; l = l->next) + { +-- +2.20.1 + diff -Nru almanah-0.11.1/debian/patches/libecal-2.0 almanah-0.11.1/debian/patches/libecal-2.0 --- almanah-0.11.1/debian/patches/libecal-2.0 1970-01-01 01:00:00.000000000 +0100 +++ almanah-0.11.1/debian/patches/libecal-2.0 2019-08-01 17:20:04.000000000 +0100 @@ -0,0 +1,17 @@ +Description: Build against libecal-2.0. Upstream have done this, but they have ported to meson too so their patch cannot be cherry-picked. + +Forwarded: not-needed + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -86,7 +86,7 @@ + + dnl Evolution + EDS_MIN_VERSION=2.28 +-PKG_CHECK_MODULES(EVO, libecal-1.2 >= 3.5.91 libedataserver-1.2 >= $EDS_MIN_VERSION, have_evo=yes, have_evo=no) ++PKG_CHECK_MODULES(EVO, libecal-2.0 libedataserver-1.2 >= $EDS_MIN_VERSION, have_evo=yes, have_evo=no) + if test "x$have_evo" = "xyes"; then + AC_DEFINE(HAVE_EVO, 1, [Defined if libecal-1.2 is installed]) + fi diff -Nru almanah-0.11.1/debian/patches/series almanah-0.11.1/debian/patches/series --- almanah-0.11.1/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 +++ almanah-0.11.1/debian/patches/series 2019-08-01 17:19:44.000000000 +0100 @@ -0,0 +1,7 @@ +events-Removed-Evolution-runtime-dependency.patch +trivial-Fixed-indentation.patch +event-factories-Port-to-libecal-2.0.patch +data-Updated-the-AppData-format.patch +Update-the-AppData-file-to-version-0.7.patch +Add-a-missing-tag-to-the-AppData-file.patch +libecal-2.0 diff -Nru almanah-0.11.1/debian/patches/trivial-Fixed-indentation.patch almanah-0.11.1/debian/patches/trivial-Fixed-indentation.patch --- almanah-0.11.1/debian/patches/trivial-Fixed-indentation.patch 1970-01-01 01:00:00.000000000 +0100 +++ almanah-0.11.1/debian/patches/trivial-Fixed-indentation.patch 2019-08-01 16:44:23.000000000 +0100 @@ -0,0 +1,1605 @@ +From 1c067dc8abeea88d6bac297b8d032038945527dc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=C3=81lvaro=20Pe=C3=B1a?= <alvar...@gmail.com> +Date: Mon, 28 Dec 2015 11:14:07 +0100 +Subject: [PATCH] trivial: Fixed indentation + +--- + src/event-factories/calendar-client.c | 844 +++++++++++++------------- + 1 file changed, 422 insertions(+), 422 deletions(-) + +diff --git a/src/event-factories/calendar-client.c b/src/event-factories/calendar-client.c +index c529dbe..f0f4726 100644 +--- a/src/event-factories/calendar-client.c ++++ b/src/event-factories/calendar-client.c +@@ -93,27 +93,27 @@ static void calendar_client_class_init (CalendarClientClass *klass); + static void calendar_client_init (CalendarClient *client); + static void calendar_client_finalize (GObject *object); + static void calendar_client_set_property (GObject *object, +- guint prop_id, +- const GValue *value, +- GParamSpec *pspec); ++ guint prop_id, ++ const GValue *value, ++ GParamSpec *pspec); + static void calendar_client_get_property (GObject *object, +- guint prop_id, +- GValue *value, +- GParamSpec *pspec); ++ guint prop_id, ++ GValue *value, ++ GParamSpec *pspec); + + static GSList *calendar_client_update_sources_list (CalendarClient *client, +- GSList *sources, +- GSList *esources, +- guint changed_signal_id); ++ GSList *sources, ++ GSList *esources, ++ guint changed_signal_id); + static void calendar_client_appointment_sources_changed (CalendarClient *client); + static void calendar_client_task_sources_changed (CalendarClient *client); + + static void calendar_client_stop_query (CalendarClient *client, +- CalendarClientSource *source, +- CalendarClientQuery *query); ++ CalendarClientSource *source, ++ CalendarClientQuery *query); + static void calendar_client_start_query (CalendarClient *client, +- CalendarClientSource *source, +- const char *query); ++ CalendarClientSource *source, ++ const char *query); + + static void calendar_client_source_finalize (CalendarClientSource *source); + static void calendar_client_query_finalize (CalendarClientQuery *query); +@@ -124,19 +124,19 @@ static void + calendar_client_update_tasks (CalendarClient *client); + + enum +-{ +- PROP_O, +- PROP_DAY, +- PROP_MONTH, +- PROP_YEAR +-}; ++ { ++ PROP_O, ++ PROP_DAY, ++ PROP_MONTH, ++ PROP_YEAR ++ }; + + enum +-{ +- APPOINTMENTS_CHANGED, +- TASKS_CHANGED, +- LAST_SIGNAL +-}; ++ { ++ APPOINTMENTS_CHANGED, ++ TASKS_CHANGED, ++ LAST_SIGNAL ++ }; + + static GObjectClass *parent_class = NULL; + static guint signals [LAST_SIGNAL] = { 0, }; +@@ -145,27 +145,27 @@ GType + calendar_client_get_type (void) + { + static GType client_type = 0; +- ++ + if (!client_type) + { + static const GTypeInfo client_info = +- { +- sizeof (CalendarClientClass), +- NULL, /* base_init */ +- NULL, /* base_finalize */ +- (GClassInitFunc) calendar_client_class_init, +- NULL, /* class_finalize */ +- NULL, /* class_data */ +- sizeof (CalendarClient), +- 0, /* n_preallocs */ +- (GInstanceInitFunc) calendar_client_init, +- }; +- ++ { ++ sizeof (CalendarClientClass), ++ NULL, /* base_init */ ++ NULL, /* base_finalize */ ++ (GClassInitFunc) calendar_client_class_init, ++ NULL, /* class_finalize */ ++ NULL, /* class_data */ ++ sizeof (CalendarClient), ++ 0, /* n_preallocs */ ++ (GInstanceInitFunc) calendar_client_init, ++ }; ++ + client_type = g_type_register_static (G_TYPE_OBJECT, +- "CalendarClient", +- &client_info, 0); ++ "CalendarClient", ++ &client_info, 0); + } +- ++ + return client_type; + } + +@@ -183,50 +183,50 @@ calendar_client_class_init (CalendarClientClass *klass) + g_type_class_add_private (klass, sizeof (CalendarClientPrivate)); + + g_object_class_install_property (gobject_class, +- PROP_DAY, +- g_param_spec_uint ("day", +- "Day", +- "The currently monitored day between 1 and 31 (0 denotes unset)", +- 0, G_MAXUINT, 0, +- G_PARAM_READWRITE)); ++ PROP_DAY, ++ g_param_spec_uint ("day", ++ "Day", ++ "The currently monitored day between 1 and 31 (0 denotes unset)", ++ 0, G_MAXUINT, 0, ++ G_PARAM_READWRITE)); + + g_object_class_install_property (gobject_class, +- PROP_MONTH, +- g_param_spec_uint ("month", +- "Month", +- "The currently monitored month between 0 and 11", +- 0, G_MAXUINT, 0, +- G_PARAM_READWRITE)); ++ PROP_MONTH, ++ g_param_spec_uint ("month", ++ "Month", ++ "The currently monitored month between 0 and 11", ++ 0, G_MAXUINT, 0, ++ G_PARAM_READWRITE)); + + g_object_class_install_property (gobject_class, +- PROP_YEAR, +- g_param_spec_uint ("year", +- "Year", +- "The currently monitored year", +- 0, G_MAXUINT, 0, +- G_PARAM_READWRITE)); ++ PROP_YEAR, ++ g_param_spec_uint ("year", ++ "Year", ++ "The currently monitored year", ++ 0, G_MAXUINT, 0, ++ G_PARAM_READWRITE)); + + signals [APPOINTMENTS_CHANGED] = + g_signal_new ("appointments-changed", +- G_TYPE_FROM_CLASS (gobject_class), +- G_SIGNAL_RUN_LAST, +- G_STRUCT_OFFSET (CalendarClientClass, tasks_changed), +- NULL, +- NULL, +- g_cclosure_marshal_VOID__VOID, +- G_TYPE_NONE, +- 0); ++ G_TYPE_FROM_CLASS (gobject_class), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET (CalendarClientClass, tasks_changed), ++ NULL, ++ NULL, ++ g_cclosure_marshal_VOID__VOID, ++ G_TYPE_NONE, ++ 0); + + signals [TASKS_CHANGED] = + g_signal_new ("tasks-changed", +- G_TYPE_FROM_CLASS (gobject_class), +- G_SIGNAL_RUN_LAST, +- G_STRUCT_OFFSET (CalendarClientClass, tasks_changed), +- NULL, +- NULL, +- g_cclosure_marshal_VOID__VOID, +- G_TYPE_NONE, +- 0); ++ G_TYPE_FROM_CLASS (gobject_class), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET (CalendarClientClass, tasks_changed), ++ NULL, ++ NULL, ++ g_cclosure_marshal_VOID__VOID, ++ G_TYPE_NONE, ++ 0); + } + + static icaltimezone * +@@ -256,7 +256,7 @@ calendar_client_set_timezone (CalendarClient *client) + esources = calendar_sources_get_appointment_sources (client->priv->calendar_sources); + for (l = esources; l; l = l->next) { + ECalClient *source = l->data; +- ++ + e_cal_client_set_default_timezone (source, client->priv->zone); + } + } +@@ -273,7 +273,7 @@ calendar_client_timezone_changed_cb (G_GNUC_UNUSED GFileMonitor *monitor, + + static void + cal_opened_cb (GObject *source_object, +- GAsyncResult *result, ++ GAsyncResult *result, + gpointer user_data) + { + EClient *ecal = E_CLIENT (source_object); +@@ -318,26 +318,26 @@ cal_opened_cb (GObject *source_object, + + static void + load_calendars (CalendarClient *client, +- CalendarEventType type) ++ CalendarEventType type) + { + GSList *l, *clients; + + switch (type) + { +- case CALENDAR_EVENT_APPOINTMENT: +- clients = client->priv->appointment_sources; +- break; +- case CALENDAR_EVENT_TASK: +- clients = client->priv->task_sources; +- break; +- case CALENDAR_EVENT_ALL: +- default: +- g_assert_not_reached (); ++ case CALENDAR_EVENT_APPOINTMENT: ++ clients = client->priv->appointment_sources; ++ break; ++ case CALENDAR_EVENT_TASK: ++ clients = client->priv->task_sources; ++ break; ++ case CALENDAR_EVENT_ALL: ++ default: ++ g_assert_not_reached (); + } + + for (l = clients; l != NULL; l = l->next) + { +- EClient *ecal; ++ EClient *ecal; + CalendarClientSource *cl_source = l->data; + + ecal = E_CLIENT (cl_source->cal_client); +@@ -366,20 +366,20 @@ calendar_client_init (CalendarClient *client) + esources = calendar_sources_get_task_sources (client->priv->calendar_sources); + client->priv->task_sources = + calendar_client_update_sources_list (client, NULL, esources, signals [TASKS_CHANGED]); +- +- /* set the timezone before loading the clients */ ++ ++ /* set the timezone before loading the clients */ + calendar_client_set_timezone (client); + load_calendars (client, CALENDAR_EVENT_APPOINTMENT); + load_calendars (client, CALENDAR_EVENT_TASK); + + g_signal_connect_swapped (client->priv->calendar_sources, +- "appointment-sources-changed", +- G_CALLBACK (calendar_client_appointment_sources_changed), +- client); ++ "appointment-sources-changed", ++ G_CALLBACK (calendar_client_appointment_sources_changed), ++ client); + g_signal_connect_swapped (client->priv->calendar_sources, +- "task-sources-changed", +- G_CALLBACK (calendar_client_task_sources_changed), +- client); ++ "task-sources-changed", ++ G_CALLBACK (calendar_client_task_sources_changed), ++ client); + + tz = g_file_new_for_path ("/etc/localtime"); + client->priv->tz_monitor = g_file_monitor_file (tz, G_FILE_MONITOR_NONE, NULL, NULL); +@@ -428,9 +428,9 @@ calendar_client_finalize (GObject *object) + + static void + calendar_client_set_property (GObject *object, +- guint prop_id, +- const GValue *value, +- GParamSpec *pspec) ++ guint prop_id, ++ const GValue *value, ++ GParamSpec *pspec) + { + CalendarClient *client = CALENDAR_CLIENT (object); + +@@ -441,13 +441,13 @@ calendar_client_set_property (GObject *object, + break; + case PROP_MONTH: + calendar_client_select_month (client, +- g_value_get_uint (value), +- client->priv->year); ++ g_value_get_uint (value), ++ client->priv->year); + break; + case PROP_YEAR: + calendar_client_select_month (client, +- client->priv->month, +- g_value_get_uint (value)); ++ client->priv->month, ++ g_value_get_uint (value)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); +@@ -457,9 +457,9 @@ calendar_client_set_property (GObject *object, + + static void + calendar_client_get_property (GObject *object, +- guint prop_id, +- GValue *value, +- GParamSpec *pspec) ++ guint prop_id, ++ GValue *value, ++ GParamSpec *pspec) + { + CalendarClient *client = CALENDAR_CLIENT (object); + +@@ -497,8 +497,8 @@ calendar_client_new (void) + */ + static inline time_t + make_time_for_day_begin (int day, +- int month, +- int year) ++ int month, ++ int year) + { + struct tm localtime_tm = { 0, }; + +@@ -512,8 +512,8 @@ make_time_for_day_begin (int day, + + static inline char * + make_isodate_for_day_begin (int day, +- int month, +- int year) ++ int month, ++ int year) + { + time_t utctime; + +@@ -524,15 +524,15 @@ make_isodate_for_day_begin (int day, + + static time_t + get_time_from_property (icalcomponent *ical, +- icalproperty_kind prop_kind, +- struct icaltimetype (* get_prop_func) (const icalproperty *prop), ++ icalproperty_kind prop_kind, ++ struct icaltimetype (* get_prop_func) (const icalproperty *prop), + icaltimezone *default_zone) + { + icalproperty *prop; + struct icaltimetype ical_time; + icalparameter *param; + icaltimezone *time_zone = NULL; +- ++ + prop = icalcomponent_get_first_property (ical, prop_kind); + if (!prop) + return 0; +@@ -544,7 +544,7 @@ get_time_from_property (icalcomponent *ical, + time_zone = icaltimezone_get_builtin_timezone_from_tzid (icalparameter_get_tzid (param)); + else if (icaltime_is_utc (ical_time)) + time_zone = icaltimezone_get_utc_timezone (); +- else ++ else + time_zone = default_zone; + + return icaltime_as_timet_with_zone (ical_time, time_zone); +@@ -561,14 +561,14 @@ get_ical_rid (icalcomponent *ical) + { + icalproperty *prop; + struct icaltimetype ical_time; +- ++ + prop = icalcomponent_get_first_property (ical, ICAL_RECURRENCEID_PROPERTY); + if (!prop) + return NULL; + + ical_time = icalproperty_get_recurrenceid (prop); + +- return icaltime_is_valid_time (ical_time) && !icaltime_is_null_time (ical_time) ? ++ return icaltime_is_valid_time (ical_time) && !icaltime_is_null_time (ical_time) ? + g_strdup (icaltime_as_ical_string (ical_time)) : NULL; + } + +@@ -601,8 +601,8 @@ get_ical_start_time (icalcomponent *ical, + icaltimezone *default_zone) + { + return get_time_from_property (ical, +- ICAL_DTSTART_PROPERTY, +- icalproperty_get_dtstart, ++ ICAL_DTSTART_PROPERTY, ++ icalproperty_get_dtstart, + default_zone); + } + +@@ -611,8 +611,8 @@ get_ical_end_time (icalcomponent *ical, + icaltimezone *default_zone) + { + return get_time_from_property (ical, +- ICAL_DTEND_PROPERTY, +- icalproperty_get_dtend, ++ ICAL_DTEND_PROPERTY, ++ icalproperty_get_dtend, + default_zone); + } + +@@ -654,8 +654,8 @@ get_ical_due_time (icalcomponent *ical, + icaltimezone *default_zone) + { + return get_time_from_property (ical, +- ICAL_DUE_PROPERTY, +- icalproperty_get_due, ++ ICAL_DUE_PROPERTY, ++ icalproperty_get_due, + default_zone); + } + +@@ -688,8 +688,8 @@ get_ical_completed_time (icalcomponent *ical, + icaltimezone *default_zone) + { + return get_time_from_property (ical, +- ICAL_COMPLETED_PROPERTY, +- icalproperty_get_completed, ++ ICAL_COMPLETED_PROPERTY, ++ icalproperty_get_completed, + default_zone); + } + +@@ -733,12 +733,12 @@ get_source_color (ECalClient *esource) + + static inline gboolean + calendar_appointment_equal (CalendarAppointment *a, +- CalendarAppointment *b) ++ CalendarAppointment *b) + { + GSList *la, *lb; + + if (g_slist_length (a->occurrences) != g_slist_length (b->occurrences)) +- return FALSE; ++ return FALSE; + + for (la = a->occurrences, lb = b->occurrences; la && lb; la = la->next, lb = lb->next) + { +@@ -746,8 +746,8 @@ calendar_appointment_equal (CalendarAppointment *a, + CalendarOccurrence *ob = lb->data; + + if (oa->start_time != ob->start_time || +- oa->end_time != ob->end_time) +- return FALSE; ++ oa->end_time != ob->end_time) ++ return FALSE; + } + + return +@@ -763,7 +763,7 @@ calendar_appointment_equal (CalendarAppointment *a, + + static void + calendar_appointment_copy (CalendarAppointment *appointment, +- CalendarAppointment *appointment_copy) ++ CalendarAppointment *appointment_copy) + { + GSList *l; + +@@ -827,7 +827,7 @@ calendar_appointment_finalize (CalendarAppointment *appointment) + + static void + calendar_appointment_init (CalendarAppointment *appointment, +- icalcomponent *ical, ++ icalcomponent *ical, + CalendarClientSource *source, + icaltimezone *default_zone) + { +@@ -846,7 +846,7 @@ calendar_appointment_init (CalendarAppointment *appointment, + + static icaltimezone * + resolve_timezone_id (const char *tzid, +- gpointer user_data) ++ gpointer user_data) + { + icaltimezone *retval; + ECalClient *source = user_data; +@@ -862,9 +862,9 @@ resolve_timezone_id (const char *tzid, + + static gboolean + calendar_appointment_collect_occurrence (ECalComponent *component, +- time_t occurrence_start, +- time_t occurrence_end, +- gpointer data) ++ time_t occurrence_start, ++ time_t occurrence_end, ++ gpointer data) + { + CalendarOccurrence *occurrence; + GSList **collect_loc = data; +@@ -880,10 +880,10 @@ calendar_appointment_collect_occurrence (ECalComponent *component, + + static void + calendar_appointment_generate_ocurrences (CalendarAppointment *appointment, +- icalcomponent *ical, +- ECalClient *source, +- time_t start, +- time_t end, ++ icalcomponent *ical, ++ ECalClient *source, ++ time_t start, ++ time_t end, + icaltimezone *default_zone) + { + ECalComponent *ecal; +@@ -892,16 +892,16 @@ calendar_appointment_generate_ocurrences (CalendarAppointment *appointment, + + ecal = e_cal_component_new (); + e_cal_component_set_icalcomponent (ecal, +- icalcomponent_new_clone (ical)); ++ icalcomponent_new_clone (ical)); + + e_cal_recur_generate_instances (ecal, +- start, +- end, +- calendar_appointment_collect_occurrence, +- &appointment->occurrences, +- resolve_timezone_id, +- source, +- default_zone); ++ start, ++ end, ++ calendar_appointment_collect_occurrence, ++ &appointment->occurrences, ++ resolve_timezone_id, ++ source, ++ default_zone); + + g_object_unref (ecal); + +@@ -910,7 +910,7 @@ calendar_appointment_generate_ocurrences (CalendarAppointment *appointment, + + static inline gboolean + calendar_task_equal (CalendarTask *a, +- CalendarTask *b) ++ CalendarTask *b) + { + return + g_strcmp0 (a->uid, b->uid) == 0 && +@@ -926,7 +926,7 @@ calendar_task_equal (CalendarTask *a, + + static void + calendar_task_copy (CalendarTask *task, +- CalendarTask *task_copy) ++ CalendarTask *task_copy) + { + g_assert (task != NULL); + g_assert (task_copy != NULL); +@@ -962,7 +962,7 @@ calendar_task_finalize (CalendarTask *task) + + static void + calendar_task_init (CalendarTask *task, +- icalcomponent *ical, ++ icalcomponent *ical, + CalendarClientSource *source, + icaltimezone *default_zone) + { +@@ -1072,11 +1072,11 @@ calendar_event_copy (CalendarEvent *event) + { + case CALENDAR_EVENT_APPOINTMENT: + calendar_appointment_copy (CALENDAR_APPOINTMENT (event), +- CALENDAR_APPOINTMENT (retval)); ++ CALENDAR_APPOINTMENT (retval)); + break; + case CALENDAR_EVENT_TASK: + calendar_task_copy (CALENDAR_TASK (event), +- CALENDAR_TASK (retval)); ++ CALENDAR_TASK (retval)); + break; + case CALENDAR_EVENT_ALL: + default: +@@ -1093,7 +1093,7 @@ calendar_event_get_uid (CalendarEvent *event) + switch (event->type) + { + case CALENDAR_EVENT_APPOINTMENT: +- return g_strdup_printf ("%s%s", CALENDAR_APPOINTMENT (event)->uid, CALENDAR_APPOINTMENT (event)->rid ? CALENDAR_APPOINTMENT (event)->rid : ""); ++ return g_strdup_printf ("%s%s", CALENDAR_APPOINTMENT (event)->uid, CALENDAR_APPOINTMENT (event)->rid ? CALENDAR_APPOINTMENT (event)->rid : ""); + break; + case CALENDAR_EVENT_TASK: + return g_strdup (CALENDAR_TASK (event)->uid); +@@ -1109,7 +1109,7 @@ calendar_event_get_uid (CalendarEvent *event) + + static gboolean + calendar_event_equal (CalendarEvent *a, +- CalendarEvent *b) ++ CalendarEvent *b) + { + if (!a && !b) + return TRUE; +@@ -1124,15 +1124,15 @@ calendar_event_equal (CalendarEvent *a, + { + case CALENDAR_EVENT_APPOINTMENT: + return calendar_appointment_equal (CALENDAR_APPOINTMENT (a), +- CALENDAR_APPOINTMENT (b)); ++ CALENDAR_APPOINTMENT (b)); + case CALENDAR_EVENT_TASK: + return calendar_task_equal (CALENDAR_TASK (a), +- CALENDAR_TASK (b)); ++ CALENDAR_TASK (b)); + case CALENDAR_EVENT_ALL: + default: + break; + } +- ++ + g_assert_not_reached (); + + return FALSE; +@@ -1140,20 +1140,20 @@ calendar_event_equal (CalendarEvent *a, + + static void + calendar_event_generate_ocurrences (CalendarEvent *event, +- icalcomponent *ical, +- ECalClient *source, +- time_t start, +- time_t end, ++ icalcomponent *ical, ++ ECalClient *source, ++ time_t start, ++ time_t end, + icaltimezone *default_zone) + { + if (event->type != CALENDAR_EVENT_APPOINTMENT) + return; + + calendar_appointment_generate_ocurrences (CALENDAR_APPOINTMENT (event), +- ical, +- source, +- start, +- end, ++ ical, ++ source, ++ start, ++ end, + default_zone); + } + +@@ -1165,77 +1165,77 @@ calendar_event_debug_dump (CalendarEvent *event) + { + case CALENDAR_EVENT_APPOINTMENT: + { +- char *start_str; +- char *end_str; +- GSList *l; +- +- start_str = CALENDAR_APPOINTMENT (event)->start_time ? +- isodate_from_time_t (CALENDAR_APPOINTMENT (event)->start_time) : +- g_strdup ("(undefined)"); +- end_str = CALENDAR_APPOINTMENT (event)->end_time ? +- isodate_from_time_t (CALENDAR_APPOINTMENT (event)->end_time) : +- g_strdup ("(undefined)"); +- +- dprintf ("Appointment: uid '%s', summary '%s', description '%s', " +- "start_time '%s', end_time '%s', is_all_day %s\n", +- CALENDAR_APPOINTMENT (event)->uid, +- CALENDAR_APPOINTMENT (event)->summary, +- CALENDAR_APPOINTMENT (event)->description, +- start_str, +- end_str, +- CALENDAR_APPOINTMENT (event)->is_all_day ? "(true)" : "(false)"); +- +- g_free (start_str); +- g_free (end_str); +- +- dprintf (" Occurrences:\n"); +- for (l = CALENDAR_APPOINTMENT (event)->occurrences; l; l = l->next) +- { +- CalendarOccurrence *occurrence = l->data; +- +- start_str = occurrence->start_time ? +- isodate_from_time_t (occurrence->start_time) : +- g_strdup ("(undefined)"); +- +- end_str = occurrence->end_time ? +- isodate_from_time_t (occurrence->end_time) : +- g_strdup ("(undefined)"); +- +- dprintf (" start_time '%s', end_time '%s'\n", +- start_str, end_str); +- +- g_free (start_str); +- g_free (end_str); +- } ++ char *start_str; ++ char *end_str; ++ GSList *l; ++ ++ start_str = CALENDAR_APPOINTMENT (event)->start_time ? ++ isodate_from_time_t (CALENDAR_APPOINTMENT (event)->start_time) : ++ g_strdup ("(undefined)"); ++ end_str = CALENDAR_APPOINTMENT (event)->end_time ? ++ isodate_from_time_t (CALENDAR_APPOINTMENT (event)->end_time) : ++ g_strdup ("(undefined)"); ++ ++ dprintf ("Appointment: uid '%s', summary '%s', description '%s', " ++ "start_time '%s', end_time '%s', is_all_day %s\n", ++ CALENDAR_APPOINTMENT (event)->uid, ++ CALENDAR_APPOINTMENT (event)->summary, ++ CALENDAR_APPOINTMENT (event)->description, ++ start_str, ++ end_str, ++ CALENDAR_APPOINTMENT (event)->is_all_day ? "(true)" : "(false)"); ++ ++ g_free (start_str); ++ g_free (end_str); ++ ++ dprintf (" Occurrences:\n"); ++ for (l = CALENDAR_APPOINTMENT (event)->occurrences; l; l = l->next) ++ { ++ CalendarOccurrence *occurrence = l->data; ++ ++ start_str = occurrence->start_time ? ++ isodate_from_time_t (occurrence->start_time) : ++ g_strdup ("(undefined)"); ++ ++ end_str = occurrence->end_time ? ++ isodate_from_time_t (occurrence->end_time) : ++ g_strdup ("(undefined)"); ++ ++ dprintf (" start_time '%s', end_time '%s'\n", ++ start_str, end_str); ++ ++ g_free (start_str); ++ g_free (end_str); ++ } + } + break; + case CALENDAR_EVENT_TASK: + { +- char *start_str; +- char *due_str; +- char *completed_str; +- +- start_str = CALENDAR_TASK (event)->start_time ? +- isodate_from_time_t (CALENDAR_TASK (event)->start_time) : +- g_strdup ("(undefined)"); +- due_str = CALENDAR_TASK (event)->due_time ? +- isodate_from_time_t (CALENDAR_TASK (event)->due_time) : +- g_strdup ("(undefined)"); +- completed_str = CALENDAR_TASK (event)->completed_time ? +- isodate_from_time_t (CALENDAR_TASK (event)->completed_time) : +- g_strdup ("(undefined)"); +- +- dprintf ("Task: uid '%s', summary '%s', description '%s', " +- "start_time '%s', due_time '%s', percent_complete %d, completed_time '%s'\n", +- CALENDAR_TASK (event)->uid, +- CALENDAR_TASK (event)->summary, +- CALENDAR_TASK (event)->description, +- start_str, +- due_str, +- CALENDAR_TASK (event)->percent_complete, +- completed_str); +- +- g_free (completed_str); ++ char *start_str; ++ char *due_str; ++ char *completed_str; ++ ++ start_str = CALENDAR_TASK (event)->start_time ? ++ isodate_from_time_t (CALENDAR_TASK (event)->start_time) : ++ g_strdup ("(undefined)"); ++ due_str = CALENDAR_TASK (event)->due_time ? ++ isodate_from_time_t (CALENDAR_TASK (event)->due_time) : ++ g_strdup ("(undefined)"); ++ completed_str = CALENDAR_TASK (event)->completed_time ? ++ isodate_from_time_t (CALENDAR_TASK (event)->completed_time) : ++ g_strdup ("(undefined)"); ++ ++ dprintf ("Task: uid '%s', summary '%s', description '%s', " ++ "start_time '%s', due_time '%s', percent_complete %d, completed_time '%s'\n", ++ CALENDAR_TASK (event)->uid, ++ CALENDAR_TASK (event)->summary, ++ CALENDAR_TASK (event)->description, ++ start_str, ++ due_str, ++ CALENDAR_TASK (event)->percent_complete, ++ completed_str); ++ ++ g_free (completed_str); + } + break; + default: +@@ -1247,21 +1247,21 @@ calendar_event_debug_dump (CalendarEvent *event) + + static inline CalendarClientQuery * + goddamn_this_is_crack (CalendarClientSource *source, +- ECalClientView *view, +- gboolean *emit_signal) ++ ECalClientView *view, ++ gboolean *emit_signal) + { + g_assert (view != NULL); + + if (source->completed_query.view == view) + { + if (emit_signal) +- *emit_signal = TRUE; ++ *emit_signal = TRUE; + return &source->completed_query; + } + else if (source->in_progress_query.view == view) + { + if (emit_signal) +- *emit_signal = FALSE; ++ *emit_signal = FALSE; + return &source->in_progress_query; + } + +@@ -1272,19 +1272,19 @@ goddamn_this_is_crack (CalendarClientSource *source, + + static void + calendar_client_handle_query_completed (CalendarClientSource *source, +- const GError *error, +- ECalClientView *view) ++ const GError *error, ++ ECalClientView *view) + { + CalendarClientQuery *query; + + query = goddamn_this_is_crack (source, view, NULL); +- ++ + dprintf ("Query %p completed: %s\n", query, error ? error->message : "Success"); + + if (error) + { + g_warning ("Calendar query failed: %s\n", +- error->message); ++ error->message); + calendar_client_stop_query (source->client, source, query); + return; + } +@@ -1306,8 +1306,8 @@ calendar_client_handle_query_completed (CalendarClientSource *source, + + static void + calendar_client_handle_query_result (CalendarClientSource *source, +- const GSList *objects, +- ECalClientView *view) ++ const GSList *objects, ++ ECalClientView *view) + { + CalendarClientQuery *query; + CalendarClient *client; +@@ -1322,15 +1322,15 @@ calendar_client_handle_query_result (CalendarClientSource *source, + query = goddamn_this_is_crack (source, view, &emit_signal); + + dprintf ("Query %p result: %d objects:\n", +- query, g_list_length (objects)); ++ query, g_list_length (objects)); + + month_begin = make_time_for_day_begin (1, +- client->priv->month, +- client->priv->year); ++ client->priv->month, ++ client->priv->year); + + month_end = make_time_for_day_begin (1, +- client->priv->month + 1, +- client->priv->year); ++ client->priv->month + 1, ++ client->priv->year); + + events_changed = FALSE; + for (l = objects; l; l = l->next) +@@ -1339,36 +1339,36 @@ calendar_client_handle_query_result (CalendarClientSource *source, + CalendarEvent *old_event; + icalcomponent *ical = l->data; + char *uid; +- ++ + event = calendar_event_new (ical, source, client->priv->zone); + if (!event) +- continue; ++ continue; + + calendar_event_generate_ocurrences (event, +- ical, +- source->cal_client, +- month_begin, +- month_end, ++ ical, ++ source->cal_client, ++ month_begin, ++ month_end, + client->priv->zone); + + uid = calendar_event_get_uid (event); +- ++ + old_event = g_hash_table_lookup (query->events, uid); + + if (!calendar_event_equal (event, old_event)) +- { +- dprintf ("Event %s: ", old_event ? "modified" : "added"); ++ { ++ dprintf ("Event %s: ", old_event ? "modified" : "added"); + +- calendar_event_debug_dump (event); ++ calendar_event_debug_dump (event); + +- g_hash_table_replace (query->events, uid, event); ++ g_hash_table_replace (query->events, uid, event); + +- events_changed = TRUE; +- } ++ events_changed = TRUE; ++ } + else +- { +- g_free (uid); +- } ++ { ++ g_free (uid); ++ } + } + + if (emit_signal && events_changed) +@@ -1386,7 +1386,7 @@ check_object_remove (gpointer key, + size_t len; + + len = strlen (uid); +- ++ + if (len <= strlen (key) && strncmp (uid, key, len) == 0) + { + dprintf ("Event removed: "); +@@ -1401,8 +1401,8 @@ check_object_remove (gpointer key, + + static void + calendar_client_handle_objects_removed (CalendarClientSource *source, +- const GSList *ids, +- ECalClientView *view) ++ const GSList *ids, ++ ECalClientView *view) + { + CalendarClientQuery *query; + gboolean emit_signal; +@@ -1419,24 +1419,24 @@ calendar_client_handle_objects_removed (CalendarClientSource *source, + char *uid = g_strdup_printf ("%s%s", id->uid, id->rid ? id->rid : ""); + + if (!id->rid || !(*id->rid)) +- { +- unsigned int size = g_hash_table_size (query->events); ++ { ++ unsigned int size = g_hash_table_size (query->events); + +- g_hash_table_foreach_remove (query->events, check_object_remove, id->uid); ++ g_hash_table_foreach_remove (query->events, check_object_remove, id->uid); + +- if (size != g_hash_table_size (query->events)) +- events_changed = TRUE; +- } ++ if (size != g_hash_table_size (query->events)) ++ events_changed = TRUE; ++ } + else if ((event = g_hash_table_lookup (query->events, uid))) +- { +- dprintf ("Event removed: "); ++ { ++ dprintf ("Event removed: "); + +- calendar_event_debug_dump (event); ++ calendar_event_debug_dump (event); + +- g_assert (g_hash_table_remove (query->events, uid)); ++ g_assert (g_hash_table_remove (query->events, uid)); + +- events_changed = TRUE; +- } ++ events_changed = TRUE; ++ } + g_free (uid); + } + +@@ -1460,8 +1460,8 @@ calendar_client_query_finalize (CalendarClientQuery *query) + + static void + calendar_client_stop_query (CalendarClient *client, +- CalendarClientSource *source, +- CalendarClientQuery *query) ++ CalendarClientSource *source, ++ CalendarClientQuery *query) + { + if (query == &source->in_progress_query) + { +@@ -1481,14 +1481,14 @@ calendar_client_stop_query (CalendarClient *client, + } + else + g_assert_not_reached (); +- ++ + calendar_client_query_finalize (query); + } + + static void + calendar_client_start_query (CalendarClient *client, +- CalendarClientSource *source, +- const char *query) ++ CalendarClientSource *source, ++ const char *query) + { + ECalClientView *view = NULL; + GError *error = NULL; +@@ -1496,7 +1496,7 @@ calendar_client_start_query (CalendarClient *client, + if (!e_cal_client_get_view_sync (source->cal_client, query, &view, NULL, &error)) + { + g_warning ("Error preparing the query: '%s': %s\n", +- query, error->message); ++ query, error->message); + g_error_free (error); + return; + } +@@ -1505,29 +1505,29 @@ calendar_client_start_query (CalendarClient *client, + + if (source->query_in_progress) + calendar_client_stop_query (client, source, &source->in_progress_query); +- ++ + dprintf ("Starting query %p: '%s'\n", &source->in_progress_query, query); + + source->query_in_progress = TRUE; + source->in_progress_query.view = view; + source->in_progress_query.events = + g_hash_table_new_full (g_str_hash, +- g_str_equal, +- g_free, +- (GDestroyNotify) calendar_event_free); ++ g_str_equal, ++ g_free, ++ (GDestroyNotify) calendar_event_free); + + g_signal_connect_swapped (view, "objects-added", +- G_CALLBACK (calendar_client_handle_query_result), +- source); ++ G_CALLBACK (calendar_client_handle_query_result), ++ source); + g_signal_connect_swapped (view, "objects-modified", +- G_CALLBACK (calendar_client_handle_query_result), +- source); ++ G_CALLBACK (calendar_client_handle_query_result), ++ source); + g_signal_connect_swapped (view, "objects-removed", +- G_CALLBACK (calendar_client_handle_objects_removed), +- source); ++ G_CALLBACK (calendar_client_handle_objects_removed), ++ source); + g_signal_connect_swapped (view, "complete", +- G_CALLBACK (calendar_client_handle_query_completed), +- source); ++ G_CALLBACK (calendar_client_handle_query_completed), ++ source); + + e_cal_client_view_start (view, NULL); + } +@@ -1545,21 +1545,21 @@ calendar_client_update_appointments (CalendarClient *client) + return; + + month_begin = make_isodate_for_day_begin (1, +- client->priv->month, +- client->priv->year); ++ client->priv->month, ++ client->priv->year); + + month_end = make_isodate_for_day_begin (1, +- client->priv->month + 1, +- client->priv->year); ++ client->priv->month + 1, ++ client->priv->year); + + query = g_strdup_printf ("occur-in-time-range? (make-time \"%s\") " +- "(make-time \"%s\")", +- month_begin, month_end); ++ "(make-time \"%s\")", ++ month_begin, month_end); + + for (l = client->priv->appointment_sources; l; l = l->next) + { + CalendarClientSource *cs = l->data; +- ++ + if (!e_client_is_opened (E_CLIENT (cs->cal_client))) + continue; + +@@ -1586,7 +1586,7 @@ calendar_client_update_tasks (CalendarClient *client) + * Look at filter_task() to see the behaviour we + * want. + */ +- ++ + char *day_begin; + char *day_end; + +@@ -1596,29 +1596,29 @@ calendar_client_update_tasks (CalendarClient *client) + return; + + day_begin = make_isodate_for_day_begin (client->priv->day, +- client->priv->month, +- client->priv->year); ++ client->priv->month, ++ client->priv->year); + + day_end = make_isodate_for_day_begin (client->priv->day + 1, +- client->priv->month, +- client->priv->year); ++ client->priv->month, ++ client->priv->year); + if (!day_begin || !day_end) + { + g_warning ("Cannot run query with invalid date: %dd %dy %dm\n", +- client->priv->day, +- client->priv->month, +- client->priv->year); ++ client->priv->day, ++ client->priv->month, ++ client->priv->year); + g_free (day_begin); + g_free (day_end); + return; + } +- ++ + query = g_strdup_printf ("(and (occur-in-time-range? (make-time \"%s\") " +- "(make-time \"%s\")) " +- "(or (not is-completed?) " +- "(and (is-completed?) " +- "(not (completed-before? (make-time \"%s\"))))))", +- day_begin, day_end, day_begin); ++ "(make-time \"%s\")) " ++ "(or (not is-completed?) " ++ "(and (is-completed?) " ++ "(not (completed-before? (make-time \"%s\"))))))", ++ day_begin, day_end, day_begin); + #else + query = g_strdup ("#t"); + #endif /* FIX_BROKEN_TASKS_QUERY */ +@@ -1651,23 +1651,23 @@ calendar_client_source_finalize (CalendarClientSource *source) + + calendar_client_query_finalize (&source->completed_query); + calendar_client_query_finalize (&source->in_progress_query); +- ++ + source->query_completed = FALSE; + source->query_in_progress = FALSE; + } + + static int + compare_calendar_sources (CalendarClientSource *s1, +- CalendarClientSource *s2) ++ CalendarClientSource *s2) + { + return (s1->cal_client == s2->cal_client) ? 0 : 1; + } + + static GSList * + calendar_client_update_sources_list (CalendarClient *client, +- GSList *sources, +- GSList *esources, +- guint changed_signal_id) ++ GSList *sources, ++ GSList *esources, ++ guint changed_signal_id) + { + GSList *retval, *l; + +@@ -1683,24 +1683,24 @@ calendar_client_update_sources_list (CalendarClient *client, + dummy_source.cal_client = esource; + + dprintf ("update_sources_list: adding client %s: ", +- e_source_get_uid (e_client_get_source (E_CLIENT (esource)))); ++ e_source_get_uid (e_client_get_source (E_CLIENT (esource)))); + + if ((s = g_slist_find_custom (sources, +- &dummy_source, +- (GCompareFunc) compare_calendar_sources))) +- { +- dprintf ("already on list\n"); +- new_source = s->data; +- sources = g_slist_delete_link (sources, s); +- } ++ &dummy_source, ++ (GCompareFunc) compare_calendar_sources))) ++ { ++ dprintf ("already on list\n"); ++ new_source = s->data; ++ sources = g_slist_delete_link (sources, s); ++ } + else +- { +- dprintf ("added\n"); +- new_source = g_new0 (CalendarClientSource, 1); +- new_source->client = client; +- new_source->cal_client = g_object_ref (esource); +- new_source->changed_signal_id = changed_signal_id; +- } ++ { ++ dprintf ("added\n"); ++ new_source = g_new0 (CalendarClientSource, 1); ++ new_source->client = client; ++ new_source->cal_client = g_object_ref (esource); ++ new_source->changed_signal_id = changed_signal_id; ++ } + + retval = g_slist_prepend (retval, new_source); + } +@@ -1710,7 +1710,7 @@ calendar_client_update_sources_list (CalendarClient *client, + CalendarClientSource *source = l->data; + + dprintf ("Removing client %s from list\n", +- e_source_get_uid (e_client_get_source (E_CLIENT (source->cal_client)))); ++ e_source_get_uid (e_client_get_source (E_CLIENT (source->cal_client)))); + + calendar_client_source_finalize (source); + g_free (source); +@@ -1729,11 +1729,11 @@ calendar_client_appointment_sources_changed (CalendarClient *client) + + esources = calendar_sources_get_appointment_sources (client->priv->calendar_sources); + +- client->priv->appointment_sources = ++ client->priv->appointment_sources = + calendar_client_update_sources_list (client, +- client->priv->appointment_sources, +- esources, +- signals [APPOINTMENTS_CHANGED]); ++ client->priv->appointment_sources, ++ esources, ++ signals [APPOINTMENTS_CHANGED]); + + load_calendars (client, CALENDAR_EVENT_APPOINTMENT); + calendar_client_update_appointments (client); +@@ -1748,11 +1748,11 @@ calendar_client_task_sources_changed (CalendarClient *client) + + esources = calendar_sources_get_task_sources (client->priv->calendar_sources); + +- client->priv->task_sources = ++ client->priv->task_sources = + calendar_client_update_sources_list (client, +- client->priv->task_sources, +- esources, +- signals [TASKS_CHANGED]); ++ client->priv->task_sources, ++ esources, ++ signals [TASKS_CHANGED]); + + load_calendars (client, CALENDAR_EVENT_TASK); + calendar_client_update_tasks (client); +@@ -1778,8 +1778,8 @@ calendar_client_get_date (CalendarClient *client, + + void + calendar_client_select_month (CalendarClient *client, +- guint month, +- guint year) ++ guint month, ++ guint year) + { + g_return_if_fail (CALENDAR_IS_CLIENT (client)); + g_return_if_fail (month <= 11); +@@ -1801,7 +1801,7 @@ calendar_client_select_month (CalendarClient *client, + + void + calendar_client_select_day (CalendarClient *client, +- guint day) ++ guint day) + { + g_return_if_fail (CALENDAR_IS_CLIENT (client)); + g_return_if_fail (day <= 31); +@@ -1830,13 +1830,13 @@ typedef struct + } FilterData; + + typedef void (* CalendarEventFilterFunc) (const char *uid, +- CalendarEvent *event, +- FilterData *filter_data); ++ CalendarEvent *event, ++ FilterData *filter_data); + + static void + filter_appointment (const char *uid, +- CalendarEvent *event, +- FilterData *filter_data) ++ CalendarEvent *event, ++ FilterData *filter_data) + { + GSList *occurrences, *l; + +@@ -1856,16 +1856,16 @@ filter_appointment (const char *uid, + start_time < filter_data->end_time) || + (start_time <= filter_data->start_time && + (end_time - 1) > filter_data->start_time)) +- { +- CalendarEvent *new_event; +- +- new_event = calendar_event_copy (event); +- +- CALENDAR_APPOINTMENT (new_event)->start_time = occurrence->start_time; +- CALENDAR_APPOINTMENT (new_event)->end_time = occurrence->end_time; +- +- filter_data->events = g_slist_prepend (filter_data->events, new_event); +- } ++ { ++ CalendarEvent *new_event; ++ ++ new_event = calendar_event_copy (event); ++ ++ CALENDAR_APPOINTMENT (new_event)->start_time = occurrence->start_time; ++ CALENDAR_APPOINTMENT (new_event)->end_time = occurrence->end_time; ++ ++ filter_data->events = g_slist_prepend (filter_data->events, new_event); ++ } + } + + CALENDAR_APPOINTMENT (event)->occurrences = occurrences; +@@ -1873,8 +1873,8 @@ filter_appointment (const char *uid, + + static void + filter_task (const char *uid, +- CalendarEvent *event, +- FilterData *filter_data) ++ CalendarEvent *event, ++ FilterData *filter_data) + { + #ifdef FIX_BROKEN_TASKS_QUERY + CalendarTask *task; +@@ -1889,22 +1889,22 @@ filter_task (const char *uid, + if (task->start_time && task->start_time > filter_data->start_time) + return; + +- if (task->completed_time && ++ if (task->completed_time && + (task->completed_time < filter_data->start_time || + task->completed_time > filter_data->end_time)) + return; + #endif /* FIX_BROKEN_TASKS_QUERY */ + + filter_data->events = g_slist_prepend (filter_data->events, +- calendar_event_copy (event)); ++ calendar_event_copy (event)); + } + + static GSList * + calendar_client_filter_events (CalendarClient *client, +- GSList *sources, +- CalendarEventFilterFunc filter_func, +- time_t start_time, +- time_t end_time) ++ GSList *sources, ++ CalendarEventFilterFunc filter_func, ++ time_t start_time, ++ time_t end_time) + { + FilterData filter_data; + GSList *l; +@@ -1924,16 +1924,16 @@ calendar_client_filter_events (CalendarClient *client, + CalendarClientSource *source = l->data; + + if (source->query_completed) +- { +- filter_data.events = NULL; +- g_hash_table_foreach (source->completed_query.events, +- (GHFunc) filter_func, +- &filter_data); ++ { ++ filter_data.events = NULL; ++ g_hash_table_foreach (source->completed_query.events, ++ (GHFunc) filter_func, ++ &filter_data); + +- filter_data.events = g_slist_reverse (filter_data.events); ++ filter_data.events = g_slist_reverse (filter_data.events); + +- retval = g_slist_concat (retval, filter_data.events); +- } ++ retval = g_slist_concat (retval, filter_data.events); ++ } + } + + return retval; +@@ -1941,7 +1941,7 @@ calendar_client_filter_events (CalendarClient *client, + + GSList * + calendar_client_get_events (CalendarClient *client, +- CalendarEventType event_mask) ++ CalendarEventType event_mask) + { + GSList *appointments; + GSList *tasks; +@@ -1950,34 +1950,34 @@ calendar_client_get_events (CalendarClient *client, + + g_return_val_if_fail (CALENDAR_IS_CLIENT (client), NULL); + g_return_val_if_fail (client->priv->day != G_MAXUINT && +- client->priv->month != G_MAXUINT && +- client->priv->year != G_MAXUINT, NULL); ++ client->priv->month != G_MAXUINT && ++ client->priv->year != G_MAXUINT, NULL); + + day_begin = make_time_for_day_begin (client->priv->day, +- client->priv->month, +- client->priv->year); ++ client->priv->month, ++ client->priv->year); + day_end = make_time_for_day_begin (client->priv->day + 1, +- client->priv->month, +- client->priv->year); ++ client->priv->month, ++ client->priv->year); + + appointments = NULL; + if (event_mask & CALENDAR_EVENT_APPOINTMENT) + { + appointments = calendar_client_filter_events (client, +- client->priv->appointment_sources, +- filter_appointment, +- day_begin, +- day_end); ++ client->priv->appointment_sources, ++ filter_appointment, ++ day_begin, ++ day_end); + } + + tasks = NULL; + if (event_mask & CALENDAR_EVENT_TASK) + { + tasks = calendar_client_filter_events (client, +- client->priv->task_sources, +- filter_task, +- day_begin, +- day_end); ++ client->priv->task_sources, ++ filter_task, ++ day_begin, ++ day_end); + } + + return g_slist_concat (appointments, tasks); +@@ -1995,8 +1995,8 @@ day_from_time_t (time_t t) + + void + calendar_client_foreach_appointment_day (CalendarClient *client, +- CalendarDayIter iter_func, +- gpointer user_data) ++ CalendarDayIter iter_func, ++ gpointer user_data) + { + GSList *appointments, *l; + gboolean marked_days [32] = { FALSE, }; +@@ -2007,20 +2007,20 @@ calendar_client_foreach_appointment_day (CalendarClient *client, + g_return_if_fail (CALENDAR_IS_CLIENT (client)); + g_return_if_fail (iter_func != NULL); + g_return_if_fail (client->priv->month != G_MAXUINT && +- client->priv->year != G_MAXUINT); ++ client->priv->year != G_MAXUINT); + + month_begin = make_time_for_day_begin (1, +- client->priv->month, +- client->priv->year); ++ client->priv->month, ++ client->priv->year); + month_end = make_time_for_day_begin (1, +- client->priv->month + 1, +- client->priv->year); +- ++ client->priv->month + 1, ++ client->priv->year); ++ + appointments = calendar_client_filter_events (client, +- client->priv->appointment_sources, +- filter_appointment, +- month_begin, +- month_end); ++ client->priv->appointment_sources, ++ filter_appointment, ++ month_begin, ++ month_end); + for (l = appointments; l; l = l->next) + { + CalendarAppointment *appointment = l->data; +@@ -2031,12 +2031,12 @@ calendar_client_foreach_appointment_day (CalendarClient *client, + + if (day_time >= month_begin) + marked_days [day_from_time_t (day_time)] = TRUE; +- ++ + if (appointment->end_time) + { + int day_offset; + int duration = appointment->end_time - appointment->start_time; +- /* mark the days for the appointment, no need to add an extra one when duration is a multiple of 86400 */ ++ /* mark the days for the appointment, no need to add an extra one when duration is a multiple of 86400 */ + for (day_offset = 1; day_offset <= duration / 86400 && duration != day_offset * 86400; day_offset++) + { + time_t day_tm = appointment->start_time + day_offset * 86400; +@@ -2056,15 +2056,15 @@ calendar_client_foreach_appointment_day (CalendarClient *client, + for (i = 1; i < 32; i++) + { + if (marked_days [i]) +- iter_func (client, i, user_data); ++ iter_func (client, i, user_data); + } + } + + void + calendar_client_set_task_completed (CalendarClient *client, +- char *task_uid, +- gboolean task_completed, +- guint percent_complete) ++ char *task_uid, ++ gboolean task_completed, ++ guint percent_complete) + { + GSList *l; + ECalClient *esource; +@@ -2085,7 +2085,7 @@ calendar_client_set_task_completed (CalendarClient *client, + esource = source->cal_client; + e_cal_client_get_object_sync (esource, task_uid, NULL, &ical, NULL, NULL); + if (ical) +- break; ++ break; + } + + if (!ical) +@@ -2098,21 +2098,21 @@ calendar_client_set_task_completed (CalendarClient *client, + + /* Completed time */ + prop = icalcomponent_get_first_property (ical, +- ICAL_COMPLETED_PROPERTY); ++ ICAL_COMPLETED_PROPERTY); + if (task_completed) + { + struct icaltimetype completed_time; + + completed_time = icaltime_current_time_with_zone (client->priv->zone); + if (!prop) +- { +- icalcomponent_add_property (ical, +- icalproperty_new_completed (completed_time)); +- } ++ { ++ icalcomponent_add_property (ical, ++ icalproperty_new_completed (completed_time)); ++ } + else +- { +- icalproperty_set_completed (prop, completed_time); +- } ++ { ++ icalproperty_set_completed (prop, completed_time); ++ } + } + else if (prop) + { +@@ -2121,11 +2121,11 @@ calendar_client_set_task_completed (CalendarClient *client, + + /* Percent complete */ + prop = icalcomponent_get_first_property (ical, +- ICAL_PERCENTCOMPLETE_PROPERTY); ++ ICAL_PERCENTCOMPLETE_PROPERTY); + if (!prop) + { + icalcomponent_add_property (ical, +- icalproperty_new_percentcomplete (percent_complete)); ++ icalproperty_new_percentcomplete (percent_complete)); + } + else + { +@@ -2142,7 +2142,7 @@ calendar_client_set_task_completed (CalendarClient *client, + else + { + icalcomponent_add_property (ical, +- icalproperty_new_status (status)); ++ icalproperty_new_status (status)); + } + + e_cal_client_modify_object_sync (esource, ical, CALOBJ_MOD_ALL, NULL, NULL); +-- +2.20.1 + diff -Nru almanah-0.11.1/debian/patches/Update-the-AppData-file-to-version-0.7.patch almanah-0.11.1/debian/patches/Update-the-AppData-file-to-version-0.7.patch --- almanah-0.11.1/debian/patches/Update-the-AppData-file-to-version-0.7.patch 1970-01-01 01:00:00.000000000 +0100 +++ almanah-0.11.1/debian/patches/Update-the-AppData-file-to-version-0.7.patch 2019-08-01 17:11:30.000000000 +0100 @@ -0,0 +1,51 @@ +From b33b67f48587f40adaa1c1e1e34882cafce540e9 Mon Sep 17 00:00:00 2001 +From: Richard Hughes <rich...@hughsie.com> +Date: Fri, 22 Jan 2016 19:10:04 +0000 +Subject: [PATCH] Update the AppData file to version 0.7+ + +--- + data/almanah.appdata.xml.in | 21 +++++++++++++++------ + 1 file changed, 15 insertions(+), 6 deletions(-) + +diff --git a/data/almanah.appdata.xml.in b/data/almanah.appdata.xml.in +index 31db07d..df93a75 100644 +--- a/data/almanah.appdata.xml.in ++++ b/data/almanah.appdata.xml.in +@@ -1,10 +1,10 @@ + <?xml version="1.0" encoding="UTF-8"?> + <!-- Copyright 2014 Álvaro Peña <alvar...@gmail.com> --> +-<application> +- <id type="desktop">almanah.desktop</id> ++<component type="desktop"> ++ <id>almanah.desktop</id> + <metadata_license>CC0-1.0</metadata_license> + <project_license>GPL-3.0+</project_license> +- <name>Almanah Diary</name> ++ <_name>Almanah Diary</_name> + <_summary>Keep a diary of your life</_summary> + <description> + <_p> +@@ -18,8 +18,17 @@ + </_p> + </description> + <screenshots> +- <screenshot type="default" width="800" height="450">https://wiki.gnome.org/Apps/Almanah_Diary?action=AttachFile&do=get&target=screenshot-almanah-diary.png</screenshot> ++ <screenshot height="450" width="800" type="default"> ++ <image>https://wiki.gnome.org/Apps/Almanah_Diary?action=AttachFile&do=get&target=screenshot-almanah-diary.png</image> ++ </screenshot> + </screenshots> + <url type="homepage">https://wiki.gnome.org/Apps/Almanah_Diary</url> +- <updatecontact>alvaropg_at_gmail.com</updatecontact> +-</application> ++ <url type="bugtracker">https://bugzilla.gnome.org/enter_bug.cgi?product=almanah</url> ++ <url type="donation">http://www.gnome.org/friends/</url> ++ <update_contact>alvaropg_at_gmail.com</update_contact> ++ <project_group>GNOME</project_group> ++ <kudos> ++ <kudo>AppMenu</kudo> ++ <kudo>ModernToolkit</kudo> ++ </kudos> ++</component> +-- +2.20.1 + diff -Nru almanah-0.11.1/debian/rules almanah-0.11.1/debian/rules --- almanah-0.11.1/debian/rules 2018-03-26 17:19:08.000000000 +0100 +++ almanah-0.11.1/debian/rules 2019-08-01 17:01:07.000000000 +0100 @@ -1,7 +1,10 @@ #!/usr/bin/make -f %: - dh $@ --with autotools-dev + dh $@ --with autoreconf + +override_dh_autoreconf: + dh_autoreconf $(CURDIR)/autogen.sh override_dh_auto_configure: dh_auto_configure -- --disable-silent-rules