After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 319022 - Should be possible to manage bookmarks from places sidebar
Should be possible to manage bookmarks from places sidebar
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: Sidebar
0.x.x [obsolete]
Other All
: Normal enhancement
: future
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 324640 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-10-16 22:27 UTC by Hidde Brugmans
Modified: 2006-07-24 22:46 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
rework of DnD (7.33 KB, patch)
2006-04-29 21:46 UTC, Xavier Claessens
needs-work Details | Review
proposed patch (20.18 KB, patch)
2006-05-05 21:02 UTC, Xavier Claessens
none Details | Review
updated to last CVS (19.28 KB, patch)
2006-05-09 09:34 UTC, Xavier Claessens
needs-work Details | Review
updated and fixed patch (18.44 KB, patch)
2006-07-12 14:26 UTC, Xavier Claessens
none Details | Review

Description Hidde Brugmans 2005-10-16 22:27:07 UTC
As topic says.
Should be possible to drag bookmarks into a preferred order, delete or rename
them, etc.

Other information:
Comment 1 Xavier Claessens 2005-11-12 09:56:14 UTC
This bug is mainly duplicate of #43311 and #318752
Comment 2 Thomas Winwood 2005-12-20 05:34:15 UTC
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.)
Comment 3 Christian Kirbach 2005-12-21 00:08:33 UTC
*** Bug 324640 has been marked as a duplicate of this bug. ***
Comment 4 Thomas Winwood 2005-12-21 04:08:11 UTC
*** Bug 324640 has been marked as a duplicate of this bug. ***
Comment 5 Allison Karlitskaya (desrt) 2006-01-07 21:13:11 UTC
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.
Comment 6 Xavier Claessens 2006-04-02 22:25:56 UTC
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.
Comment 7 Xavier Claessens 2006-04-29 21:46:12 UTC
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 :-)
Comment 8 Christian Neumair 2006-04-30 08:40:32 UTC
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().
Comment 9 Martin Wehner 2006-05-03 21:48:10 UTC
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.
Comment 10 Xavier Claessens 2006-05-04 15:50:06 UTC
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.
Comment 11 Xavier Claessens 2006-05-05 21:02:46 UTC
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...
Comment 12 Xavier Claessens 2006-05-09 09:34:25 UTC
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 13 Martin Wehner 2006-05-15 22:35:45 UTC
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.
Comment 14 Xavier Claessens 2006-07-12 14:26:14 UTC
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 :-)
Comment 15 Martin Wehner 2006-07-24 22:46:38 UTC
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>