- (void) setProxyAddress: (id) sender
{
NSString * address = [sender stringValue];
- BOOL blank = [address isEqualToString: @""];
- if (!blank && [address rangeOfString: @"://"].location == NSNotFound)
- address = [@"http://" stringByAppendingString: address];
-
- if (blank || tr_httpIsValidURL([address UTF8String]))
- {
- tr_sessionSetProxy(fHandle, [address UTF8String]);
- [sender setStringValue: address];
- [fDefaults setObject: address forKey: @"ProxyAddress"];
- }
- else
- {
- NSBeep();
- [sender setStringValue: [fDefaults stringForKey: @"ProxyAddress"]];
- }
+ tr_sessionSetProxy(fHandle, [address UTF8String]);
+ [sender setStringValue: address];
+ [fDefaults setObject: address forKey: @"ProxyAddress"];
}
- (void) setProxyPort: (id) sender
if (start)
visibleRect.origin.y += height;
- for (NSInteger i = start ? 1 : 0; i<numberOfRects; i += 2)
+ for (NSInteger i = start ? 1 : 0; i < numberOfRects; i += 2)
{
NSRectFill(visibleRect);
- visibleRect.origin.y += 2 * height;
+ visibleRect.origin.y += 2.0 * height;
}
[super highlightSelectionInClipRect: clipRect];
if (start)
visibleRect.origin.y += height;
- for (NSInteger i = start ? 1 : 0; i<numberOfRects; i += 2)
+ for (NSInteger i = start ? 1 : 0; i < numberOfRects; i += 2)
{
NSRectFill(visibleRect);
- visibleRect.origin.y += 2 * height;
+ visibleRect.origin.y += 2.0 * height;
}
[super highlightSelectionInClipRect: clipRect];