[packages/gnome-todo] - updated to 40.0 - updated doc-build patch - removed obsolete ecal2 patch
qboosh
qboosh at pld-linux.org
Sun May 9 20:34:47 CEST 2021
commit cc13ed9c23e27a7ea8f634a017cbf650cddd3778
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun May 9 20:36:51 2021 +0200
- updated to 40.0
- updated doc-build patch
- removed obsolete ecal2 patch
gnome-todo-doc-build.patch | 34 ++-
gnome-todo-ecal2.patch | 567 ---------------------------------------------
gnome-todo.spec | 70 +++---
3 files changed, 66 insertions(+), 605 deletions(-)
---
diff --git a/gnome-todo.spec b/gnome-todo.spec
index e8b7633..3546014 100644
--- a/gnome-todo.spec
+++ b/gnome-todo.spec
@@ -1,38 +1,47 @@
+#
+# Conditional build:
+%bcond_without apidocs # gtk-doc based API documentation
+
Summary: GNOME To Do - application to manage your personal tasks
Summary(pl.UTF-8): GNOME To Do - aplikacja do zarządzania osobistymi zadaniami
Name: gnome-todo
-Version: 3.28.1
-Release: 4
+Version: 40.0
+Release: 1
License: GPL v3+
Group: X11/Applications
-Source0: http://ftp.gnome.org/pub/GNOME/sources/gnome-todo/3.28/%{name}-%{version}.tar.xz
-# Source0-md5: 795ba5027fbc0d790a40742468392cc6
+Source0: https://download.gnome.org/sources/gnome-todo/40/%{name}-%{version}.tar.xz
+# Source0-md5: ed6418a35fdadcc8989f52b983481825
Patch0: %{name}-doc-build.patch
-# https://gitlab.gnome.org/GNOME/gnome-todo/uploads/dd33428f7a9132787265716dc39de382/gnome-todo-3.28.patch
-Patch1: %{name}-ecal2.patch
URL: https://wiki.gnome.org/Apps/Todo
-BuildRequires: evolution-data-server-devel >= 3.33.1
+BuildRequires: evolution-data-server-devel >= 3.33.2
BuildRequires: gettext-tools >= 0.19.8
-BuildRequires: glib2-devel >= 1:2.44.0
+BuildRequires: glib2-devel >= 1:2.58.0
BuildRequires: gnome-online-accounts-devel >= 3.2.0
BuildRequires: gobject-introspection-devel >= 1.42.0
-BuildRequires: gtk+3-devel >= 3.22.0
-BuildRequires: gtk-doc >= 1.14
+BuildRequires: gtk4-devel >= 4.0
+%{?with_apidocs:BuildRequires: gtk-doc >= 1.14}
+BuildRequires: libadwaita-devel
BuildRequires: libpeas-devel >= 1.17
+BuildRequires: libportal-devel >= 0.4
BuildRequires: meson >= 0.41.0
BuildRequires: ninja >= 1.5
BuildRequires: pkgconfig
+BuildRequires: rpm-build >= 4.6
BuildRequires: rpmbuild(macros) >= 1.736
BuildRequires: tar >= 1:1.22
BuildRequires: xz
+# for todoist plugin (disabled in src/plugins/meson.build as of 40.0)
+#BuildRequires: json-glib-devel
+#BuildRequires: rest-devel >= 0.7
Requires(post,postun): gtk-update-icon-cache
-Requires(post,postun): glib2 >= 1:2.44.0
-Requires: evolution-data-server >= 3.33.1
-Requires: glib2 >= 1:2.44.0
+Requires(post,postun): glib2 >= 1:2.58.0
+Requires: evolution-data-server >= 3.33.2
+Requires: glib2 >= 1:2.58.0
Requires: gnome-online-accounts >= 3.2.0
-Requires: gtk+3 >= 3.22.0
+Requires: gtk4 >= 4.0
Requires: hicolor-icon-theme
Requires: libpeas >= 1.17
+Requires: libportal >= 0.4
Suggests: libpeas-loader-python3 >= 1.17
Suggests: python3-pygobject3
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -51,9 +60,9 @@ Wykorzystuje mechanizmy GNOME, więc całkowicie integruje się ze
Summary: Header files for GNOME To Do
Summary(pl.UTF-8): Pliki nagłówkowe GNOME To Do
Group: X11/Development/Libraries
-Requires: evolution-data-server-devel >= 3.33.1
-Requires: glib2-devel >= 1:2.44.0
-Requires: gtk+3-devel >= 3.22.0
+Requires: evolution-data-server-devel >= 3.33.2
+Requires: glib2-devel >= 1:2.58.0
+Requires: gtk4-devel >= 4.0
Requires: libpeas-devel >= 1.17
%description devel
@@ -79,11 +88,10 @@ Dokumentacja API GNOME To Do.
%prep
%setup -q
%patch0 -p1
-%patch1 -p1
%build
%meson build \
- -Dgtk_doc=true
+ %{?with_apidocs:-Ddocumentation=true}
%ninja_build -C build
@@ -107,28 +115,20 @@ rm -rf $RPM_BUILD_ROOT
%files -f %{name}.lang
%defattr(644,root,root,755)
-%doc AUTHORS NEWS README.md
+%doc NEWS README.md
%attr(755,root,root) %{_bindir}/gnome-todo
-%dir %{_libdir}/gnome-todo
-%dir %{_libdir}/gnome-todo/plugins
-%dir %{_libdir}/gnome-todo/plugins/score
-%{_libdir}/gnome-todo/plugins/score/score.plugin
-%dir %{_libdir}/gnome-todo/plugins/score/score
-%{_libdir}/gnome-todo/plugins/score/score/*.py
-%dir %{_libdir}/gnome-todo/plugins/unscheduled-panel
-%{_libdir}/gnome-todo/plugins/unscheduled-panel/unscheduled-panel.plugin
-%dir %{_libdir}/gnome-todo/plugins/unscheduled-panel/unscheduled-panel
-%{_libdir}/gnome-todo/plugins/unscheduled-panel/unscheduled-panel/*.py
%{_libdir}/girepository-1.0/Gtd-1.0.typelib
%{_datadir}/dbus-1/services/org.gnome.Todo.service
%{_datadir}/glib-2.0/schemas/org.gnome.todo.background.gschema.xml
-%{_datadir}/glib-2.0/schemas/org.gnome.todo.txt.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.todo.gschema.xml
-%{_datadir}/glib-2.0/schemas/org.gnome.todo.enums.xml
-%{_datadir}/gnome-todo
%{_datadir}/metainfo/org.gnome.Todo.appdata.xml
%{_desktopdir}/org.gnome.Todo.desktop
-%{_iconsdir}/hicolor/*x*/apps/org.gnome.Todo.png
+%{_iconsdir}/hicolor/scalable/apps/org.gnome.Todo.svg
+%{_iconsdir}/hicolor/scalable/apps/org.gnome.Todo.Devel.svg
+%{_iconsdir}/hicolor/symbolic/actions/builder-view-left-pane-symbolic.svg
+%{_iconsdir}/hicolor/symbolic/actions/drag-handle-symbolic.svg
+%{_iconsdir}/hicolor/symbolic/actions/mail-inbox-symbolic.svg
+%{_iconsdir}/hicolor/symbolic/actions/view-tasks-*-symbolic.svg
%{_iconsdir}/hicolor/symbolic/apps/org.gnome.Todo-symbolic.svg
%files devel
@@ -137,6 +137,8 @@ rm -rf $RPM_BUILD_ROOT
%{_pkgconfigdir}/gnome-todo.pc
%{_datadir}/gir-1.0/Gtd-1.0.gir
+%if %{with apidocs}
%files apidocs
%defattr(644,root,root,755)
%{_gtkdocdir}/gnome-todo
+%endif
diff --git a/gnome-todo-doc-build.patch b/gnome-todo-doc-build.patch
index 0877122..ffed241 100644
--- a/gnome-todo-doc-build.patch
+++ b/gnome-todo-doc-build.patch
@@ -1,6 +1,33 @@
---- gnome-todo-3.26.1/doc/reference/meson.build.docfix 2017-10-01 00:46:25.032986025 +0200
-+++ gnome-todo-3.26.1/doc/reference/meson.build 2017-10-01 01:21:20.642918268 +0200
-@@ -48,8 +48,8 @@ glib_doc_path = join_paths(glib_prefix,
+--- gnome-todo-40.0/doc/reference/meson.build.orig 2021-05-04 00:30:03.530776300 +0200
++++ gnome-todo-40.0/doc/reference/meson.build 2021-05-09 18:53:49.935089521 +0200
+@@ -3,6 +3,7 @@ subdir('xml')
+ private_headers = [
+ 'gtd-application.h',
+ 'gtd-arrow-frame.h',
++ 'gtd-command-bar.h',
+ 'gtd-dnd-row.h',
+ 'gtd-edit-pane.h',
+ 'gtd-empty-list-widget.h',
+@@ -17,12 +18,18 @@ private_headers = [
+ 'gtd-manager-protected.h',
+ 'gtd-notification-widget.h',
+ 'gtd-plugin-manager.h',
++ 'gtd-plugin-todo-txt.h',
++ 'gtd-plugin-todoist.h',
+ 'gtd-provider-dialog.h',
+ 'gtd-provider-popover.h',
+ 'gtd-provider-row.h',
+ 'gtd-provider-selector.h',
++ 'gtd-provider-todo-txt.h',
++ 'gtd-provider-todoist.h',
+ 'gtd-resources.h',
+ 'gtd-task-row.h',
++ 'gtd-task-todo-txt.h',
++ 'gtd-todoist-preferences-panel.h',
+ 'gtd-types.h'
+ ]
+
+@@ -45,7 +52,7 @@ glib_doc_path = join_paths(glib_prefix,
gtk_prefix = gtk_dep.get_pkgconfig_variable('prefix')
gtk_doc_path = join_paths(gtk_prefix, 'share', 'gtk-doc', 'html')
@@ -9,4 +36,3 @@
gnome.gtkdoc(
meson.project_name(),
- main_sgml: meson.project_name() + '-docs.sgml',
diff --git a/gnome-todo-ecal2.patch b/gnome-todo-ecal2.patch
deleted file mode 100644
index 549c3ce..0000000
--- a/gnome-todo-ecal2.patch
+++ /dev/null
@@ -1,567 +0,0 @@
-diff --git a/plugins/eds/gtd-eds-autoptr.h b/plugins/eds/gtd-eds-autoptr.h
-index eb9b011..78bd944 100644
---- a/plugins/eds/gtd-eds-autoptr.h
-+++ b/plugins/eds/gtd-eds-autoptr.h
-@@ -23,6 +23,5 @@
- #include <libecal/libecal.h>
-
- G_DEFINE_AUTOPTR_CLEANUP_FUNC (ECalComponent, g_object_unref);
--G_DEFINE_AUTOPTR_CLEANUP_FUNC (ECalComponentId, e_cal_component_free_id);
-+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ECalComponentId, e_cal_component_id_free);
- G_DEFINE_AUTOPTR_CLEANUP_FUNC (ECalClient, g_object_unref);
--G_DEFINE_AUTOPTR_CLEANUP_FUNC (ESource, g_object_unref);
-diff --git a/plugins/eds/gtd-provider-eds.c b/plugins/eds/gtd-provider-eds.c
-index a403226..def4235 100644
---- a/plugins/eds/gtd-provider-eds.c
-+++ b/plugins/eds/gtd-provider-eds.c
-@@ -554,6 +554,7 @@ gtd_provider_eds_create_task (GtdProvider *provider,
-
- e_cal_client_create_object (client,
- e_cal_component_get_icalcomponent (component),
-+ E_CAL_OPERATION_FLAG_NONE,
- NULL,
- (GAsyncReadyCallback) on_task_created_cb,
- new_task);
-@@ -587,6 +588,7 @@ gtd_provider_eds_update_task (GtdProvider *provider,
- e_cal_client_modify_object (client,
- e_cal_component_get_icalcomponent (component),
- E_CAL_OBJ_MOD_THIS,
-+ E_CAL_OPERATION_FLAG_NONE,
- NULL,
- (GAsyncReadyCallback) on_task_modified_cb,
- task);
-@@ -616,9 +618,10 @@ gtd_provider_eds_remove_task (GtdProvider *provider,
- gtd_object_push_loading (GTD_OBJECT (provider));
-
- e_cal_client_remove_object (client,
-- id->uid,
-- id->rid,
-+ e_cal_component_id_get_uid (id),
-+ e_cal_component_id_get_rid (id),
- E_CAL_OBJ_MOD_THIS,
-+ E_CAL_OPERATION_FLAG_NONE,
- NULL,
- (GAsyncReadyCallback) on_task_removed_cb,
- provider);
-diff --git a/plugins/eds/gtd-task-eds.c b/plugins/eds/gtd-task-eds.c
-index 2c8cd8e..bd8f7ac 100644
---- a/plugins/eds/gtd-task-eds.c
-+++ b/plugins/eds/gtd-task-eds.c
-@@ -46,19 +46,19 @@ static GParamSpec *properties [N_PROPS];
- */
-
- static GDateTime*
--convert_icaltime (const icaltimetype *date)
-+convert_icaltime (const ICalTime *date)
- {
- GDateTime *dt;
-
- if (!date)
- return NULL;
-
-- dt = g_date_time_new_utc (date->year,
-- date->month,
-- date->day,
-- date->is_date ? 0 : date->hour,
-- date->is_date ? 0 : date->minute,
-- date->is_date ? 0 : date->second);
-+ dt = g_date_time_new_utc (i_cal_time_get_year (date),
-+ i_cal_time_get_month (date),
-+ i_cal_time_get_day (date),
-+ i_cal_time_is_date (date) ? 0 : i_cal_time_get_hour (date),
-+ i_cal_time_is_date (date) ? 0 : i_cal_time_get_minute (date),
-+ i_cal_time_is_date (date) ? 0 : i_cal_time_get_second (date));
-
- return dt;
- }
-@@ -67,19 +67,20 @@ static void
- set_description (GtdTaskEds *self,
- const gchar *description)
- {
-- ECalComponentText text;
-+ ECalComponentText *text;
- GSList note;
-
-- text.value = description && *description ? description : "";
-- text.altrep = NULL;
-+ text = e_cal_component_text_new (description ? description : "", NULL);
-
-- note.data = &text;
-+ note.data = text;
- note.next = NULL;
-
- g_clear_pointer (&self->description, g_free);
- self->description = g_strdup (description);
-
-- e_cal_component_set_description_list (self->component, ¬e);
-+ e_cal_component_set_descriptions (self->component, (description && *description) ? ¬e : NULL);
-+
-+ e_cal_component_text_free (text);
- }
-
- static void
-@@ -90,7 +91,7 @@ setup_description (GtdTaskEds *self)
- GSList *l;
-
- /* concatenates the multiple descriptions a task may have */
-- e_cal_component_get_description_list (self->component, &text_list);
-+ text_list = e_cal_component_get_descriptions (self->component);
-
- for (l = text_list; l != NULL; l = l->next)
- {
-@@ -105,21 +106,21 @@ setup_description (GtdTaskEds *self)
- {
- carrier = g_strconcat (desc,
- "\n",
-- text->value,
-+ e_cal_component_text_get_value (text),
- NULL);
- g_free (desc);
- desc = carrier;
- }
- else
- {
-- desc = g_strdup (text->value);
-+ desc = g_strdup (e_cal_component_text_get_value (text));
- }
- }
- }
-
- set_description (self, desc);
-
-- e_cal_component_free_text_list (text_list);
-+ g_slist_free_full (text_list, e_cal_component_text_free);
- }
-
-
-@@ -138,7 +139,7 @@ gtd_task_eds_get_uid (GtdObject *object)
- self = GTD_TASK_EDS (object);
-
- if (self->component)
-- e_cal_component_get_uid (self->component, &uid);
-+ uid = e_cal_component_get_uid (self->component);
- else
- uid = NULL;
-
-@@ -159,7 +160,7 @@ gtd_task_eds_set_uid (GtdObject *object,
- if (!self->component)
- return;
-
-- e_cal_component_get_uid (self->component, ¤t_uid);
-+ current_uid = e_cal_component_get_uid (self->component);
-
- if (g_strcmp0 (current_uid, uid) != 0)
- {
-@@ -177,7 +178,7 @@ gtd_task_eds_set_uid (GtdObject *object,
- static gboolean
- gtd_task_eds_get_complete (GtdTask *task)
- {
-- icalproperty_status status;
-+ ICalPropertyStatus status;
- GtdTaskEds *self;
- gboolean completed;
-
-@@ -185,8 +186,8 @@ gtd_task_eds_get_complete (GtdTask *task)
-
- self = GTD_TASK_EDS (task);
-
-- e_cal_component_get_status (self->component, &status);
-- completed = status == ICAL_STATUS_COMPLETED;
-+ status = e_cal_component_get_status (self->component);
-+ completed = status == I_CAL_STATUS_COMPLETED;
-
- return completed;
- }
-@@ -195,8 +196,8 @@ static void
- gtd_task_eds_set_complete (GtdTask *task,
- gboolean complete)
- {
-- icalproperty_status status;
-- icaltimetype *dt;
-+ ICalPropertyStatus status;
-+ ICalTime *dt;
- GtdTaskEds *self;
- gint percent;
-
-@@ -209,54 +210,54 @@ gtd_task_eds_set_complete (GtdTask *task,
- percent = 100;
- status = ICAL_STATUS_COMPLETED;
-
-- dt = g_new0 (icaltimetype, 1);
-- dt->year = g_date_time_get_year (now);
-- dt->month = g_date_time_get_month (now);
-- dt->day = g_date_time_get_day_of_month (now);
-- dt->hour = g_date_time_get_hour (now);
-- dt->minute = g_date_time_get_minute (now);
-- dt->second = g_date_time_get_seconds (now);
-- dt->zone = icaltimezone_get_utc_timezone ();
-+ dt = i_cal_time_new_null_time ();
-+ i_cal_time_set_date (dt,
-+ g_date_time_get_year (now),
-+ g_date_time_get_month (now),
-+ g_date_time_get_day_of_month (now));
-+ i_cal_time_set_time (dt,
-+ g_date_time_get_hour (now),
-+ g_date_time_get_minute (now),
-+ g_date_time_get_seconds (now));
-+ i_cal_time_set_timezone (dt, i_cal_timezone_get_utc_timezone ());
-
- /* convert timezone
- *
- * FIXME: This does not do anything until we have an ical
- * timezone associated with the task
- */
-- icaltimezone_convert_time (dt, NULL, icaltimezone_get_utc_timezone ());
-+ i_cal_time_convert_timezone (dt, NULL, i_cal_timezone_get_utc_timezone ());
- }
- else
- {
- dt = NULL;
- percent = 0;
-- status = ICAL_STATUS_NEEDSACTION;
-+ status = I_CAL_STATUS_NEEDSACTION;
- }
-
-- e_cal_component_set_percent_as_int (self->component, percent);
-+ e_cal_component_set_percent_complete (self->component, percent);
- e_cal_component_set_status (self->component, status);
- e_cal_component_set_completed (self->component, dt);
-
-- if (dt)
-- e_cal_component_free_icaltimetype (dt);
-+ g_clear_object (&dt);
- }
-
- static GDateTime*
- gtd_task_eds_get_creation_date (GtdTask *task)
- {
-- icaltimetype *idt;
-+ ICalTime *idt;
- GtdTaskEds *self;
- GDateTime *dt;
-
- self = GTD_TASK_EDS (task);
-- idt = NULL;
- dt = NULL;
-
-- e_cal_component_get_created (self->component, &idt);
-+ idt = e_cal_component_get_created (self->component);
-
- if (idt)
- dt = convert_icaltime (idt);
-
-- g_clear_pointer (&idt, e_cal_component_free_icaltimetype);
-+ g_clear_object (&idt);
-
- return dt;
- }
-@@ -286,7 +287,7 @@ gtd_task_eds_set_description (GtdTask *task,
- static GDateTime*
- gtd_task_eds_get_due_date (GtdTask *task)
- {
-- ECalComponentDateTime comp_dt;
-+ ECalComponentDateTime *comp_dt;
- GtdTaskEds *self;
- GDateTime *date;
-
-@@ -294,10 +295,12 @@ gtd_task_eds_get_due_date (GtdTask *task)
-
- self = GTD_TASK_EDS (task);
-
-- e_cal_component_get_due (self->component, &comp_dt);
-+ comp_dt = e_cal_component_get_due (self->component);
-+ if (!comp_dt)
-+ return NULL;
-
-- date = convert_icaltime (comp_dt.value);
-- e_cal_component_free_datetime (&comp_dt);
-+ date = convert_icaltime (e_cal_component_datetime_get_value (comp_dt));
-+ e_cal_component_datetime_free (comp_dt);
-
- return date;
- }
-@@ -317,11 +320,10 @@ gtd_task_eds_set_due_date (GtdTask *task,
-
- if (dt != current_dt)
- {
-- ECalComponentDateTime comp_dt;
-- icaltimetype *idt;
-+ ECalComponentDateTime *comp_dt;
-+ ICalTime *idt;
-
-- comp_dt.value = NULL;
-- comp_dt.tzid = NULL;
-+ comp_dt = NULL;
- idt = NULL;
-
- if (!current_dt ||
-@@ -329,36 +331,34 @@ gtd_task_eds_set_due_date (GtdTask *task,
- dt &&
- g_date_time_compare (current_dt, dt) != 0))
- {
-- idt = g_new0 (icaltimetype, 1);
-+ idt = i_cal_time_new_null_time ();
-
- g_date_time_ref (dt);
-
- /* Copy the given dt */
-- idt->year = g_date_time_get_year (dt);
-- idt->month = g_date_time_get_month (dt);
-- idt->day = g_date_time_get_day_of_month (dt);
-- idt->hour = g_date_time_get_hour (dt);
-- idt->minute = g_date_time_get_minute (dt);
-- idt->second = g_date_time_get_seconds (dt);
-- idt->is_date = (idt->hour == 0 &&
-- idt->minute == 0 &&
-- idt->second == 0);
--
-- comp_dt.tzid = g_strdup ("UTC");
-+ i_cal_time_set_date (idt,
-+ g_date_time_get_year (dt),
-+ g_date_time_get_month (dt),
-+ g_date_time_get_day_of_month (dt));
-+ i_cal_time_set_time (idt,
-+ g_date_time_get_hour (dt),
-+ g_date_time_get_minute (dt),
-+ g_date_time_get_seconds (dt));
-+ i_cal_time_set_is_date (idt,
-+ i_cal_time_get_hour (idt) == 0 &&
-+ i_cal_time_get_minute (idt) == 0 &&
-+ i_cal_time_get_second (idt) == 0);
-
-- comp_dt.value = idt;
-+ comp_dt = e_cal_component_datetime_new_take (idt, g_strdup ("UTC"));
-
-- e_cal_component_set_due (self->component, &comp_dt);
-+ e_cal_component_set_due (self->component, comp_dt);
-
-- e_cal_component_free_datetime (&comp_dt);
-+ e_cal_component_datetime_free (comp_dt);
-
- g_date_time_unref (dt);
- }
- else if (!dt)
- {
-- idt = NULL;
-- comp_dt.tzid = NULL;
--
- e_cal_component_set_due (self->component, NULL);
- }
- }
-@@ -369,19 +369,13 @@ gtd_task_eds_set_due_date (GtdTask *task,
- static gint32
- gtd_task_eds_get_priority (GtdTask *task)
- {
-- g_autofree gint *priority = NULL;
- GtdTaskEds *self;
-
- g_assert (GTD_IS_TASK_EDS (task));
-
- self = GTD_TASK_EDS (task);
-
-- e_cal_component_get_priority (self->component, &priority);
--
-- if (!priority)
-- return -1;
--
-- return *priority;
-+ return e_cal_component_get_priority (self->component);
- }
-
- static void
-@@ -394,29 +388,26 @@ gtd_task_eds_set_priority (GtdTask *task,
-
- self = GTD_TASK_EDS (task);
-
-- e_cal_component_set_priority (self->component, &priority);
-+ e_cal_component_set_priority (self->component, priority);
- }
-
- static const gchar*
- gtd_task_eds_get_title (GtdTask *task)
- {
-- ECalComponentText summary;
- GtdTaskEds *self;
-
- g_return_val_if_fail (GTD_IS_TASK_EDS (task), NULL);
-
- self = GTD_TASK_EDS (task);
-
-- e_cal_component_get_summary (self->component, &summary);
--
-- return summary.value;
-+ return i_cal_component_get_summary (e_cal_component_get_icalcomponent (self->component));
- }
-
- static void
- gtd_task_eds_set_title (GtdTask *task,
- const gchar *title)
- {
-- ECalComponentText new_summary;
-+ ECalComponentText *new_summary;
- GtdTaskEds *self;
-
- g_return_if_fail (GTD_IS_TASK_EDS (task));
-@@ -424,10 +415,11 @@ gtd_task_eds_set_title (GtdTask *task,
-
- self = GTD_TASK_EDS (task);
-
-- new_summary.value = title;
-- new_summary.altrep = NULL;
-+ new_summary = e_cal_component_text_new (title, NULL);
-
-- e_cal_component_set_summary (self->component, &new_summary);
-+ e_cal_component_set_summary (self->component, new_summary);
-+
-+ e_cal_component_text_free (new_summary);
- }
-
-
-@@ -436,10 +428,10 @@ gtd_task_eds_subtask_added (GtdTask *task,
- GtdTask *subtask)
- {
- g_autoptr (GList) subtasks = NULL;
-- ECalComponentId *id;
-+ const gchar *uid;
- ECalComponent *comp;
-- icalcomponent *ical_comp;
-- icalproperty *property;
-+ ICalComponent *ical_comp;
-+ ICalProperty *property;
- GtdTaskEds *subtask_self;
- GtdTaskEds *self;
-
-@@ -450,17 +442,17 @@ gtd_task_eds_subtask_added (GtdTask *task,
- /* Hook with parent's :subtask_added */
- GTD_TASK_CLASS (gtd_task_eds_parent_class)->subtask_added (task, subtask);
-
-- id = e_cal_component_get_id (self->component);
-+ uid = e_cal_component_get_uid (self->component);
- comp = subtask_self->component;
- ical_comp = e_cal_component_get_icalcomponent (comp);
-- property = icalcomponent_get_first_property (ical_comp, ICAL_RELATEDTO_PROPERTY);
-+ property = i_cal_component_get_first_property (ical_comp, I_CAL_RELATEDTO_PROPERTY);
-
- if (property)
-- icalproperty_set_relatedto (property, id->uid);
-+ i_cal_property_set_relatedto (property, uid);
- else
-- icalcomponent_add_property (ical_comp, icalproperty_new_relatedto (id->uid));
-+ i_cal_component_take_property (ical_comp, i_cal_property_new_relatedto (uid));
-
-- e_cal_component_free_id (id);
-+ g_clear_object (&property);
- }
-
- static void
-@@ -468,8 +460,8 @@ gtd_task_eds_subtask_removed (GtdTask *task,
- GtdTask *subtask)
- {
- g_autoptr (GList) subtasks = NULL;
-- icalcomponent *ical_comp;
-- icalproperty *property;
-+ ICalComponent *ical_comp;
-+ ICalProperty *property;
- GtdTaskEds *subtask_self;
-
- subtask_self = GTD_TASK_EDS (subtask);
-@@ -480,12 +472,13 @@ gtd_task_eds_subtask_removed (GtdTask *task,
-
- /* Remove the parent link from the subtask's component */
- ical_comp = e_cal_component_get_icalcomponent (subtask_self->component);
-- property = icalcomponent_get_first_property (ical_comp, ICAL_RELATEDTO_PROPERTY);
-+ property = i_cal_component_get_first_property (ical_comp, I_CAL_RELATEDTO_PROPERTY);
-
- if (!property)
- return;
-
-- icalcomponent_remove_property (ical_comp, property);
-+ i_cal_component_remove_property (ical_comp, property);
-+ g_object_unref (property);
- }
-
-
-diff --git a/plugins/eds/gtd-task-list-eds.c b/plugins/eds/gtd-task-list-eds.c
-index eb48a73..5b71718 100644
---- a/plugins/eds/gtd-task-list-eds.c
-+++ b/plugins/eds/gtd-task-list-eds.c
-@@ -85,19 +85,19 @@ setup_parent_task (GtdTaskListEds *self,
- GtdTask *task)
- {
- ECalComponent *component;
-- icalcomponent *ical_comp;
-- icalproperty *property;
-+ ICalComponent *ical_comp;
-+ ICalProperty *property;
- GtdTask *parent_task;
- const gchar *parent_uid;
-
- component = gtd_task_eds_get_component (GTD_TASK_EDS (task));
- ical_comp = e_cal_component_get_icalcomponent (component);
-- property = icalcomponent_get_first_property (ical_comp, ICAL_RELATEDTO_PROPERTY);
-+ property = i_cal_component_get_first_property (ical_comp, I_CAL_RELATEDTO_PROPERTY);
-
- if (!property)
- return;
-
-- parent_uid = icalproperty_get_relatedto (property);
-+ parent_uid = i_cal_property_get_relatedto (property);
- parent_task = gtd_task_list_get_task_by_id (GTD_TASK_LIST (self), parent_uid);
-
- if (parent_task)
-@@ -112,6 +112,8 @@ setup_parent_task (GtdTaskListEds *self,
-
- g_ptr_array_add (self->pending_subtasks, data);
- }
-+
-+ g_object_unref (property);
- }
-
- static void
-@@ -161,8 +163,8 @@ on_view_objects_added_cb (ECalClientView *view,
- GtdTask *task;
- const gchar *uid;
-
-- component = e_cal_component_new_from_string (icalcomponent_as_ical_string (l->data));
-- e_cal_component_get_uid (component, &uid);
-+ component = e_cal_component_new_from_icalcomponent (i_cal_component_clone (l->data));
-+ uid = e_cal_component_get_uid (component);
-
- task = gtd_task_list_get_task_by_id (self, uid);
-
-@@ -211,8 +213,8 @@ on_view_objects_modified_cb (ECalClientView *view,
- GtdTask *task;
- const gchar *uid;
-
-- component = e_cal_component_new_from_string (icalcomponent_as_ical_string (l->data));
-- e_cal_component_get_uid (component, &uid);
-+ component = e_cal_component_new_from_icalcomponent (i_cal_component_clone (l->data));
-+ uid = e_cal_component_get_uid (component);
-
- task = gtd_task_list_get_task_by_id (self, uid);
-
-@@ -244,7 +246,7 @@ on_view_objects_removed_cb (ECalClientView *view,
- GtdTask *task;
-
- id = l->data;
-- task = gtd_task_list_get_task_by_id (self, id->uid);
-+ task = gtd_task_list_get_task_by_id (self, e_cal_component_id_get_uid (id));
-
- if (!task)
- continue;
-diff --git a/plugins/eds/meson.build b/plugins/eds/meson.build
-index ea84426..b37f0c6 100644
---- a/plugins/eds/meson.build
-+++ b/plugins/eds/meson.build
-@@ -8,10 +8,9 @@ plugins_ldflags += ['-Wl,--undefined=gtd_plugin_eds_register_types']
- ################
-
- eds_plugin_deps = [
-- dependency('libecal-1.2', version: '>= 3.13.90'),
-+ dependency('libecal-2.0', version: '>= 3.33.1'),
- dependency('libedataserver-1.2', version: '>= 3.17.1'),
- dependency('libedataserverui-1.2', version: '>= 3.17.1'),
-- dependency('libical', version: '>= 0.43'),
- ]
-
- eds_plugin_deps += gnome_todo_deps
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/gnome-todo.git/commitdiff/cc13ed9c23e27a7ea8f634a017cbf650cddd3778
More information about the pld-cvs-commit
mailing list