GNOME Bugzilla – Bug 153211
Add a "Copy Location" contextual menu item
Last modified: 2013-01-20 22:55:58 UTC
It would be useful to be able to copy the location of a specific file into the clipboard in the file chooser by right-clicking and selecting "Copy Location".
wouldn't it make more sense in Nautilus? after all... for me it seems that gtkFileSel was created to let the users open files in a certain application. if someone wants to find out where one of his files is, imho it's more intuitive to launch the file manager = nautilus. actually i was pretty sure that there's a copy-location entry in the right-click menu for a file in nautilus, but there was not ... i think it was because in web browsers there's always is a copy-link-address entry in the right click dialog...
sorry.i take it back... i found out that you can right-click in nautilus on a file, select 'preferences', and copy the 'Location' entry out. so i modify my comment: if you need to get the filename of a file, you can do that already with nautilus. imho there's no need to do it also in gtkFileSel.
> imho there's no need to do it also in gtkFileSel It would be useful.
I agree that it would be a useful option and since the right-click menu has enough room left for such a feature, it should IMO be added.
Created attachment 67477 [details] [review] gtk-file-chooser-copy-location.patch First pass at a patch. Would need more error checking in some functions. Questions are: - what do we do about multiple files being selected? - do we want tooltips? - do we want Ctrl+C to copy the selection as well?
Would it be easier to put a "Copy path" item in a (new) context menu of the path-buttons (one per directory level) that appear over the Location text field. (At least in Gnome 2.18.1) Since you can never right click on more than one of these, the issue of having multiple files selected won't occur there. It is also the place where I was first looking for a "Copy path" feature, now when I felt that I needed one. Of course it would not include the file name component, which could certainly be usedful. So if the above patch can be finished then it would be even better. I hope that such a context menu is easy to add. I might even try to do it myself. But I've never programemd GTK or Gnome, and I probably won't start within a month. Or should I just try to review the existing patch (that actually tryes to add a "better" feature, including the file name too)? Is there any good reason why copying a path should be forbidden, so that a patch will be rejected? As for #2 : Opening a new Nautilus, navigating N directories deep, opening properties and copying the entire path of a file would take about 6 + N clicks or keybord commands. To open a GtkFileChooserDialog from an application that has the current file open, right click and select "copy path" is 3 clicks or keys (2 if Ctrl+C would also work). It also seems more intuitive to mee, since the dialog was what I used to open or save the file just recently, thus the place that I associate with handling the path of that file. It is (thankfully!) possible to paste full paths into GtkFileChooserDialog, why not allow the natural counterpart - to copy a currently navigated/selected path?
Any update on this?
There is a 'Copy file's location' context menu item nowadays.