GNOME Bugzilla – Bug 319022
Should be possible to manage bookmarks from places sidebar
Last modified: 2006-07-24 22:46:38 UTC
As topic says. Should be possible to drag bookmarks into a preferred order, delete or rename them, etc. Other information:
This bug is mainly duplicate of #43311 and #318752
FWIW, I don't see why this is an issue. I can't do the same in anything else I run, and it doesn't seem to matter. (What does matter is doing it via the Places menu, which at first appears to be seperate to the bookmarks, but that's a totally different kettle of fish.)
*** Bug 324640 has been marked as a duplicate of this bug. ***
This bug is not a good candidate for use of the "Gnome target" field. This field is not a 'it would be nice' field, it's a 'Gnome releases may need to be delayed for this issue' field. It's intended for use by senior-ish bug triagers and the release team. Since this bug is not critical enough to delay a release of the entire desktop the designation has been removed. The 'Target Milestone' field is meant to be used to describe the version of the product that developers or the maintainers believe they should fix the bug by.
This bug seems mainly fixed. DnD folders add a bookmark, right-click on them and you can rename/delete them, as in GtkFileChooser. I keep this bug open because we can't change the order of bookmarks, GtkFileChooser can by DnD.
Created attachment 64540 [details] [review] rework of DnD Here is a proposed patch to improve DnD. It allows to reoder bookmarks by DnD. I don't know how does GtkFilechooser to prevent buildin bookmarks to be a drag source, so with this patch we can drag a buildin bookmark (a volume for example) and drop it where it is accepted if it is droped on personal bookmarks nautilus crashs. If you know how to prevent buildin bookmarks to be draged, tell me :-)
Xavier: I haven't really looked in detail at the patch, but you may be looking for gtk_tree_drag_dest_row_drop_possible() and/or gtk_tree_drag_source_row_draggable().
Xavier, have a look at how the gtk-filechooser does it. I think you have to implement the GtkDragSource interface for the tree model to prevent certain rows from being dragged.
Martin> ok I see how it should be done and I'm working on it, thanks. Changing Version to head because it's a big DnD rework and I think it shouldn't be done in the stable 2.14 branch.
Created attachment 64887 [details] [review] proposed patch Ok so I mainly copied code from GtkFileChooser, now it seems to works well for me but needs maybe more testing...
Created attachment 65072 [details] [review] updated to last CVS Same patch but updated to last CVS. I also add a little fix to not display "format" option in the popup-menu if the floppy is mounted.
Comment on attachment 65072 [details] [review] updated to last CVS Thanks, but I can't get it to work properly. It doesn't compile, and when I hack it into submission it throws lots of critical warnings and crashes almost always when reordering. Also please split the format floppy change in a separate patch.
Created attachment 68818 [details] [review] updated and fixed patch I'm back at work ! I updated the patch to last CVS and fixed some bugs. Now it works for me :-)
Thanks! It works great and is on HEAD: 2006-07-25 Martin Wehner <martin.wehner@gmail.com> * src/nautilus-places-sidebar.c: (add_place), (update_places): Take the sidebar as parameter and refilter it after adding. (reorder_bookmarks): Implement reordering of bookmarks. (drag_data_delete_callback), (drag_data_received_callback), (drag_motion_callback): Handle dragging of tree rows. (nautilus_places_sidebar_init) (_shortcuts_model_filter_class_init), (_shortcuts_model_filter_init), (shortcuts_model_filter_row_draggable), (shortcuts_model_filter_drag_data_get), (shortcuts_model_filter_drag_source_iface_init), (shortcuts_model_filter_new): Implement GtkTreeDragSource. (get_selected_iter), (bookmarks_check_popup_sensitivity), (loading_uri_callback): Use the filter model. Enable reordering of bookmarks in the places sidebar via Drag'n'Drop. (#319022) Patch from Xavier Claessens <xclaesse@gmail.com>