emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] feature/tabs 5458493: Try to fix compilation errors on mac


From: Juri Linkov
Subject: [Emacs-diffs] feature/tabs 5458493: Try to fix compilation errors on macOS
Date: Tue, 3 Sep 2019 16:20:24 -0400 (EDT)

branch: feature/tabs
commit 5458493d76be9e6298dd11538080bd775d36d01d
Author: Juri Linkov <address@hidden>
Commit: Juri Linkov <address@hidden>

    Try to fix compilation errors on macOS
---
 src/nsmenu.m | 18 +++++++++---------
 src/nsterm.h | 10 +++++-----
 src/nsterm.m |  4 ++--
 3 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/src/nsmenu.m b/src/nsmenu.m
index 223561b..3faa3f2 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 ea0e5a4..fc17458 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 <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
 
 
diff --git a/src/nsterm.m b/src/nsterm.m
index 321cdc4..d95f7b9 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: )];
   }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]