GNOME Bugzilla – Bug 503763
drag-and-drop save
Last modified: 2007-12-16 21:51:31 UTC
The "Save As" dialog should provide a file icon that can be dragged into a nautilus folder to save the file (and close the dialog). Similar behavior already exists in gnome-screenshot: The thumbnail displayed in the save dialog can be dragged into a nautilus folder. (I am using Ubuntu Gutsy.)
Having the draggable icon in the save-as dialog somewhat defeats the purpose of the whole drag-to-save idea, namely to avoid save dialogs... It would make more sense to have a file icon that can be embedded somewhere in the app window, e.g. in the notebook tab for the document.
What about making GtkToolButtons created with GTK_STOCK_SAVE/GTK_STOCK_SAVE_AS draggable? This of course still raises the question how signal the drop event. And when thinking about this: How would you figure out, which folder is represented by the window that received the dragged icon? Is there a specification for such stuff somewhere?
Ok, the relevant "specification" seems to be http://freedesktop.org/wiki/Specifications/XDS - quite sketch and hard to comprehend - sometimes I wish Freedesktop.org would have some kind of quality control. But one problem I've found there: Were to get the initial filename from, when dragging from some save I icon? Well, and I am pretty convinced this stuff has to working without any additional dialogs, since otherwise there is no convenience gain over our existing file dialog.
> Where to get the initial filename from, when dragging from some save icon? That's why I proposed to use the save-as dialog with its filename input field. The save-as dialog certainly has to stay anyway for accessability reasons. On the other hand giving the name _after_ dragging is probably better. (The concept could in future be extended to drag a file into another application. In that case no filename is necessary.) Drag-save without save-as dialog could behave as follows: - If the app knows a current file name (e.g. "foo"): - If a file "foo" already exists at the target location: - A (Nautilus?) dialog asks whether to (a) select a different name or (b) replace the file. (c) cancel the operation. - If (a): - The file is saved, using a unique generated name ("foo 1"). - The Nautilus "rename" mode is entered for the saved file. - If (b): - The previous file is replaced. - Else save "foo". - Else (saving a newly created document): - The file is saved, using a unique generated name ("new file", "new file 1"). - The Nautilus "rename" mode is entered for the saved file. Does that make sense? (I hope the pseudocode is readable.)
(In reply to comment #3) > Ok, the relevant "specification" seems to be > http://freedesktop.org/wiki/Specifications/XDS - quite sketch and hard to > comprehend - sometimes I wish Freedesktop.org would have some kind of quality > control. IIRC, the spec was written by ROX (http://roscidus.com/desktop/), so when in doubt, check what they do.
(In reply to comment #4) > Does that make sense? > (I hope the pseudocode is readable.) To me this sounds doable. Let's get some opinion from Alex Larsson.
There are existing xds implementations, both in nautilus (iirc) and as gtk patches . Search for XDS in this bugzilla.
*** This bug has been marked as a duplicate of 321211 ***