[gnome-todo] task-list-view: Save task on drop
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-todo] task-list-view: Save task on drop
- Date: Sat, 4 Apr 2020 00:47:55 +0000 (UTC)
commit 63818a37b6f93ced5f1bd171c8483bebeecb0770
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Fri Apr 3 21:47:04 2020 -0300
task-list-view: Save task on drop
After dropping a task, it is important to actually
save it, otherwise Drag n' Drop ends up being a
no-op.
src/task-list-view/gtd-task-list-view.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/src/task-list-view/gtd-task-list-view.c b/src/task-list-view/gtd-task-list-view.c
index 38673bb..848cc79 100644
--- a/src/task-list-view/gtd-task-list-view.c
+++ b/src/task-list-view/gtd-task-list-view.c
@@ -827,6 +827,7 @@ on_drop_target_drag_drop_cb (GtkDropTarget *drop_target,
{
GtdTaskListViewPrivate *priv;
GtkListBoxRow *drop_row;
+ GtdProvider *provider;
GtdTaskRow *hovered_row;
GtkWidget *row;
GtdTask *new_parent_task;
@@ -902,6 +903,10 @@ on_drop_target_drag_drop_cb (GtkDropTarget *drop_target,
if (new_position != current_position)
gtd_task_list_move_task_to_position (GTD_TASK_LIST (priv->model), source_task, new_position);
+ /* Finally, save the task */
+ provider = gtd_task_list_get_provider (gtd_task_get_list (source_task));
+ gtd_provider_update_task (provider, source_task);
+
check_dnd_scroll (self, TRUE, -1);
gdk_drop_finish (drop, GDK_ACTION_MOVE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]