]> Dogcows Code - chaz/thecheat/blobdiff - DocInterfaceActions.m
Remove support of Mac OS X 10.3 and earlier system, change codes for Mac OS X 10.7.
[chaz/thecheat] / DocInterfaceActions.m
index d9fe334861e98c0b29d538ee0fdf3f85a5c81126..b2e120868eb1c99ba5693694456ab48aeaf1976d 100644 (file)
@@ -1,9 +1,9 @@
 
 /*
  * The Cheat - The legendary universal game trainer for Mac OS X.
- * http://www.dogcows.com/chaz/wiki/TheCheat
+ * http://www.brokenzipper.com/trac/wiki/TheCheat
  *
- * Copyright (c) 2003-2010, Charles McGarvey et al.
+ * Copyright (c) 2003-2011, Charles McGarvey et al.
  *
  * Distributable under the terms and conditions of the 2-clause BSD
  * license; see the file COPYING for the legal text of the license.
@@ -52,7 +52,8 @@
 
 - (IBAction)ibSetRemoteCheater:(id)sender
 {
-       ChazLog( @"Selected %@", sender );
+       int timeout=5;
+    ChazLog( @"Selected %@", sender );
        
        if ( ![self shouldConnectWithServer:sender] ) {
                return;
@@ -62,7 +63,7 @@
        
        _resolvingService = [[sender representedObject] retain];
        [_resolvingService setDelegate:self];
-       [_resolvingService resolve];
+       [_resolvingService resolveWithTimeout:timeout];
 }
 
 - (void)netServiceDidResolveAddress:(NSNetService *)sender
                [self switchToCheatMode];
                
                int rowIndex = [_cheatData variableCount]-1;
-               if ( MacOSXVersion() >= 0x1030 ) {
-                       [ibCheatVariableTable selectRowIndexes:[NSIndexSet indexSetWithIndex:rowIndex] byExtendingSelection:NO];
-               }
-               else {
-                       [ibCheatVariableTable selectRow:rowIndex byExtendingSelection:NO];
-               }
+        [ibCheatVariableTable selectRowIndexes:[NSIndexSet indexSetWithIndex:rowIndex] byExtendingSelection:NO];
                // start editing the last added variable
                if ( [[NSUserDefaults standardUserDefaults] boolForKey:TCAutoStartEditingVarsPref] ) {
                        if ( top > 1 ) {
-                               // edit multiple
-                               if ( MacOSXVersion() >= 0x1030 ) {
-                                       [ibCheatVariableTable selectRowIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(rowIndex-top+1,top-1)]
-                                                                         byExtendingSelection:YES];
-                               }
-                               else {
-                                       for ( i = 1; i < top; i++ ) {
-                                               [ibCheatVariableTable selectRow:rowIndex-i byExtendingSelection:YES];
-                                       }
-                               }
+                [ibCheatVariableTable selectRowIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(rowIndex-top+1,top-1)] byExtendingSelection:YES];
                                [ibCheatVariableTable scrollRowToVisible:rowIndex];
                                [self ibRunEditVariablesSheet:nil];
                        }
                [self switchToCheatMode];
                
                int row = [_cheatData variableCount]-1;
-               if ( MacOSXVersion() >= 0x1030 ) {
-                       [ibCheatVariableTable selectRowIndexes:[NSIndexSet indexSetWithIndex:row] byExtendingSelection:NO];
-               }
-               else {
-                       [ibCheatVariableTable selectRow:row byExtendingSelection:NO];
-               }
+        [ibCheatVariableTable selectRowIndexes:[NSIndexSet indexSetWithIndex:row] byExtendingSelection:NO];
                // start editing new variable
                if ( [[NSUserDefaults standardUserDefaults] boolForKey:TCAutoStartEditingVarsPref] ) {
                        [ibCheatVariableTable editColumn:[ibCheatVariableTable columnWithIdentifier:@"address"] row:row withEvent:nil select:YES];
This page took 0.02253 seconds and 4 git commands to generate.