Resolves #11. Pass the actual value, which should compile on macOS 10.15.7 and lower.

This commit is contained in:
Ryan McGrath 2021-06-28 13:11:41 -07:00
parent 9b3f85294f
commit aba18412cd
No known key found for this signature in database
GPG key ID: DA6CBD9233593DEA

View file

@ -87,7 +87,6 @@ extern "C" {
static NSToolbarShowColorsItemIdentifier: id; static NSToolbarShowColorsItemIdentifier: id;
static NSToolbarShowFontsItemIdentifier: id; static NSToolbarShowFontsItemIdentifier: id;
static NSToolbarSpaceItemIdentifier: id; static NSToolbarSpaceItemIdentifier: id;
static NSToolbarSidebarTrackingSeparatorItemIdentifier: id;
} }
impl ItemIdentifier { impl ItemIdentifier {
@ -103,7 +102,10 @@ impl ItemIdentifier {
Self::Fonts => NSToolbarShowFontsItemIdentifier, Self::Fonts => NSToolbarShowFontsItemIdentifier,
Self::Space => NSToolbarSpaceItemIdentifier, Self::Space => NSToolbarSpaceItemIdentifier,
Self::ToggleSidebar => NSToolbarToggleSidebarItemIdentifier, Self::ToggleSidebar => NSToolbarToggleSidebarItemIdentifier,
Self::SidebarTracker => NSToolbarSidebarTrackingSeparatorItemIdentifier
// This ensures that the framework compiles and runs on 10.15.7 and lower; it will
// not actually work on anything except 11.0+. Use a runtime check to be safe.
Self::SidebarTracker => NSString::no_copy("NSToolbarSidebarTrackingSeparatorItemIdentifier").into()
} }
} }
} }