GNOME Bugzilla – Bug 787356
GtkPlacesSidebar: Dragged bookmarks can get inserted higher than the drawn line indicates
Last modified: 2018-05-02 19:04:06 UTC
(Originally filed in Nautilus at https://gitlab.gnome.org/GNOME/nautilus/issues/3 ) : Bookmarks drag and drop is back to behaving unpredictably and not reordering as intended (it seemed to be fixed for a while and working for the last couple of years, as far as I noticed at least). For example, with the following ~/.config/gtk-3.0/bookmarks content: file:///home/username/One file:///home/username/Two file:///home/username/Three file:///home/username/Four dragging "One" to below "Four" (green insertion line appears below "Four") in e.g. Nautilus or the GTK+ file chooser results in the following ordering: Two Three One Four
(In reply to Stephen from comment #0) > Two > Three > One > Four observation: That's descending by name. So I instantly think of bug 787100... What about other/more elaborate sets of names? Is there any consistent pattern?
(In reply to Daniel Boles from comment #1) > > observation: That's descending by name. So I instantly think of bug 787100... True, but coincidental. Actually, I've figured out the exact behaviour: Releasing the item when the exact cursor location (i.e. where the end of a normal mouse arrow *would* be) is *below* the displayed green line "drop location" puts the item in the correct place. Releasing when the cursor is *above* the green line puts it one position too high. In other words, the grabbed item is positioned *above* whatever item it is over, *not* where the green line is shown. This suggests the line drawing logic/code is entirely separate from the "move item to" logic/code. It should be shared!!
Created attachment 361093 [details] [review] gtkplacessidebar.c: move bookmark at the placeholder index As that index is set in drag_motion_callback() and visually shown on the widget as a drop target hint. -------------- Fix for the bug.
Changed component to "widget: other" as this bug is in GtkPlacesSidebar not in GtkFileChooser.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/904.