GNOME Bugzilla – Bug 316184
nautilus places sidebar doesn't have right click actions
Last modified: 2006-05-08 20:29:32 UTC
This bug has been opened here: http://bugzilla.ubuntu.com/show_bug.cgi?id=15286 "In nautilus, when using the sidebar in it's tree view you can right click on a mounted volumen or remote directory & interact with it (for example unmount it). The places sidebar shows mounted volumes & remote directories (mounted through nautilus "connect to server...") but can't unmount them."
*** Bug 319021 has been marked as a duplicate of this bug. ***
*** Bug 320166 has been marked as a duplicate of this bug. ***
*** Bug 329350 has been marked as a duplicate of this bug. ***
*** Bug 329780 has been marked as a duplicate of this bug. ***
*** Bug 335753 has been marked as a duplicate of this bug. ***
As said on bug #319022 we should maybe also add a "properties" menu item. With proposed patch for bug #321320 we add a GnomeVFSDrive object in the tree_view, so if it is accepted it will be easier to add items on the popup-menu depending on which type is the drive selected on the place sidebar.
Created attachment 64323 [details] [review] proposed patch This patch add Mount/Unmount/Eject menu items on the popup menu. When the action is done nautilus crashs in bookmarks_check_popup_sensitivity() when accessing at the drive, I don't know why yet, so it's still work-in-progress. I attach the patch here to have comments, is it done the right way ?
This bug is for GNOME 2.16 and I set priority to high to have the patch reviewed faster.
Created attachment 64334 [details] [review] fix the crash Ok was a trivial bug, forgotten to set a GnomeVFSDrive to NULL by default. The patch seems good to me now.
Created attachment 64347 [details] [review] add format option for floppy
Created attachment 64349 [details] [review] fix formating of mounted floppy Just seen bug #125819. gfloppy can't format mounted floppy, so the Format option shouldn't be visible if the drive is mounted. This patch fix the problem. We should keep an eye on bug #125819 to see how they solve the problem and apply the same solution here. Maybe we should popup a window asking the user if he want to unmount the floppy before formating it...
Nice patch, I cleaned up the formatting some more and committed it on HEAD. We really don't use conditionals without brackets in nautilus, but the formatting of the file was a mess anyway because I was to lazy to change it when copying stuff over from gtk+. Btw, there's a styleguide in the docs directory if you haven't noticed it yet. I also factored a get_selected_drive out of the callbacks and added mnemonics to the menu items. Oh, and please include a ChangeLog entry with future patches. Thanks. 2006-05-03 Martin Wehner <martin.wehner@gmail.com> * src/nautilus-places-sidebar.c: (volume_op_callback): (row_activated_callback), (bookmarks_popup_menu_detach_cb), (eject_for_type), (set_visibility), (bookmarks_check_popup_sensitivity), (get_selected_drive), (mount_shortcut_cb), (unmount_shortcut_cb), (eject_shortcut_cb), (format_shortcut_cb), (bookmarks_build_popup_menu): Add mount, unmount, eject and format menu items to the popup menu of drives in the places sidebar. (#316184) Based on a patch from Xavier Claessens <xclaesse@gmail.com>
*** Bug 340425 has been marked as a duplicate of this bug. ***
There is still one think remaining for this bug: unmount network volumes. that what's said on bug #340425. So I reopen this bug. I think we should add a GnomeVFSVolume to the tree-view's data because network volumes doesn't have GnomeVFSDrive. I'm working on it.
Created attachment 64852 [details] [review] proposed patch We can now unmount network volumes !
Created attachment 64853 [details] [review] Oops forgotten the ChangeLog
Great, thanks. It's on HEAD: 2006-05-08 Martin Wehner <martin.wehner@gmail.com> * src/nautilus-places-sidebar.c: (add_place), (update_places), (check_visibility), (bookmarks_check_popup_sensitivity), (get_selected_iter), (rename_selected_bookmark), (remove_selected_bookmarks), (mount_shortcut_cb), (unmount_shortcut_cb), (eject_shortcut_cb), (nautilus_places_sidebar_init): Add volume data to the list store and use it to show an unmount command for network volumes. (#316184) Patch from Xavier Claessens <xclaesse@gmail.com>