touchBarFromMutatableArray -> touchBarFromItemIdentifiers

This commit is contained in:
Kevin Sawicki 2017-02-28 12:50:11 -08:00
parent b30f7c3c94
commit f297ba987e
2 changed files with 4 additions and 4 deletions

View file

@ -28,7 +28,7 @@
window:(atom::NativeWindow*)window; window:(atom::NativeWindow*)window;
- (NSTouchBar*)makeTouchBarFromItemOptions:(const std::vector<mate::PersistentDictionary>&)item_options; - (NSTouchBar*)makeTouchBarFromItemOptions:(const std::vector<mate::PersistentDictionary>&)item_options;
- (NSTouchBar*)touchBarFromMutatableArray:(NSMutableArray*)items; - (NSTouchBar*)touchBarFromItemIdentifiers:(NSMutableArray*)items;
- (NSMutableArray*)identifierArrayFromDicts:(const std::vector<mate::PersistentDictionary>&)dicts; - (NSMutableArray*)identifierArrayFromDicts:(const std::vector<mate::PersistentDictionary>&)dicts;
- (void)refreshTouchBarItem:(mate::Arguments*)args; - (void)refreshTouchBarItem:(mate::Arguments*)args;
- (void)clear; - (void)clear;

View file

@ -34,10 +34,10 @@ static NSTouchBarItemIdentifier SliderIdentifier = @"com.electron.touchbar.slide
- (NSTouchBar*)makeTouchBarFromItemOptions:(const std::vector<mate::PersistentDictionary>&)item_options { - (NSTouchBar*)makeTouchBarFromItemOptions:(const std::vector<mate::PersistentDictionary>&)item_options {
NSMutableArray* identifiers = [self identifierArrayFromDicts:item_options]; NSMutableArray* identifiers = [self identifierArrayFromDicts:item_options];
return [self touchBarFromMutatableArray:identifiers]; return [self touchBarFromItemIdentifiers:identifiers];
} }
- (NSTouchBar*)touchBarFromMutatableArray:(NSMutableArray*)items { - (NSTouchBar*)touchBarFromItemIdentifiers:(NSMutableArray*)items {
NSTouchBar* bar = [[NSClassFromString(@"NSTouchBar") alloc] init]; NSTouchBar* bar = [[NSClassFromString(@"NSTouchBar") alloc] init];
bar.delegate = delegate_; bar.delegate = delegate_;
bar.defaultItemIdentifiers = items; bar.defaultItemIdentifiers = items;
@ -328,7 +328,7 @@ static NSTouchBarItemIdentifier SliderIdentifier = @"com.electron.touchbar.slide
std::vector<mate::PersistentDictionary> touchBar; std::vector<mate::PersistentDictionary> touchBar;
if (options.Get("touchBar", &touchBar)) { if (options.Get("touchBar", &touchBar)) {
item.popoverTouchBar = [self touchBarFromMutatableArray:[self identifierArrayFromDicts:touchBar]]; item.popoverTouchBar = [self touchBarFromItemIdentifiers:[self identifierArrayFromDicts:touchBar]];
} }
} }