-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add "open image" option to editor #3431
Conversation
The name of the function "openFolder" is misleading because it can also be used to open files. Do you have any suggestion that is clear yet succint? Edit: |
The code at present is incorrect, and will print an error message when there's no media URL on the clipboard. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @user1823, I was able to replicate @dae's error. I believe the suggestions I left you should fix those errors. Your open image feature still doesn't work for me though.
Also, I suggest manually testing all your code changes to Anki using ./run if you aren't already. It allows you to catch these bugs!
Sorry. But, that is too much for me because I am not really a developer. Also, because my previous PR (#3412) also includes |
I don't know. Did you test your previous PR? |
Sorry, but I didn't (because I don't know how to). |
The error should be fixed now (thanks Ben). I would appreciate if someone could test whether the feature works correctly. |
Well, I tested this by creating an add-on that patches the function in Anki's latest beta. The open image function seems to work correctly after these changes. However, nothing happens when I click on the show in folder option. I will try to investigate the issue in the show in folder option tomorrow. |
With the latest change, the "show in folder" option also works. However, I am now directly using subprocess rather than using call. |
It didn't work. Probably, there is a trivial error but I couldn't find it. |
Co-authored-by: Ben Nguyen <105088397+bpnguyen107@users.noreply.github.com>
This reverts commit cf2b33e.
- Avoid reusing call(), as the startupinfo we were passing in was breaking the explorer invocation - Attempt to bring explorer to the front after the window has been show, as it otherwise appears under Anki (at least when running from source)
This works for me. Thanks! |
Damn, I'd intended to merge this in for beta 2. Oh well. |
No description provided.