Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

cocoa: Add some bare-bones menus on the Mac to conform better to the Apple Human Interface Guidelines. #88

Merged
merged 2 commits into from
May 17, 2016

Conversation

pcwalton
Copy link

@pcwalton pcwalton commented May 13, 2016

Includes #86.

Requires servo/cocoa-rs#125.

r? @paulrouget


This change is Reviewable


// Set `CFBundleName` appropriately.
if let Some(app_name) = app_name {
let info_dictionary = CFBundle::main_bundle().info_dictionary();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did that require a change in core-foundation-rs?

@paulrouget
Copy link

Can't compile:

src/api/cocoa/mod.rs:385:43: 385:64 error: no associated item named `main_bundle` found for type `core_foundation::bundle::CFBundle` in the current scope
src/api/cocoa/mod.rs:385                     let info_dictionary = CFBundle::main_bundle().info_dictionary();

This is a bit dodgy: it takes advantage of the fact that bundle
dictionaries are mutable. But we don't really have another choice
without going to a `.app` bundle, which is incompatible with the way
Cargo works.
Apple Human Interface Guidelines.

For now, we only add menu items that are either completely implemented
by Cocoa or implemented ourselves. This means that, in particular, the
Edit and Help menus are absent, since Glutin does not implement these
features yet.

Requires servo/cocoa-rs#125.
@pcwalton
Copy link
Author

@paulrouget Dependency changes have landed. Should build now. r?

@paulrouget
Copy link

r+

@pcwalton
Copy link
Author

@bors-servo: r=paulrouget

@bors-servo
Copy link

📌 Commit 5787230 has been approved by paulrouget

@bors-servo
Copy link

⌛ Testing commit 5787230 with merge eded2f7...

bors-servo pushed a commit that referenced this pull request May 17, 2016
 	cocoa: Add some bare-bones menus on the Mac to conform better to the Apple Human Interface Guidelines.

Includes #86.

Requires servo/cocoa-rs#125.

r? @paulrouget

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/glutin/88)
<!-- Reviewable:end -->
@bors-servo
Copy link

☀️ Test successful - travis

@bors-servo bors-servo merged commit 5787230 into servo:servo May 17, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants