Skip to content
Snippets Groups Projects
Commit 1ba07878 authored by George Nachman's avatar George Nachman
Browse files

Fixes for XCode 9, which makes publicly declared SDK ivars private.

parent b92c5a93
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -56,6 +56,7 @@ extern NSString *const kTerminalWindowStateRestorationWindowArrangementKey;
@property(nonatomic, readonly, getter=isTogglingLionFullScreen) BOOL togglingLionFullScreen;
// A unique identifier that does not get recycled during the program's lifetime.
@property(nonatomic, readonly) NSString *windowIdentifier;
@property(nonatomic, readonly) id<PTYWindowDelegateProtocol> ptyDelegate;
 
- (void)smartLayout;
- (void)setLayoutDone;
Loading
Loading
Loading
Loading
@@ -293,7 +293,7 @@ static NSInteger kNonAsciiFontButtonTag = 1;
[[NSFontManager sharedFontManager] orderFrontFontPanel:self];
}
 
- (NSUInteger)validModesForFontPanel:(NSFontPanel *)fontPanel {
- (NSFontPanelModeMask)validModesForFontPanel:(NSFontPanel *)fontPanel {
return kValidModesForFontPanel;
}
 
Loading
Loading
Loading
Loading
@@ -7465,7 +7465,7 @@ ITERM_WEAKLY_REFERENCEABLE
userInfo:nil];
}
 
- (NSUInteger)validModesForFontPanel:(NSFontPanel *)fontPanel
- (NSFontPanelModeMask)validModesForFontPanel:(NSFontPanel *)fontPanel
{
return kValidModesForFontPanel;
}
Loading
Loading
Loading
Loading
@@ -15,7 +15,7 @@
[NSFontManager setFontPanelFactory:[iTermFontPanel class]];
}
 
- (NSUInteger)validModesForFontPanel:(NSFontPanel *)fontPanel
- (NSFontPanelModeMask)validModesForFontPanel:(NSFontPanel *)fontPanel
{
return kValidModesForFontPanel;
}
Loading
Loading
Loading
Loading
@@ -56,14 +56,14 @@ ITERM_WEAKLY_REFERENCEABLE
- (BOOL)validateMenuItem:(NSMenuItem *)item {
if (item.action == @selector(performMiniaturize:)) {
// This makes borderless windows miniaturizable.
return ![_delegate anyFullScreen];
return ![self.ptyDelegate anyFullScreen];
} else {
return [super validateMenuItem:item];
}
}
 
