From 90540ad3219a0841ebc38e931fa3145306861a54 Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Fri, 17 Jan 2025 06:43:46 +0800 Subject: [PATCH 2/5] Revert "add blank touchbar to console" This reverts commit 445c5133f7f6ac2e39aaaf36f68e298c546a2eea. --- RController.m | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git RController.m RController.m index 0c19f7e..92ee414 100644 --- RController.m +++ RController.m @@ -316,21 +316,6 @@ static inline const char* NSStringUTF8String(NSString* self) } } -- (NSTouchBar *)makeTouchBar -{ - // Create TouchBar object - SLog(@"makeTouchBar"); - NSTouchBar *touchBar = [[NSTouchBar alloc] init]; - touchBar.delegate = self; - touchBar.customizationIdentifier = @"org.R-project.R.app.console"; - - // Set the default ordering of items. - touchBar.defaultItemIdentifiers = @[@"foo", NSTouchBarItemIdentifierOtherItemsProxy]; - touchBar.customizationAllowedItemIdentifiers = @[@"foo"]; - touchBar.principalItemIdentifier = @"foo"; - - return touchBar; -} - (void) awakeFromNib { @@ -382,6 +367,7 @@ static inline const char* NSStringUTF8String(NSString* self) [consoleTextView setContinuousSpellCheckingEnabled:NO]; // force 'no spell checker' [[consoleTextView textStorage] setDelegate:self]; + RTextView_autoCloseBrackets = [Preferences flagForKey:kAutoCloseBrackets withDefault:YES]; [self setupToolbar]; @@ -389,11 +375,6 @@ static inline const char* NSStringUTF8String(NSString* self) [RConsoleWindow setBackgroundColor:[defaultConsoleColors objectAtIndex:iBackgroundColor]]; // we need this, because "update" doesn't touch the color if it's equal - and by default the window has *no* background - not even the default one, so we bring it in sync [RConsoleWindow setDocumentEdited:YES]; - // Force essentially an empty TouchBar due to performance - // problems with Apple's default implemenation - [NSApplication sharedApplication].automaticCustomizeTouchBarMenuItemEnabled = YES; - consoleTextView.touchBar = [self makeTouchBar]; - SLog(@" - working directory setup timer"); WDirtimer = [NSTimer scheduledTimerWithTimeInterval:0.5 target:self -- 2.48.0