Make touchBar readwrite/nullable

This commit is contained in:
Kevin Sawicki 2017-02-27 10:49:45 -08:00
parent d4d3c78701
commit 69638a399c
2 changed files with 3 additions and 3 deletions

View file

@ -377,7 +377,7 @@ bool ScopedDisableResize::disable_resize_ = false;
- (void)resetTouchBar { - (void)resetTouchBar {
bar_items_ = [[NSMutableArray alloc] init]; bar_items_ = [[NSMutableArray alloc] init];
// self.touchBar = nil; self.touchBar = nil;
} }
- (NSMutableArray*)identifierArrayFromDicts:(std::vector<mate::PersistentDictionary>)dicts { - (NSMutableArray*)identifierArrayFromDicts:(std::vector<mate::PersistentDictionary>)dicts {
@ -435,7 +435,7 @@ bool ScopedDisableResize::disable_resize_ = false;
std::map<std::string, mate::PersistentDictionary> new_map; std::map<std::string, mate::PersistentDictionary> new_map;
item_id_map = new_map; item_id_map = new_map;
bar_items_ = [self identifierArrayFromDicts:shell_->GetTouchBarItems()]; bar_items_ = [self identifierArrayFromDicts:shell_->GetTouchBarItems()];
// self.touchBar = nil; self.touchBar = nil;
} }
- (NSTouchBar*)makeTouchBar { - (NSTouchBar*)makeTouchBar {

View file

@ -121,7 +121,7 @@ static const NSTouchBarItemIdentifier NSTouchBarItemIdentifierOtherItemsProxy =
@interface NSWindow (TouchBarSDK) @interface NSWindow (TouchBarSDK)
@property(strong, readonly) NSTouchBar* touchBar; @property(strong, readwrite, nullable) NSTouchBar* touchBar;
@end @end