GNOME Bugzilla – Bug 377157
Add DnD files onto archiver files with help of file-roller
Last modified: 2008-08-04 23:07:31 UTC
Hi, I like this feature that I normally use in windows file manager to quickly add files to zip archives. You just drag some files and drop them onto a zip|rar file and it gets added to it. I'll attach a patch for making this in nautilus in conjunction with file-roller.
Created attachment 76868 [details] [review] Patch to add DnD files onto archiver files in nautilus I used GDK_ACTION_LINK as GdkDragAction because I tried with GDK_ACTION_PRIVATE and also GDK_ACTION_DEFAULT and neither of them got triggered in drag_data_received_callback even if I added them to gtk_drag_dest_set in nautilus_icon_dnd_init and in nautilus-icon-container.c:motion_notify_event() With GDK_ACTION_LINK is working fine.
Also see a screencast[1] of this feature (beware is 2.2MB gif file) in which I add some small files and then a 3.3MB file for which file-roller shows a nice progress bar till file gets added... I have to thank file-roller for having nice commandline option for adding files... [1] http://supertux.cenobioracing.com/archivos/nautilus_roller.gif
Created attachment 77129 [details] [review] Updated patch This new patch adds some improvements from comments on nautilus-list: - nautilus_is_archiver_file now checks that the extension is at the end of filename. - Use GDK_ACTION_COPY instead of GDK_ACTION_LINK, and it works for me now! - The launching code was moved to fm-directory-view so now it is used from both icon view and list view.
Created attachment 77141 [details] [review] New version to fix minor things Just fix indentation and remove unneeded comment...
Created attachment 77147 [details] [review] Now really looks for extension at end of filename Now really looks for extension at end of filename.
Created attachment 77598 [details] [review] Patch to add DnD files onto archiver files in nautilus based on mime-type This new patch just changes nautilus_is_archiver_file() to use mime types instead of file extensions, so it will integrate with nautilus mime type recognition, to show that I made this screencast: http://supertux.cenobioracing.com/archivos/roller_mime.gif
Thanks for your work on this. I'm personally not sure if this is something we want to support or not, but I don't want to see your efforts go to waste here! If you still want this feature, can you make an updated version of it against the GIO system and send it to the Nautilus Mailing List for consideration? I'm setting the patch statuses based on your last two comments (the first being obsolete, the second being "needs-work" w.r.t. GIO-port.) Thanks again. Helpful links: http://mail.gnome.org/mailman/listinfo/nautilus-list http://library.gnome.org/devel/gio/unstable/
(In reply to comment #7) > Thanks for your work on this. I'm personally not sure if this is something we Ok, I'll work on an updated version of the patch, I hope to have it cooked for the next weekend. Thanks for paying attention to this feature.
Created attachment 111589 [details] [review] Updated patch to nautilus svn trunk Hi, I updated the patch to svn trunk and also ported it to gio, now it's working fine again.
Thanks for your efforts. Alex already made some comments back in 2006 on the patch, and some of them were still valid: http://mail.gnome.org/archives/nautilus-list/2006-November/msg00044.html http://mail.gnome.org/archives/nautilus-list/2006-December/msg00015.html I committed a modified version of the patch: http://svn.gnome.org/viewvc/nautilus?view=revision&revision=14208 Closing as fixed.