GNOME Bugzilla – Bug 773562
It's possible to drag a list row widget out of the window, making the task unrecoverable but still present
Last modified: 2017-04-09 11:01:45 UTC
Created attachment 338559 [details] screencast Please see the attached screencast. We can grab the DND handle and drag the task row out of the ListBox and window. At first, this seems to follow the convention of several other programs (e.g. word processors removing tabs, Mac OS X Doc removing apps etc) where dragging it away means 'delete me'... However, this is not the case. The sidebar stays open and allows editing the task - or deleting it properly, generating a widget assertion failure. And the task still shows in the List preview on the lists page. But it can't be recovered again to use it. Dragging out of the listbox should either be impossible (i.e. the widget should not disappear), or it should fully delete the task.
Created attachment 338560 [details] screencast slightly better
Created attachment 349452 [details] [review] [PATCH] GtdTaskRow: Unhide GtdTaskRow when DnD fails
Surely according to my error message, the problem is that the widget is no longer valid, not that it's just hidden?
I understand what you mean. I can reproduce you behavior with the code from master. When the drag and drop starts, the task hides itself and is shown again when a successful DnD was made. But when the DnD fails (moving task out of the window) it stays hidden as long as you reopen the task list. This patch fixes this, and the critical messages does not appear when a task is deleted.
Review of attachment 349452 [details] [review]: Great job! A minor nitpick on the commit message: it doesn't follow GNOME To Do standard. It should be: "task-row: unhide row when drag fails" And we don't use "See also".
Created attachment 349497 [details] [review] task-row: show row when drag fails When a task is being draged out of the window or into the GtdEditPane it disappears from the task list until the list is reopened.
Thanks for the patch! Attachment 349497 [details] pushed as 59f168e - task-row: show row when drag fails
I just want to state that, while the commit message needed a minor tweak, the code was a high-quality piece. Good job!
There are situations where the dragging will succeed, but still shouldn't be removed from ToDo list. Say for example, it is possible to dnd some item to gnome-calendar, which will succeed, and thus the item will be hidden (removed?) from gnome-todo, which shouldn't happen. So if the the event is successfully dragged to some other application, only a copy of the item should be drag and dropped. Thanks
(In reply to Georges Basile Stavracas Neto from comment #8) > I just want to state that, while the commit message needed a minor tweak, > the code was a high-quality piece. Good job! Thanks a lot for this. Sorry for messing up the commit message. I did not made that much research on how you write the identifier... Shame on me. Many guides recommend to capitalize the first letter of the commit message, even after a lower case identifier. In my opinion the reading of: "task-row: Show row when drag fails" is easier than "task-row: show row when drag fails". For the next patches I will remember your convention on the commit message. About the "See also": I just wanted to state, that this patch possibly fixes both issues, because it might be a duplicate.
(In reply to Mohammed Sadiq from comment #9) > There are situations where the dragging will succeed, but still shouldn't be > removed from ToDo list. > > Say for example, it is possible to dnd some item to gnome-calendar, which > will succeed, and thus the item will be hidden (removed?) from gnome-todo, > which shouldn't happen. So if the the event is successfully dragged to some > other application, only a copy of the item should be drag and dropped. > > Thanks Can you please give more details on how you make a successful drag and drop to gnome-calendar? I can reproduce the hiding on gnome-todo 3.22.1 but not with this patch applied.
(In reply to Jens Sauer from comment #11) > Can you please give more details on how you make a successful drag and drop > to gnome-calendar? > Sure. Follow the steps to reproduce: 1. Open gnome-todo and gnome-calendar 2. switch gnome-calendar to month view (or some other view) 3. open some list in gnome-todo 4. drag some task from gnome-todo to some month column (say April 9) in gnome-calendar. Result: That task goes hidden in gnome-todo
(In reply to Mohammed Sadiq from comment #12) > Sure. Follow the steps to reproduce: > 1. Open gnome-todo and gnome-calendar > 2. switch gnome-calendar to month view (or some other view) > 3. open some list in gnome-todo > 4. drag some task from gnome-todo to some month column (say April 9) in > gnome-calendar. > > Result: > That task goes hidden in gnome-todo Ok, but the task does not appear as a calendar item in gnome-calendar right? It just disappears from gnome-todo. I can not reproduce your described issue with the patch applied, I consider it as fixed.