- (void)performMiniaturize:(nullable id)sender {
if ([_delegate anyFullScreen]) {
if ([self.ptyDelegate anyFullScreen]) {
[super performMiniaturize:sender];
} else {
// NSWindow's performMiniaturize gates miniaturization on the presence of a miniaturize button.
Loading
Loading
@@ -368,7 +368,7 @@ ITERM_WEAKLY_REFERENCEABLE
}
 
- (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(nullable NSScreen *)screen {
if ([_delegate terminalWindowShouldConstrainFrameToScreen]) {
if ([self.ptyDelegate terminalWindowShouldConstrainFrameToScreen]) {
return [super constrainFrameRect:frameRect toScreen:screen];
} else {
return frameRect;
Loading
Loading
Loading
Loading
@@ -25,7 +25,7 @@
#pragma mark - Handlers for commands
 
- (id)handleSelectCommand:(NSScriptCommand *)command {
[[iTermController sharedInstance] setCurrentTerminal:_delegate];
[[iTermController sharedInstance] setCurrentTerminal:(PseudoTerminal *)self.ptyDelegate];
return nil;
}
 
Loading
Loading
@@ -40,14 +40,14 @@
Profile *profile = [[ProfileModel sharedInstance] defaultBookmark];
PTYSession *session =
[[iTermController sharedInstance] launchBookmark:profile
inTerminal:_delegate
inTerminal:(PseudoTerminal *)self.ptyDelegate
withURL:nil
hotkeyWindowType:iTermHotkeyWindowTypeNone
makeKey:YES
canActivate:NO
command:command
block:nil];
return [_delegate tabForSession:session];
return [self.ptyDelegate tabForSession:session];
}
 
- (id)handleCreateTabCommand:(NSScriptCommand *)scriptCommand {
Loading
Loading
@@ -63,35 +63,35 @@
}
PTYSession *session =
[[iTermController sharedInstance] launchBookmark:profile
inTerminal:_delegate
inTerminal:(PseudoTerminal *)self.ptyDelegate
withURL:nil
hotkeyWindowType:iTermHotkeyWindowTypeNone
makeKey:YES
canActivate:NO
command:command
block:nil];
return [_delegate tabForSession:session];
return [self.ptyDelegate tabForSession:session];
}
 
- (id)handleRevealHotkeyWindowCommand:(NSScriptCommand *)scriptCommand {
[[[iTermHotKeyController sharedInstance] profileHotKeyForWindowController:_delegate] revealForScripting];
[[[iTermHotKeyController sharedInstance] profileHotKeyForWindowController:(PseudoTerminal *)self.ptyDelegate] revealForScripting];
return nil;
}
 
- (id)handleHideHotkeyWindowCommand:(NSScriptCommand *)scriptCommand {
[[[iTermHotKeyController sharedInstance] profileHotKeyForWindowController:_delegate] hideForScripting];
[[[iTermHotKeyController sharedInstance] profileHotKeyForWindowController:(PseudoTerminal *)self.ptyDelegate] hideForScripting];
return nil;
}
 
- (id)handleToggleHotkeyWindowCommand:(NSScriptCommand *)scriptCommand {
[[[iTermHotKeyController sharedInstance] profileHotKeyForWindowController:_delegate] toggleForScripting];
[[[iTermHotKeyController sharedInstance] profileHotKeyForWindowController:(PseudoTerminal *)self.ptyDelegate] toggleForScripting];
return nil;
}
 
#pragma mark - Accessors
 
- (NSArray *)tabs {
return [_delegate tabs];
return [(PseudoTerminal *)self.ptyDelegate tabs];
}
 
- (void)setTabs:(NSArray *)tabs {
Loading
Loading
@@ -105,43 +105,43 @@
}
 
- (NSUInteger)countOfTabs {
return [[_delegate tabs] count];
return [[(PseudoTerminal *)self.ptyDelegate tabs] count];
}
 
- (id)valueInTabsAtIndex:(unsigned)anIndex {
return [_delegate tabs][anIndex];
return [(PseudoTerminal *)self.ptyDelegate tabs][anIndex];
}
 
- (void)replaceInTabs:(PTYTab *)replacementTab atIndex:(unsigned)anIndex {
[_delegate insertInTabs:replacementTab atIndex:anIndex];
[_delegate closeTab:[_delegate tabs][anIndex + 1]];
[self insertInTabs:replacementTab atIndex:anIndex];
[(PseudoTerminal *)self.ptyDelegate closeTab:[(PseudoTerminal *)self.ptyDelegate tabs][anIndex + 1]];
}
 
- (void)insertInTabs:(PTYTab *)tab atIndex:(unsigned)anIndex {
[_delegate insertTab:tab atIndex:anIndex];
[(PseudoTerminal *)self.ptyDelegate insertTab:tab atIndex:anIndex];
}
 
- (void)removeFromTabsAtIndex:(unsigned)anIndex {
NSArray *tabs = [_delegate tabs];
[_delegate closeTab:tabs[anIndex]];
NSArray *tabs = [(PseudoTerminal *)self.ptyDelegate tabs];
[(PseudoTerminal *)self.ptyDelegate closeTab:tabs[anIndex]];
}
 
 
- (PTYTab *)currentTab {
return [_delegate currentTab];
return [(PseudoTerminal *)self.ptyDelegate currentTab];
}
 
- (PTYSession *)currentSession {
return [_delegate currentSession];
return [(PseudoTerminal *)self.ptyDelegate currentSession];
}
 
- (BOOL)isHotkeyWindow {
return [_delegate isHotKeyWindow];
return [(PseudoTerminal *)self.ptyDelegate isHotKeyWindow];
}
 
- (NSString *)hotkeyWindowProfile {
if ([_delegate isHotKeyWindow]) {
return [[[[iTermHotKeyController sharedInstance] profileHotKeyForWindowController:_delegate] profile] objectForKey:KEY_NAME];
if ([(PseudoTerminal *)self.ptyDelegate isHotKeyWindow]) {
return [[[[iTermHotKeyController sharedInstance] profileHotKeyForWindowController:(PseudoTerminal *)self.ptyDelegate] profile] objectForKey:KEY_NAME];
} else {
return nil;
}
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment