]> granicus.if.org Git - transmission/commitdiff
for the "torrent file" in the inspector, don't give information about the internal...
authorMitchell Livingston <livings124@transmissionbt.com>
Thu, 30 Oct 2008 01:37:46 +0000 (01:37 +0000)
committerMitchell Livingston <livings124@transmissionbt.com>
Thu, 30 Oct 2008 01:37:46 +0000 (01:37 +0000)
macosx/InfoWindowController.m
macosx/PiecesView.h
macosx/PiecesView.m
macosx/en.lproj/Localizable.strings

index 0ec6c360d07e20dea143de723846cb8fd7d80569..3311bc48da7eb7a2969cd1fb49a1166301acdf52 100644 (file)
@@ -441,12 +441,12 @@ typedef enum
         {
             NSString * location = [torrent publicTorrentLocation];
             [fTorrentLocationField setStringValue: [location stringByAbbreviatingWithTildeInPath]];
-            [fTorrentLocationField setToolTip: [location stringByAppendingFormat: @"\n\n%@", [torrent torrentLocation]]];
+            [fTorrentLocationField setToolTip: location];
         }
         else
         {
-            [fTorrentLocationField setStringValue: NSLocalizedString(@"Transmission Support Folder", "Inspector -> torrent location")];
-            [fTorrentLocationField setToolTip: [torrent torrentLocation]];
+            [fTorrentLocationField setStringValue: @""];
+            [fTorrentLocationField setToolTip: nil];
         }
         
         [fDateAddedField setObjectValue: [torrent dateAdded]];
index 34af6f49e8806dbf0d78f1d60c59a8778ed707bf..26421ef57060a5168527d6088ecc1b7426e70bcf 100644 (file)
@@ -33,7 +33,7 @@
     NSColor * fGreenAvailabilityColor, * fBluePieceColor;
     
     Torrent * fTorrent;
-    int fNumPieces, fAcross, fWidth, fExtraBorder;
+    NSInteger fNumPieces, fAcross, fWidth, fExtraBorder;
 }
 
 - (void) setTorrent: (Torrent *) torrent;
index c472903bf0106dced55b1f96c70dda63d0113670..16d1dc858e28a66d4266883b451d2ca55cc0c217 100644 (file)
@@ -82,7 +82,7 @@
         fNumPieces = MIN([fTorrent pieceCount], MAX_ACROSS * MAX_ACROSS);
         fAcross = ceil(sqrt(fNumPieces));
         
-        float width = [self bounds].size.width;
+        CGFloat width = [self bounds].size.width;
         fWidth = (width - (fAcross + 1) * BETWEEN) / fAcross;
         fExtraBorder = (width - ((fWidth + BETWEEN) * fAcross + BETWEEN)) / 2;
     }
     }
 
     int8_t * pieces = NULL;
-    float * piecesPercent = NULL;
+    CGFloat * piecesPercent = NULL;
     
     BOOL showAvailablity = [[NSUserDefaults standardUserDefaults] boolForKey: @"PiecesViewShowAvailability"];
     if (showAvailablity)
     }
     else
     {   
-        piecesPercent = (float *)tr_malloc(fNumPieces * sizeof(float));
+        piecesPercent = (CGFloat *)tr_malloc(fNumPieces * sizeof(CGFloat));
         [fTorrent getAmountFinished: piecesPercent size: fNumPieces];
     }
     
     NSImage * image = [self image];
     
-    int index = -1;
+    NSInteger index = -1;
     NSRect rect = NSMakeRect(0, 0, fWidth, fWidth);
     BOOL change = NO;
     
             else
             {
                 //always redraw "mixed"
-                float percent = showAvailablity ? (float)pieces[index]/HIGH_PEERS : piecesPercent[index];
+                CGFloat percent = showAvailablity ? (CGFloat)pieces[index]/HIGH_PEERS : piecesPercent[index];
                 NSColor * fullColor = showAvailablity ? fGreenAvailabilityColor : fBluePieceColor;
                 pieceColor = [[NSColor whiteColor] blendedColorWithFraction: percent ofColor: fullColor];
                 fPieces[index] = PIECE_SOME;
index e54867c1b2b2a0467c713eb26f65ac43de900854..d20d1a692d76f60d6a86a6e696f2671a2f330068 100644 (file)
Binary files a/macosx/en.lproj/Localizable.strings and b/macosx/en.lproj/Localizable.strings differ