aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJuri Linkov2019-09-03 23:19:37 +0300
committerJuri Linkov2019-09-03 23:19:37 +0300
commit5458493d76be9e6298dd11538080bd775d36d01d (patch)
tree3916049b57cf83b94a442a352020343924884005 /src
parenta365251d01f553a329b6ade5b8a9dd93099caf41 (diff)
downloademacs-5458493d76be9e6298dd11538080bd775d36d01d.tar.gz
emacs-5458493d76be9e6298dd11538080bd775d36d01d.zip
Try to fix compilation errors on macOS
Diffstat (limited to 'src')
-rw-r--r--src/nsmenu.m18
-rw-r--r--src/nsterm.h10
-rw-r--r--src/nsterm.m4
3 files changed, 16 insertions, 16 deletions
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)
1167 1167
1168 self = [super initWithIdentifier: identifier]; 1168 self = [super initWithIdentifier: identifier];
1169 emacsView = view; 1169 emacsView = view;
1170 [self setDisplayMode: NSTabbarDisplayModeIconOnly]; 1170 [self setDisplayMode: NSToolbarDisplayModeIconOnly];
1171 [self setSizeMode: NSTabbarSizeModeSmall]; 1171 [self setSizeMode: NSToolbarSizeModeSmall];
1172 [self setDelegate: self]; 1172 [self setDelegate: self];
1173 identifierToItem = [[NSMutableDictionary alloc] initWithCapacity: 10]; 1173 identifierToItem = [[NSMutableDictionary alloc] initWithCapacity: 10];
1174 activeIdentifiers = [[NSMutableArray alloc] initWithCapacity: 8]; 1174 activeIdentifiers = [[NSMutableArray alloc] initWithCapacity: 8];
@@ -1229,10 +1229,10 @@ update_frame_tab_bar (struct frame *f)
1229 [activeIdentifiers addObject: identifier]; 1229 [activeIdentifiers addObject: identifier];
1230 1230
1231 /* 2) create / reuse item */ 1231 /* 2) create / reuse item */
1232 NSTabbarItem *item = [identifierToItem objectForKey: identifier]; 1232 NSToolbarItem *item = [identifierToItem objectForKey: identifier];
1233 if (item == nil) 1233 if (item == nil)
1234 { 1234 {
1235 item = [[[NSTabbarItem alloc] initWithItemIdentifier: identifier] 1235 item = [[[NSToolbarItem alloc] initWithItemIdentifier: identifier]
1236 autorelease]; 1236 autorelease];
1237 [item setImage: img]; 1237 [item setImage: img];
1238 [item setTabTip: [NSString stringWithUTF8String: help]]; 1238 [item setTabTip: [NSString stringWithUTF8String: help]];
@@ -1262,17 +1262,17 @@ update_frame_tab_bar (struct frame *f)
1262 1262
1263/* delegate methods */ 1263/* delegate methods */
1264 1264
1265- (NSTabbarItem *)tabbar: (NSTabbar *)tabbar 1265- (NSToolbarItem *)tabbar: (NSToolbar *)tabbar
1266 itemForItemIdentifier: (NSString *)itemIdentifier 1266 itemForItemIdentifier: (NSString *)itemIdentifier
1267 willBeInsertedIntoTabbar: (BOOL)flag 1267 willBeInsertedIntoTabbar: (BOOL)flag
1268{ 1268{
1269 NSTRACE ("[EmacsTabbar tabbar: ...]"); 1269 NSTRACE ("[EmacsTabbar tabbar: ...]");
1270 1270
1271 /* Look up NSTabbarItem by identifier and return... */ 1271 /* Look up NSToolbarItem by identifier and return... */
1272 return [identifierToItem objectForKey: itemIdentifier]; 1272 return [identifierToItem objectForKey: itemIdentifier];
1273} 1273}
1274 1274
1275- (NSArray *)tabbarDefaultItemIdentifiers: (NSTabbar *)tabbar 1275- (NSArray *)tabbarDefaultItemIdentifiers: (NSToolbar *)tabbar
1276{ 1276{
1277 NSTRACE ("[EmacsTabbar tabbarDefaultItemIdentifiers:]"); 1277 NSTRACE ("[EmacsTabbar tabbarDefaultItemIdentifiers:]");
1278 1278
@@ -1281,7 +1281,7 @@ update_frame_tab_bar (struct frame *f)
1281} 1281}
1282 1282
1283/* for configuration palette (not yet supported) */ 1283/* for configuration palette (not yet supported) */
1284- (NSArray *)tabbarAllowedItemIdentifiers: (NSTabbar *)tabbar 1284- (NSArray *)tabbarAllowedItemIdentifiers: (NSToolbar *)tabbar
1285{ 1285{
1286 NSTRACE ("[EmacsTabbar tabbarAllowedItemIdentifiers:]"); 1286 NSTRACE ("[EmacsTabbar tabbarAllowedItemIdentifiers:]");
1287 1287
@@ -1301,7 +1301,7 @@ update_frame_tab_bar (struct frame *f)
1301/* optional and unneeded */ 1301/* optional and unneeded */
1302/* - tabbarWillAddItem: (NSNotification *)notification { } */ 1302/* - tabbarWillAddItem: (NSNotification *)notification { } */
1303/* - tabbarDidRemoveItem: (NSNotification *)notification { } */ 1303/* - tabbarDidRemoveItem: (NSNotification *)notification { } */
1304/* - (NSArray *)tabbarSelectableItemIdentifiers: (NSTabbar *)tabbar */ 1304/* - (NSArray *)tabbarSelectableItemIdentifiers: (NSToolbar *)tabbar */
1305 1305
1306@end /* EmacsTabbar */ 1306@end /* EmacsTabbar */
1307 1307
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;
526@class EmacsImage; 526@class EmacsImage;
527 527
528#ifdef NS_IMPL_COCOA 528#ifdef NS_IMPL_COCOA
529@interface EmacsTabbar : NSTabbar <NSTabbarDelegate> 529@interface EmacsTabbar : NSToolbar <NSToolbarDelegate>
530#else 530#else
531@interface EmacsTabbar : NSTabbar 531@interface EmacsTabbar : NSToolbar
532#endif 532#endif
533 { 533 {
534 EmacsView *emacsView; 534 EmacsView *emacsView;
@@ -548,11 +548,11 @@ typedef id instancetype;
548 enabled: (BOOL)enabled; 548 enabled: (BOOL)enabled;
549 549
550/* delegate methods */ 550/* delegate methods */
551- (NSTabbarItem *)tabbar: (NSTabbar *)tabbar 551- (NSToolbarItem *)tabbar: (NSToolbar *)tabbar
552 itemForItemIdentifier: (NSString *)itemIdentifier 552 itemForItemIdentifier: (NSString *)itemIdentifier
553 willBeInsertedIntoTabbar: (BOOL)flag; 553 willBeInsertedIntoTabbar: (BOOL)flag;
554- (NSArray *)tabbarDefaultItemIdentifiers: (NSTabbar *)tabbar; 554- (NSArray *)tabbarDefaultItemIdentifiers: (NSToolbar *)tabbar;
555- (NSArray *)tabbarAllowedItemIdentifiers: (NSTabbar *)tabbar; 555- (NSArray *)tabbarAllowedItemIdentifiers: (NSToolbar *)tabbar;
556@end 556@end
557 557
558 558
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)
1090 { 1090 {
1091 // Fix reappearing tool bar or tab bar in fullscreen for Mac OS X 10.7 1091 // Fix reappearing tool bar or tab bar in fullscreen for Mac OS X 10.7
1092 BOOL tarbar_visible = FRAME_EXTERNAL_TAB_BAR (f) ? YES : NO; 1092 BOOL tarbar_visible = FRAME_EXTERNAL_TAB_BAR (f) ? YES : NO;
1093 NSTabbar *tabbar = [FRAME_NS_VIEW (f) tabbar]; 1093 NSToolbar *tabbar = [FRAME_NS_VIEW (f) tabbar];
1094 if (! tarbar_visible != ! [tabbar isVisible]) 1094 if (! tarbar_visible != ! [tabbar isVisible])
1095 [tabbar setVisible: tarbar_visible]; 1095 [tabbar setVisible: tarbar_visible];
1096 BOOL toolbar_visible = FRAME_EXTERNAL_TOOL_BAR (f) ? YES : NO; 1096 BOOL toolbar_visible = FRAME_EXTERNAL_TOOL_BAR (f) ? YES : NO;
@@ -7335,7 +7335,7 @@ not_in_argv (NSString *arg)
7335#ifdef NS_IMPL_COCOA 7335#ifdef NS_IMPL_COCOA
7336 { 7336 {
7337 NSButton *toggleButton; 7337 NSButton *toggleButton;
7338 toggleButton = [window standardWindowButton: NSWindowTabbarButton]; 7338 toggleButton = [window standardWindowButton: NSWindowToolbarButton];
7339 [toggleButton setTarget: self]; 7339 [toggleButton setTarget: self];
7340 [toggleButton setAction: @selector (toggleTabbar: )]; 7340 [toggleButton setAction: @selector (toggleTabbar: )];
7341 } 7341 }