"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "shell/browser/ui/cocoa/electron_touch_bar.mm" between
electron-11.4.1.tar.gz and electron-11.4.2.tar.gz

About: Electron is a framework for creating native cross platform applications with web technologies like JavaScript, HTML, and CSS.

electron_touch_bar.mm  (electron-11.4.1):electron_touch_bar.mm  (electron-11.4.2)
skipping to change at line 554 skipping to change at line 554
bool showCloseButton = true; bool showCloseButton = true;
settings.Get("showCloseButton", &showCloseButton); settings.Get("showCloseButton", &showCloseButton);
item.showsCloseButton = showCloseButton; item.showsCloseButton = showCloseButton;
v8::Isolate* isolate = electron::JavascriptEnvironment::GetIsolate(); v8::Isolate* isolate = electron::JavascriptEnvironment::GetIsolate();
v8::HandleScope handle_scope(isolate); v8::HandleScope handle_scope(isolate);
gin_helper::PersistentDictionary child; gin_helper::PersistentDictionary child;
std::vector<gin_helper::PersistentDictionary> items; std::vector<gin_helper::PersistentDictionary> items;
if (settings.Get("child", &child) && child.Get("ordereredItems", &items)) { if (settings.Get("child", &child) && child.Get("orderedItems", &items)) {
item.popoverTouchBar = item.popoverTouchBar =
[self touchBarFromItemIdentifiers:[self identifiersFromSettings:items]]; [self touchBarFromItemIdentifiers:[self identifiersFromSettings:items]];
} }
} }
- (NSTouchBarItem*)makeGroupForID:(NSString*)id - (NSTouchBarItem*)makeGroupForID:(NSString*)id
withIdentifier:(NSString*)identifier { withIdentifier:(NSString*)identifier {
std::string s_id([id UTF8String]); std::string s_id([id UTF8String]);
if (![self hasItemWithID:s_id]) if (![self hasItemWithID:s_id])
return nil; return nil;
v8::Isolate* isolate = electron::JavascriptEnvironment::GetIsolate(); v8::Isolate* isolate = electron::JavascriptEnvironment::GetIsolate();
v8::HandleScope handle_scope(isolate); v8::HandleScope handle_scope(isolate);
gin_helper::PersistentDictionary settings = settings_[s_id]; gin_helper::PersistentDictionary settings = settings_[s_id];
gin_helper::PersistentDictionary child; gin_helper::PersistentDictionary child;
if (!settings.Get("child", &child)) if (!settings.Get("child", &child))
return nil; return nil;
std::vector<gin_helper::PersistentDictionary> items; std::vector<gin_helper::PersistentDictionary> items;
if (!child.Get("ordereredItems", &items)) if (!child.Get("orderedItems", &items))
return nil; return nil;
NSMutableArray* generatedItems = [NSMutableArray array]; NSMutableArray* generatedItems = [NSMutableArray array];
NSMutableArray* identifiers = [self identifiersFromSettings:items]; NSMutableArray* identifiers = [self identifiersFromSettings:items];
for (NSUInteger i = 0; i < [identifiers count]; ++i) { for (NSUInteger i = 0; i < [identifiers count]; ++i) {
if ([identifiers objectAtIndex:i] != if ([identifiers objectAtIndex:i] !=
NSTouchBarItemIdentifierOtherItemsProxy) { NSTouchBarItemIdentifierOtherItemsProxy) {
NSTouchBarItem* generatedItem = NSTouchBarItem* generatedItem =
[self makeItemForIdentifier:[identifiers objectAtIndex:i]]; [self makeItemForIdentifier:[identifiers objectAtIndex:i]];
if (generatedItem) { if (generatedItem) {
skipping to change at line 604 skipping to change at line 604
- (void)updateGroup:(NSGroupTouchBarItem*)item - (void)updateGroup:(NSGroupTouchBarItem*)item
withSettings:(const gin_helper::PersistentDictionary&)settings withSettings:(const gin_helper::PersistentDictionary&)settings
API_AVAILABLE(macosx(10.12.2)) { API_AVAILABLE(macosx(10.12.2)) {
v8::Isolate* isolate = electron::JavascriptEnvironment::GetIsolate(); v8::Isolate* isolate = electron::JavascriptEnvironment::GetIsolate();
v8::HandleScope handle_scope(isolate); v8::HandleScope handle_scope(isolate);
gin_helper::PersistentDictionary child; gin_helper::PersistentDictionary child;
if (!settings.Get("child", &child)) if (!settings.Get("child", &child))
return; return;
std::vector<gin_helper::PersistentDictionary> items; std::vector<gin_helper::PersistentDictionary> items;
if (!child.Get("ordereredItems", &items)) if (!child.Get("orderedItems", &items))
return; return;
item.groupTouchBar = item.groupTouchBar =
[self touchBarFromItemIdentifiers:[self identifiersFromSettings:items]]; [self touchBarFromItemIdentifiers:[self identifiersFromSettings:items]];
} }
- (NSTouchBarItem*)makeSegmentedControlForID:(NSString*)id - (NSTouchBarItem*)makeSegmentedControlForID:(NSString*)id
withIdentifier:(NSString*)identifier withIdentifier:(NSString*)identifier
API_AVAILABLE(macosx(10.12.2)) { API_AVAILABLE(macosx(10.12.2)) {
std::string s_id([id UTF8String]); std::string s_id([id UTF8String]);
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)