Changeset 26

Show
Ignore:
Timestamp:
12/02/04 16:40:33 (4 years ago)
Author:
kevin
Message:

Add fixes for Jaguar.
Dynamic Ports tab is no longer shown under Jaguar (since it cannot be used).
The custom-built ssh binary is never used in Jaguar.
Set dynamic ports are ignored under Jaguar
Fixed an except under Jaguar in preferences
Tweaked positioning of tunnel details tabview to not cut off tabs in Jaguar

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/English.lproj/Preferences.nib/classes.nib

    r18 r26  
    118118                remotePortForwardTable = id;  
    119119                tunnelCompression = id;  
     120                tunnelDetailsTabView = NSTabView;  
    120121                tunnelDetailsView = id;  
    121122                tunnelHostname = id;  
  • trunk/English.lproj/Preferences.nib/info.nib

    r18 r26  
    2626                <string>446 468 495 234 0 0 1440 878 </string> 
    2727                <key>909</key> 
    28                 <string>446 470 495 229 0 0 1440 878 </string> 
     28                <string>447 465 495 234 0 0 1440 878 </string> 
    2929        </dict> 
    3030        <key>IBFramework Version</key> 
  • trunk/Libs/SSHTunnel.m

    r18 r26  
    186186                is /usr/bin. This is because the Panther-provided copy of ssh (and perhaps Jaguar-provided, 
    187187                I don't know) is broken wrt. dynamic ports */ 
     188        // Of course, since the build of ssh only works on Panther, we have to disable Dynamic Ports 
     189        // entirely under Jaguar 
    188190        NSString *toolPath; 
    189191        NSString *sshPathString = [[NSUserDefaults standardUserDefaults] stringForKey:sshToolsPathString]; 
    190         if([dynamicPortForwards count] > 0 && [[sshPathString stringByStandardizingPath] isEqualToString:@"/usr/bin"]) { 
    191                 /* Time to use our internal build */ 
    192                 toolPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"ssh"]; 
     192        if (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_2) { 
     193                // It's Jaguar 
     194                toolPath = [sshPathString stringByAppendingPathComponent:@"ssh"]; 
    193195        } else { 
    194                 toolPath = [sshPathString stringByAppendingPathComponent:@"ssh"]; 
     196                if([dynamicPortForwards count] > 0 && [[sshPathString stringByStandardizingPath] isEqualToString:@"/usr/bin"]) { 
     197                        /* Time to use our internal build */ 
     198                        toolPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"ssh"]; 
     199                } else { 
     200                        toolPath = [sshPathString stringByAppendingPathComponent:@"ssh"]; 
     201                } 
    195202        } 
    196203        arguments = [NSMutableArray arrayWithObject:toolPath]; 
     
    212219        } 
    213220         
    214         for(i=0; i < [dynamicPortForwards count]; i++) 
    215         { 
    216                 [arguments addObject:[NSString stringWithFormat:@"-D%d", 
    217                         [[dynamicPortForwards objectAtIndex:0] intValue]]]; 
     221        // No dynamic ports under Jaguar 
     222        if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_2) { 
     223                for(i=0; i < [dynamicPortForwards count]; i++) 
     224                { 
     225                        [arguments addObject:[NSString stringWithFormat:@"-D%d", 
     226                                [[dynamicPortForwards objectAtIndex:0] intValue]]]; 
     227                } 
    218228        } 
    219229 
  • trunk/PreferenceController.m

    r18 r26  
    112112        frame.origin.y -= newHeight + toolbarHeight; 
    113113        frame.size.height = newHeight + toolbarHeight; 
    114         frame.size.width = 500; 
     114        // We only resized larger to fit the Dynamic Ports tab, but that tab is gone on Jaguar 
     115        // So lets use the old size on Jaguar as well 
     116        if (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_2) { 
     117                frame.size.width = 475; 
     118        } else { 
     119                frame.size.width = 500; 
     120        } 
    115121         
    116122        frame = [NSWindow frameRectForContentRect:frame styleMask:[window styleMask]]; 
     
    142148                        [self resizeWindowToSize:[currentController viewSize]]; 
    143149 
    144                         [toolbar setSelectedItemIdentifier:identifier]; 
     150                        if ([toolbar respondsToSelector:@selector(setSelectedItemIdentifier:)]) 
     151                                [toolbar setSelectedItemIdentifier:identifier]; 
    145152                        [window setContentView:[currentController view]]; 
    146153 
  • trunk/PreferenceViews/TunnelsView.h

    r18 r26  
    55        IBOutlet id tunnelTable, delTunnelButton; 
    66        IBOutlet id tunnelDetailsView; 
     7        IBOutlet NSTabView *tunnelDetailsTabView; 
    78 
    89        IBOutlet id tunnelName, tunnelCompression, tunnelRemoteAccess; 
  • trunk/PreferenceViews/TunnelsView.m

    r18 r26  
    55 
    66@implementation TunnelsView 
     7 
     8- (void) awakeFromNib { 
     9        if (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_2) { 
     10                // Ack, we gotta disable the dynamic ports tab 
     11                int dynamicTabIndex = [tunnelDetailsTabView indexOfTabViewItemWithIdentifier:@"dynamicPorts"]; 
     12                NSTabViewItem *dynamicTab = [tunnelDetailsTabView tabViewItemAtIndex:dynamicTabIndex]; 
     13                [tunnelDetailsTabView removeTabViewItem:dynamicTab]; 
     14                dynamicPortForwardTable = nil; 
     15                delDynamicPortForwardButton = nil; 
     16        } 
     17} 
    718 
    819- (void)loadPreferences