Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Copy pathname of file #108

Closed
3 tasks done
wiz0u opened this issue Sep 25, 2019 · 11 comments
Closed
3 tasks done

Feature request: Copy pathname of file #108

wiz0u opened this issue Sep 25, 2019 · 11 comments
Assignees
Milestone

Comments

@wiz0u
Copy link

wiz0u commented Sep 25, 2019

Allow the user to copy the full pathname of the file currently viewed to the clipboard

Some ideas where to add this feature:

  • Right-click on the pathname displayed on top of window => 'Copy file path'
  • Right-click on the tab header => 'Copy file path' (could also work for non-current files)
  • In the Edit menu => 'Copy file path'
@variar variar self-assigned this Sep 25, 2019
@variar variar added this to the 2019.12 milestone Sep 25, 2019
@variar
Copy link
Owner

variar commented Sep 27, 2019

All options except "In the Edit menu" surprisingly require many small changes because only topmost main window and low level file reading classes store actual file path, no one in between (where we want to add a menu option) have access to this data (hey it's, encapsulation 😄 ).

However, I've been thinking of reworking that part of source code long ago and now there is an excuse to spend some time on it.

@wiz0u
Copy link
Author

wiz0u commented Sep 27, 2019

Actually the first 2 options are my preferred.
I didn't particularly expect this command to be available under the Edit menu.

So it's up to you if you find it simpler to implement on the first 2 options.

@wiz0u
Copy link
Author

wiz0u commented Sep 30, 2019

The "copy full path" works, thanks!

I see you added also "Open containing folder"

However, it never works in the Edit menu.
And on right-click tab header, it works only if the path is not an UNC path

When it works, it would be nice if it opens the folder and preselect the file
(explorer /select,)

@variar
Copy link
Owner

variar commented Sep 30, 2019

Moved Edit menu to separate issue #112.

As for "Open containing folder", I use Qt provided QDesktopServices::openUrl to do this cross-platform. UNC paths might be bug in my code (not using file:// url scheme properly), but preselecting a file is definitely system specific. I'll check if there is some library that provides better cross-platform support for this.

@variar
Copy link
Owner

variar commented Oct 1, 2019

Fixed Open containing folder in build 19.9.0.487 using code from Qt Creator sources

@wiz0u
Copy link
Author

wiz0u commented Oct 3, 2019

Works great now!

@wiz0u wiz0u closed this as completed Oct 3, 2019
@wiz0u
Copy link
Author

wiz0u commented Nov 15, 2019

I really miss a "Copy full path" menu item when right-clicking on the path textbox.
That seems like the most obvious place where one would expect this feature.

@wiz0u wiz0u reopened this Nov 15, 2019
@variar
Copy link
Owner

variar commented Nov 15, 2019

I really miss a "Copy full path" menu item when right-clicking on the path textbox.
That seems like the most obvious place where one would expect this feature.

Yes, that's on the todo list

@variar
Copy link
Owner

variar commented Nov 16, 2019

Added a context menu item to top line with path

@variar variar closed this as completed Nov 16, 2019
@wiz0u
Copy link
Author

wiz0u commented Nov 18, 2019

Thanks, but can you rename it as "Copy full path" rather than "Copy all"?
It would be more clear, and more consistent with the same option from the Edit menu and the tab header context menu.

@wiz0u
Copy link
Author

wiz0u commented Dec 9, 2019

Also make sure this copies only the path name (currently it copies the textbox content, which may contain "Indexing N%")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants