File tree Expand file tree Collapse file tree 4 files changed +27
-0
lines changed
Expand file tree Collapse file tree 4 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,14 @@ - (void)dealloc
108108 [super dealloc ];
109109}
110110
111+ - (BOOL ) canBecomeMainWindow {
112+ return YES ;
113+ }
114+
115+ - (BOOL ) canBecomeKeyWindow {
116+ return YES ;
117+ }
118+
111119- (BOOL )hideTablineSeparator : (BOOL )hide
112120{
113121 BOOL isHidden = [tablineSeparator isHidden ];
@@ -227,4 +235,15 @@ - (IBAction)realToggleFullScreen:(id)sender
227235#endif
228236}
229237
238+ - (void )setToolbar : (NSToolbar *)toolbar
239+ {
240+ if ([[NSUserDefaults standardUserDefaults ]
241+ boolForKey: MMNoTitleBarWindowKey]) {
242+ // MacVim can't have toolbar with No title bar setting.
243+ return ;
244+ }
245+
246+ [super setToolbar: toolbar];
247+ }
248+
230249@end // MMWindow
Original file line number Diff line number Diff line change @@ -130,6 +130,12 @@ - (id)initWithVimController:(MMVimController *)controller
130130 | NSMiniaturizableWindowMask | NSResizableWindowMask
131131 | NSUnifiedTitleAndToolbarWindowMask ;
132132
133+ if ([[NSUserDefaults standardUserDefaults ]
134+ boolForKey: MMNoTitleBarWindowKey]) {
135+ // No title bar setting
136+ styleMask &= ~NSTitledWindowMask ;
137+ }
138+
133139 // Use textured background on Leopard or later (skip the 'if' on Tiger for
134140 // polished metal window).
135141 if ([[NSUserDefaults standardUserDefaults ] boolForKey: MMTexturedWindowKey]
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ extern NSString *MMTranslateCtrlClickKey;
3737extern NSString *MMTopLeftPointKey;
3838extern NSString *MMOpenInCurrentWindowKey;
3939extern NSString *MMNoFontSubstitutionKey;
40+ extern NSString *MMNoTitleBarWindowKey;
4041extern NSString *MMLoginShellKey;
4142extern NSString *MMUntitledWindowKey;
4243extern NSString *MMTexturedWindowKey;
Original file line number Diff line number Diff line change 2929NSString *MMTopLeftPointKey = @" MMTopLeftPoint" ;
3030NSString *MMOpenInCurrentWindowKey = @" MMOpenInCurrentWindow" ;
3131NSString *MMNoFontSubstitutionKey = @" MMNoFontSubstitution" ;
32+ NSString *MMNoTitleBarWindowKey = @" MMNoTitleBarWindow" ;
3233NSString *MMLoginShellKey = @" MMLoginShell" ;
3334NSString *MMUntitledWindowKey = @" MMUntitledWindow" ;
3435NSString *MMTexturedWindowKey = @" MMTexturedWindow" ;
You can’t perform that action at this time.
0 commit comments