Changeset 6363
- Timestamp:
- Jul 19, 2008, 2:32:11 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEWS
r6323 r6363 20 20 + Status strings are toggled from the action button (they are no longer clickable) 21 21 + Colors in pieces bar and pieces box more accurately reflect their corresponding values 22 + The port checker now uses our own portcheck.transmissionbt.com 22 23 - GTK+ 23 24 + Add options to inhibit hibernation and to toggle the tray icon -
trunk/macosx/PortChecker.h
r4423 r6363 30 30 PORT_STATUS_OPEN, 31 31 PORT_STATUS_CLOSED, 32 PORT_STATUS_STEALTH,33 32 PORT_STATUS_ERROR 34 33 } port_status_t; -
trunk/macosx/PortChecker.m
r6252 r6363 26 26 #import "NSApplicationAdditions.h" 27 27 28 #define CHECKER_URL @"http s://www.grc.com/x/portprobe=%d"28 #define CHECKER_URL @"http://portcheck.transmissionbt.com/%d" 29 29 #define CHECK_FIRE 3.0 30 30 … … 115 115 - (void) connectionDidFinishLoading: (NSURLConnection *) connection 116 116 { 117 NS XMLDocument * shieldsUpProbe = [[NSXMLDocument alloc] initWithData: fPortProbeData options: NSXMLDocumentTidyHTML error: nil];117 NSString * probeString = [[NSString alloc] initWithData: fPortProbeData encoding: NSUTF8StringEncoding]; 118 118 [fPortProbeData release]; 119 119 fPortProbeData = nil; 120 120 121 if ( shieldsUpProbe)121 if (probeString) 122 122 { 123 NSArray * nodes = [shieldsUpProbe nodesForXPath: @"/html/body/center/table[3]/tr/td[2]" error: nil]; 124 if ([nodes count] == 1) 125 { 126 NSString * portStatus = [[[[nodes objectAtIndex: 0] stringValue] stringByTrimmingCharactersInSet: 127 [[NSCharacterSet letterCharacterSet] invertedSet]] lowercaseString]; 128 129 if ([portStatus isEqualToString: @"open"]) 130 [self callBackWithStatus: PORT_STATUS_OPEN]; 131 else if ([portStatus isEqualToString: @"stealth"]) 132 [self callBackWithStatus: PORT_STATUS_STEALTH]; 133 else if ([portStatus isEqualToString: @"closed"]) 134 [self callBackWithStatus: PORT_STATUS_CLOSED]; 135 else 136 { 137 NSLog(@"Unable to get port status: unknown port state"); 138 [self callBackWithStatus: PORT_STATUS_ERROR]; 139 } 140 } 123 if ([probeString isEqualToString: @"1"]) 124 [self callBackWithStatus: PORT_STATUS_OPEN]; 125 else if ([probeString isEqualToString: @"0"]) 126 [self callBackWithStatus: PORT_STATUS_CLOSED]; 141 127 else 142 128 { … … 144 130 [self callBackWithStatus: PORT_STATUS_ERROR]; 145 131 } 146 [ shieldsUpProberelease];132 [probeString release]; 147 133 } 148 134 else 149 135 { 150 NSLog(@"Unable to get port status: failed to create xml document");136 NSLog(@"Unable to get port status: invalid data received"); 151 137 [self callBackWithStatus: PORT_STATUS_ERROR]; 152 138 } -
trunk/macosx/PrefsController.m
r6361 r6363 57 57 #define RPC_KEYCHAIN_NAME "Remote" 58 58 59 #define WEBUI_URL @"http://localhost:%d/transmission/ clutch/"59 #define WEBUI_URL @"http://localhost:%d/transmission/web/" 60 60 61 61 @interface PrefsController (Private) … … 378 378 case PORT_STATUS_CLOSED: 379 379 [fPortStatusField setStringValue: NSLocalizedString(@"Port is closed", "Preferences -> Network -> port status")]; 380 [fPortStatusImage setImage: [NSImage imageNamed: @"RedDot.png"]];381 break;382 case PORT_STATUS_STEALTH:383 [fPortStatusField setStringValue: NSLocalizedString(@"Port is stealth", "Preferences -> Network -> port status")];384 380 [fPortStatusImage setImage: [NSImage imageNamed: @"RedDot.png"]]; 385 381 break; -
trunk/macosx/TransmissionHelp/html/portforward.html
r5533 r6363 62 62 63 63 64 <p>If you get a red dot and the message 'Port is closed' /'Port is Stealth', <a href="troubleshoot.html">click here</a>.</li>64 <p>If you get a red dot and the message 'Port is closed', <a href="troubleshoot.html">click here</a>.</li> 65 65 66 66
Note: See TracChangeset
for help on using the changeset viewer.