37
37
#import " MMWindow.h"
38
38
39
39
40
- static NSString *MMDefaultToolbarImageName = @" Attention" ;
40
+ static NSString * const MMDefaultToolbarImageName = @" Attention" ;
41
41
static int MMAlertTextFieldHeight = 22 ;
42
42
43
- static const NSString * const MMToolbarMenuName = @" ToolBar" ;
44
- static const NSString * const MMTouchbarMenuName = @" TouchBar" ;
45
- static const NSString * const MMPopUpMenuPrefix = @" PopUp" ;
46
- static const NSString * const MMUserPopUpMenuPrefix = @" ]" ;
43
+ static NSString * const MMToolbarMenuName = @" ToolBar" ;
44
+ static NSString * const MMTouchbarMenuName = @" TouchBar" ;
45
+ static NSString * const MMPopUpMenuPrefix = @" PopUp" ;
46
+ static NSString * const MMUserPopUpMenuPrefix = @" ]" ;
47
47
48
48
// NOTE: By default a message sent to the backend will be dropped if it cannot
49
49
// be delivered instantly; otherwise there is a possibility that MacVim will
@@ -138,6 +138,7 @@ - (void)addToolbarItemToDictionaryWithLabel:(NSString *)title
138
138
- (void )addToolbarItemWithLabel : (NSString *)label
139
139
tip : (NSString *)tip icon : (NSString *)icon
140
140
atIndex : (int )idx ;
141
+ #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_12_2
141
142
- (void )addTouchbarItemWithLabel : (NSString *)label
142
143
icon : (NSString *)icon
143
144
tip : (NSString *)tip
@@ -151,6 +152,7 @@ - (void)updateTouchbarItemLabel:(NSString *)label
151
152
- (BOOL )touchBarItemForDescriptor : (NSArray *)desc
152
153
touchBar : (MMTouchBarInfo **)touchBarPtr
153
154
touchBarItem : (MMTouchBarItemInfo **)touchBarItemPtr ;
155
+ #endif
154
156
- (void )popupMenuWithDescriptor : (NSArray *)desc
155
157
atRow : (NSNumber *)row
156
158
column : (NSNumber *)col ;
@@ -1109,10 +1111,12 @@ - (void)alertDidEnd:(MMAlert *)alert code:(int)code context:(void *)context
1109
1111
pid, identifier, ex);
1110
1112
}
1111
1113
}
1114
+
1112
1115
+ (bool ) hasPopupPrefix : (NSString *) menuName
1113
1116
{
1114
1117
return [menuName hasPrefix: MMPopUpMenuPrefix] || [menuName hasPrefix: MMUserPopUpMenuPrefix];
1115
1118
}
1119
+
1116
1120
- (NSMenuItem *)menuItemForDescriptor : (NSArray *)desc
1117
1121
{
1118
1122
if (!(desc && [desc count ] > 0 )) return nil ;
0 commit comments