Commit 5458493d authored by Juri Linkov's avatar Juri Linkov

Try to fix compilation errors on macOS

parent a365251d
Pipeline #3039 failed with stage
in 10 minutes and 12 seconds
......@@ -1167,8 +1167,8 @@ - (instancetype)initForView: (EmacsView *)view withIdentifier: (NSString *)ident
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 @@ - (void) addDisplayItemWithImage: (EmacsImage *)img
[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 @@ - (void)validateVisibleItems
/* 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 @@ - (NSArray *)tabbarDefaultItemIdentifiers: (NSTabbar *)tabbar
}
/* for configuration palette (not yet supported) */
- (NSArray *)tabbarAllowedItemIdentifiers: (NSTabbar *)tabbar
- (NSArray *)tabbarAllowedItemIdentifiers: (NSToolbar *)tabbar
{
NSTRACE ("[EmacsTabbar tabbarAllowedItemIdentifiers:]");
......@@ -1301,7 +1301,7 @@ - (void)setVisible:(BOOL)shown
/* optional and unneeded */
/* - tabbarWillAddItem: (NSNotification *)notification { } */
/* - tabbarDidRemoveItem: (NSNotification *)notification { } */
/* - (NSArray *)tabbarSelectableItemIdentifiers: (NSTabbar *)tabbar */
/* - (NSArray *)tabbarSelectableItemIdentifiers: (NSToolbar *)tabbar */
@end /* EmacsTabbar */
......
......@@ -526,9 +526,9 @@ typedef id instancetype;
@class EmacsImage;
#ifdef NS_IMPL_COCOA
@interface EmacsTabbar : NSTabbar <NSTabbarDelegate>
@interface EmacsTabbar : NSToolbar <NSToolbarDelegate>
#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
......
......@@ -1090,7 +1090,7 @@ static NSRect constrain_frame_rect(NSRect frameRect, bool isFullscreen)
{
// 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 @@ This avoids an extra clear and redraw (flicker) at frame creation. */
#ifdef NS_IMPL_COCOA
{
NSButton *toggleButton;
toggleButton = [window standardWindowButton: NSWindowTabbarButton];
toggleButton = [window standardWindowButton: NSWindowToolbarButton];
[toggleButton setTarget: self];
[toggleButton setAction: @selector (toggleTabbar: )];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment