From: Juri Linkov Date: Tue, 3 Sep 2019 20:19:37 +0000 (+0300) Subject: Try to fix compilation errors on macOS X-Git-Tag: emacs-27.0.90~1328^2~17 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5458493d76be9e6298dd11538080bd775d36d01d;p=emacs.git Try to fix compilation errors on macOS --- diff --git a/src/nsmenu.m b/src/nsmenu.m index 223561b9730..3faa3f27087 100644 --- a/src/nsmenu.m +++ b/src/nsmenu.m @@ -1167,8 +1167,8 @@ update_frame_tab_bar (struct frame *f) self = [super initWithIdentifier: identifier]; emacsView = view; - [self setDisplayMode: NSTabbarDisplayModeIconOnly]; - [self setSizeMode: NSTabbarSizeModeSmall]; + [self setDisplayMode: NSToolbarDisplayModeIconOnly]; + [self setSizeMode: NSToolbarSizeModeSmall]; [self setDelegate: self]; identifierToItem = [[NSMutableDictionary alloc] initWithCapacity: 10]; activeIdentifiers = [[NSMutableArray alloc] initWithCapacity: 8]; @@ -1229,10 +1229,10 @@ update_frame_tab_bar (struct frame *f) [activeIdentifiers addObject: identifier]; /* 2) create / reuse item */ - NSTabbarItem *item = [identifierToItem objectForKey: identifier]; + NSToolbarItem *item = [identifierToItem objectForKey: identifier]; if (item == nil) { - item = [[[NSTabbarItem alloc] initWithItemIdentifier: identifier] + item = [[[NSToolbarItem alloc] initWithItemIdentifier: identifier] autorelease]; [item setImage: img]; [item setTabTip: [NSString stringWithUTF8String: help]]; @@ -1262,17 +1262,17 @@ update_frame_tab_bar (struct frame *f) /* delegate methods */ -- (NSTabbarItem *)tabbar: (NSTabbar *)tabbar +- (NSToolbarItem *)tabbar: (NSToolbar *)tabbar itemForItemIdentifier: (NSString *)itemIdentifier willBeInsertedIntoTabbar: (BOOL)flag { NSTRACE ("[EmacsTabbar tabbar: ...]"); - /* Look up NSTabbarItem by identifier and return... */ + /* Look up NSToolbarItem by identifier and return... */ return [identifierToItem objectForKey: itemIdentifier]; } -- (NSArray *)tabbarDefaultItemIdentifiers: (NSTabbar *)tabbar +- (NSArray *)tabbarDefaultItemIdentifiers: (NSToolbar *)tabbar { NSTRACE ("[EmacsTabbar tabbarDefaultItemIdentifiers:]"); @@ -1281,7 +1281,7 @@ update_frame_tab_bar (struct frame *f) } /* for configuration palette (not yet supported) */ -- (NSArray *)tabbarAllowedItemIdentifiers: (NSTabbar *)tabbar +- (NSArray *)tabbarAllowedItemIdentifiers: (NSToolbar *)tabbar { NSTRACE ("[EmacsTabbar tabbarAllowedItemIdentifiers:]"); @@ -1301,7 +1301,7 @@ update_frame_tab_bar (struct frame *f) /* optional and unneeded */ /* - tabbarWillAddItem: (NSNotification *)notification { } */ /* - tabbarDidRemoveItem: (NSNotification *)notification { } */ -/* - (NSArray *)tabbarSelectableItemIdentifiers: (NSTabbar *)tabbar */ +/* - (NSArray *)tabbarSelectableItemIdentifiers: (NSToolbar *)tabbar */ @end /* EmacsTabbar */ diff --git a/src/nsterm.h b/src/nsterm.h index ea0e5a44818..fc1745877d2 100644 --- a/src/nsterm.h +++ b/src/nsterm.h @@ -526,9 +526,9 @@ typedef id instancetype; @class EmacsImage; #ifdef NS_IMPL_COCOA -@interface EmacsTabbar : NSTabbar +@interface EmacsTabbar : NSToolbar #else -@interface EmacsTabbar : NSTabbar +@interface EmacsTabbar : NSToolbar #endif { EmacsView *emacsView; @@ -548,11 +548,11 @@ typedef id instancetype; enabled: (BOOL)enabled; /* delegate methods */ -- (NSTabbarItem *)tabbar: (NSTabbar *)tabbar +- (NSToolbarItem *)tabbar: (NSToolbar *)tabbar itemForItemIdentifier: (NSString *)itemIdentifier willBeInsertedIntoTabbar: (BOOL)flag; -- (NSArray *)tabbarDefaultItemIdentifiers: (NSTabbar *)tabbar; -- (NSArray *)tabbarAllowedItemIdentifiers: (NSTabbar *)tabbar; +- (NSArray *)tabbarDefaultItemIdentifiers: (NSToolbar *)tabbar; +- (NSArray *)tabbarAllowedItemIdentifiers: (NSToolbar *)tabbar; @end diff --git a/src/nsterm.m b/src/nsterm.m index 321cdc462ec..d95f7b90064 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -1090,7 +1090,7 @@ ns_update_begin (struct frame *f) { // Fix reappearing tool bar or tab bar in fullscreen for Mac OS X 10.7 BOOL tarbar_visible = FRAME_EXTERNAL_TAB_BAR (f) ? YES : NO; - NSTabbar *tabbar = [FRAME_NS_VIEW (f) tabbar]; + NSToolbar *tabbar = [FRAME_NS_VIEW (f) tabbar]; if (! tarbar_visible != ! [tabbar isVisible]) [tabbar setVisible: tarbar_visible]; BOOL toolbar_visible = FRAME_EXTERNAL_TOOL_BAR (f) ? YES : NO; @@ -7335,7 +7335,7 @@ not_in_argv (NSString *arg) #ifdef NS_IMPL_COCOA { NSButton *toggleButton; - toggleButton = [window standardWindowButton: NSWindowTabbarButton]; + toggleButton = [window standardWindowButton: NSWindowToolbarButton]; [toggleButton setTarget: self]; [toggleButton setAction: @selector (toggleTabbar: )]; }