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

[macOS] Add ability to open multiple editor instances and global/dock menu access #25656

Merged
merged 1 commit into from
Aug 26, 2019

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Feb 6, 2019

Adds methods to access macOS dock and global menu.

Adds "New Windows" dock menu item (editor and project manager).
Adds favourite/recent project list to project manager dock menu.
Adds opened scene list to editor dock menu.

Double-clicking ".godot" files in Finder now open new instance as well.

screenshot 2019-02-07 at 00 05 04

@bruvzg bruvzg force-pushed the macos_multi_instances branch 2 times, most recently from 98f9fb9 to f3cf6bb Compare February 6, 2019 22:00
@bruvzg bruvzg requested review from reduz and a team as code owners February 6, 2019 22:00
@bruvzg bruvzg changed the title [macOS] Add ability to open multiple editor instances. [macOS] Add ability to open multiple editor instances and global/dock menu access Feb 6, 2019
@bruvzg bruvzg force-pushed the macos_multi_instances branch from f3cf6bb to ff3148d Compare February 6, 2019 22:10
@bruvzg
Copy link
Member Author

bruvzg commented Feb 6, 2019

Nice, clang-format is suggesting change that's causing build to fail on macOS.

@akien-mga
Copy link
Member

Nice, clang-format is suggesting change that's causing build to fail on macOS.

Hm, that's bad. The space in > > is needed in C++03, but we won't need it anymore when we move to C++11. The .clang-format file defines Standard: Cpp03, so it handles it properly in C++ files, but it seems like the ObjC++ files follow a different standard.

@akien-mga
Copy link
Member

4912f57 should fix the clang-format issue.

@samgreen
Copy link
Contributor

I don't have much to add other than a 👍 on this. Would be a big quality of life improvement for those of us building games on OS X.

@bruvzg bruvzg force-pushed the macos_multi_instances branch from ff3148d to 9a5feff Compare March 12, 2019 19:21
@akien-mga akien-mga requested a review from hpvb April 30, 2019 11:59
@akien-mga
Copy link
Member

The macOS-specific changes seem good to me.

CC @reduz and @hpvb to review the added OS APIs though, I wonder if it's fine to add those if they're only used on one platform.

@akien-mga
Copy link
Member

akien-mga commented Jun 20, 2019

I wonder if it's fine to add those if they're only used on one platform.

This is still my main concern with this PR, I don't want the OS singleton to get too many OS-specific features.

Would it be possible to implement this feature ad hoc in the macOS platform, exposing the relevant configuration in the platform's export settings? I see that the global menu action should be defined from script, so I guess this wouldn't play well with export options :/

@bruvzg bruvzg force-pushed the macos_multi_instances branch from 9a5feff to 1577509 Compare August 26, 2019 13:04
platform/osx/os_osx.mm Outdated Show resolved Hide resolved
…pen multiple editor/project manager instances, recent/favourite project list to project manager dock menu and opened scene list to editor dock menu.
@bruvzg bruvzg force-pushed the macos_multi_instances branch from 1577509 to db6d435 Compare August 26, 2019 13:46
@akien-mga akien-mga merged commit 2f63811 into godotengine:master Aug 26, 2019
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

5 participants