-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
macOS - open files from Finder and other apps #18288
Conversation
Works for me 👍 In If I drop a single image from finder onto the lighttable of the running application, it gets imported but not switched to darkroom. And I think @TurboGit will request some style changes :-) |
I don't think so. I tried to only touch things that would affect application launch, and nothing after darktable entered main(int argc, char *argv[]) (other than the #ifndefs that blocked the code from running in MAC_INTEGRATION mode).
I'll be honest, I don't know if I ever used drag/drop into the Lighttable view so I don't know the existing behavior. I did test my changes so that it didn't break anything. Did it go to darkroom before my changes? I can revert my private branch and test if you don't know off the top of your head. It sounds like going to the darkroom view is proper behavior, but did the macOS build follow this?
No worries. I'll fix whatever @TurboGit tells me to. Cheers, |
No, I thought this was another complaint by others. All good. |
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.
I'm not a macOS guy, this is already validated so good to me.
Just some minor style to conform to current dt guideline. TIA.
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.
Good to me now, thanks!
A side note, please never merge master branch into a topic branch like this one. I'll squash everything here, so no problem. |
@michmill1970 : on macOS 13 XCode 15.2 this is failing with:
|
I would suggest to use a simple |
The issue isn't with the vector, but with the way earier versions of XCode casts the NSString to something that can be used by the std::string constructor. By being more explicit in the code casting and creating the std::string, the problem should be fixed. The change has been committed and is awaiting your approval. Cheers, |
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.
The issue was due to the way the older XCode compiler was casting the NSString when constructing the std::string. This should fix it by being more explicit in the code.
Please DO NOT merge master into your topic branch. TIA. |
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.
Thanks!
This PR fixes the issue where files can't be opened in Darktable by Finder or other apps that use macOS Launch Services.
I've tested the repro steps in all issues related to #17298. All previously reported issues all work fine now.
Issues tested:
#17298 - passed
#17539 - passed
#17671 - passed
#17704 - passed
#18043 - passed
Tagging @zisoft as the macOS dev.
Cheers,
Mike