Skip to content

Attempt to enable folder creation in file chooser dialogs on macOS #18953

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

victoryforce
Copy link
Collaborator

This is certainly not needed for Linux and Windows, where even without this setting, the native dialogs offer folder creation functionality. I don't have macOS devices, so I need this PR to be tested by macOS users to see if it will actually enable the ability to create folders, which is disabled by default.

attn: @MStraeten @zisoft

@zisoft
Copy link
Collaborator

zisoft commented Jun 15, 2025

Unfortunately not:

Bildschirmfoto 2025-06-15 um 09 28 58

The "New Folder" button should appear on the left.

@zisoft
Copy link
Collaborator

zisoft commented Jun 15, 2025

I put a gtk_file_chooser_get_create_folders() to see wheather the change get applied.
It returns TRUE.

So most likely a gtk bug?

@victoryforce
Copy link
Collaborator Author

@zisoft Thanks for testing!

I put a gtk_file_chooser_get_create_folders() to see wheather the change get applied. It returns TRUE.

This setter and getter simply set and query the value of the property, so it is logical that the change to the property is actually applied.

So most likely a gtk bug?

Yes, it looks like GTK doesn't implement support for controlling this functionality on macOS. Or maybe GTK has not yet adapted to the changes in macOS, if it worked in earlier versions of macOS. In any case, I don't think there's anything we can do about it then. Trying to get around this and work directly with NSSavePanel seems like an ugly solution.

So what would you decide about #18930 and #18591?

And maybe it makes sense to accept this PR anyway in the hope that if GTK implements support in the future, the call to gtk_file_chooser_set_create_folders will do the right thing and support for creating folders will then be guaranteed to appear even if it is disabled by default on macOS? What's your take on this?

@zisoft
Copy link
Collaborator

zisoft commented Jun 15, 2025

And maybe it makes sense to accept this PR anyway in the hope that if GTK implements support in the future, the call to gtk_file_chooser_set_create_folders will do the right thing and support for creating folders will then be guaranteed to appear even if it is disabled by default on macOS? What's your take on this?

+1
With that changes applied I can continue to dig further into the issue on macOS.
I can't believe that such a basic functionality is not working in the gtk base libraries.

So what would you decide about #18930 and #18591?

Let's leave them open for now until we give up on this.

@MStraeten
Copy link
Collaborator

the file chooser doesn't need the "new folder" button - this wasn't so also available in earlier macos versions. It's the missing support for "cmd+shift+N" that makes the difference between macos 14 and macos 15.
In my sonoma virtual machine for building 13.5 release version there's no issue with creating a new folder.
So it's not gtk3 that broke stuff, it's apple ...

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

Successfully merging this pull request may close these issues.

3 participants