]> granicus.if.org Git - transmission/commitdiff
don't append "http" to addresses in the proxy address field
authorMitchell Livingston <livings124@transmissionbt.com>
Sun, 9 Nov 2008 12:12:29 +0000 (12:12 +0000)
committerMitchell Livingston <livings124@transmissionbt.com>
Sun, 9 Nov 2008 12:12:29 +0000 (12:12 +0000)
macosx/PrefsController.m
macosx/TorrentTableView.m
macosx/TrackerTableView.m

index f479ce12faeeda762ee1a9898b78e928766fffd7..70d41ed0e7cbcabfb51d571062477a26adf431f8 100644 (file)
@@ -715,22 +715,10 @@ tr_handle * fHandle;
 - (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
index 41a765b0a71744276a9dc1a94b30cd7917464276..56159b942d5b4befe1b0d5f883b96eab5e9a0383 100644 (file)
     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];
index df0e5795dd231fc9e96c05b53a020244a55c8fba..3eaf1d932cfba5593e5dd7f1dc95228a7592d261 100644 (file)
     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];