Changeset 9732


Ignore:
Timestamp:
Dec 12, 2009, 6:52:03 PM (12 years ago)
Author:
livings124
Message:

trivial tweaks here and there

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEWS

    r9714 r9732  
    1010  * Better prefetching of local data that's being uploaded to peers
    1111==== Mac ====
    12   * Fix 1.80 beta 1 IPv6 port check issue on 10.6
     12  * Fix 1.80 beta 1 IPv6 port check issue on Snow Leopard
    1313  * Fix 1.80 beta 1 bug when pasting a URL into the torrent window
    1414  * Updated Spanish, Italian, and Brazilian Portuguese localizations
  • trunk/macosx/BadgeView.m

    r9731 r9732  
    119119    NSRect badgeRect;
    120120    badgeRect.size = [badge size];
    121     badgeRect.origin.x = 0;
     121    badgeRect.origin.x = 0.0;
    122122    badgeRect.origin.y = height;
    123123   
     
    135135   
    136136    //string is in center of image
    137     NSRect stringRect = badgeRect;
    138     stringRect.origin.x += (NSWidth(badgeRect) - stringSize.width) * 0.5;
    139     stringRect.origin.y += (NSHeight(badgeRect) - stringSize.height) * 0.5 + (quit ? 2.0 : 1.0); //adjust for shadow, extra for quit
     137    NSRect stringRect;
     138    stringRect.origin.x = NSMinX(badgeRect) + (NSWidth(badgeRect) - stringSize.width) * 0.5;
     139    stringRect.origin.y = NSMinY(badgeRect) + (NSHeight(badgeRect) - stringSize.height) * 0.5
     140                            + (quit ? 2.0 : 1.0); //adjust for shadow, extra for quit
    140141    stringRect.size = stringSize;
    141142   
  • trunk/macosx/InfoWindowController.m

    r9726 r9732  
    17531753    for (NSUInteger i=0, trackerIndex = 0; i <= [selectedIndexes lastIndex]; ++i)
    17541754    {
    1755         id item = [fTrackers objectAtIndex: i];
    17561755        const BOOL isSelected = [selectedIndexes containsIndex: i];
    1757         const BOOL isGroup = [item isKindOfClass: [NSNumber class]];
    1758        
    1759         if (isGroup)
     1756       
     1757        if ([[fTrackers objectAtIndex: i] isKindOfClass: [NSNumber class]])
    17601758        {
    17611759            if (isSelected)
     
    17741772    }
    17751773   
     1774    NSAssert([removeIndexes count] > 0, @"Trying to remove no trackers.");
     1775   
    17761776    if ([[NSUserDefaults standardUserDefaults] boolForKey: @"WarningRemoveTrackers"])
    17771777    {
  • trunk/macosx/NSStringAdditions.m

    r9698 r9732  
    9595        return [NSString localizedStringWithFormat: @"%.1f M", speed];
    9696    else //insane speeds
    97         return [NSString localizedStringWithFormat: @"%.2f G", (speed / 1024.0f)];
     97        return [NSString localizedStringWithFormat: @"%.2f G", (speed / 1024.0)];
    9898}
    9999
     
    161161    else
    162162    {
    163         const NSInteger comparisonOptions = NSCaseInsensitiveSearch | NSNumericSearch | NSWidthInsensitiveSearch | NSForcedOrderingSearch;
     163        const NSStringCompareOptions comparisonOptions = NSCaseInsensitiveSearch | NSNumericSearch | NSWidthInsensitiveSearch
     164                                                            | NSForcedOrderingSearch;
    164165        return [self compare: string options: comparisonOptions range: NSMakeRange(0, [self length]) locale: [NSLocale currentLocale]];
    165166    }
     
    168169- (NSComparisonResult) compareNumeric: (NSString *) string
    169170{
    170     const NSInteger comparisonOptions = NSNumericSearch | NSForcedOrderingSearch;
     171    const NSStringCompareOptions comparisonOptions = NSNumericSearch | NSForcedOrderingSearch;
    171172    return [self compare: string options: comparisonOptions range: NSMakeRange(0, [self length]) locale: [NSLocale currentLocale]];
    172173}
Note: See TracChangeset for help on using the changeset viewer.