Changeset 6974


Ignore:
Timestamp:
Oct 28, 2008, 12:08:49 AM (12 years ago)
Author:
livings124
Message:

more trivial type changes

Location:
trunk/macosx
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/AddWindowController.h

    r5149 r6974  
    4444   
    4545    BOOL fDeleteTorrent, fDeleteEnable;
    46     int fGroupValue;
     46    NSInteger fGroupValue;
    4747   
    4848    NSTimer * fTimer;
  • trunk/macosx/AddWindowController.m

    r6887 r6974  
    3131#import "ExpandedPathToIconTransformer.h"
    3232
    33 #define UPDATE_SECONDS 1.0
     33#define UPDATE_SECONDS 1.0f
    3434
    3535@interface AddWindowController (Private)
     
    3737- (void) confirmAdd;
    3838
    39 - (void) folderChoiceClosed: (NSOpenPanel *) openPanel returnCode: (int) code contextInfo: (void *) contextInfo;
     39- (void) folderChoiceClosed: (NSOpenPanel *) openPanel returnCode: (NSInteger) code contextInfo: (void *) contextInfo;
    4040
    4141- (void) setGroupsMenu;
    4242- (void) changeGroupValue: (id) sender;
    4343
    44 - (void) sameNameAlertDidEnd: (NSAlert *) alert returnCode: (int) returnCode contextInfo: (void *) contextInfo;
     44- (void) sameNameAlertDidEnd: (NSAlert *) alert returnCode: (NSInteger) returnCode contextInfo: (void *) contextInfo;
    4545
    4646@end
     
    211211    {
    212212        NSString * fileString;
    213         int count = [fTorrent fileCount];
     213        NSInteger count = [fTorrent fileCount];
    214214        if (count != 1)
    215215            fileString = [NSString stringWithFormat: NSLocalizedString(@"%d files", "Add torrent -> info"), count];
     
    263263}
    264264
    265 - (void) folderChoiceClosed: (NSOpenPanel *) openPanel returnCode: (int) code contextInfo: (void *) contextInfo
     265- (void) folderChoiceClosed: (NSOpenPanel *) openPanel returnCode: (NSInteger) code contextInfo: (void *) contextInfo
    266266{
    267267    if (code == NSOKButton)
     
    303303}
    304304
    305 - (void) sameNameAlertDidEnd: (NSAlert *) alert returnCode: (int) returnCode contextInfo: (void *) contextInfo
     305- (void) sameNameAlertDidEnd: (NSAlert *) alert returnCode: (NSInteger) returnCode contextInfo: (void *) contextInfo
    306306{
    307307    if (([NSApp isOnLeopardOrBetter] ? [[alert suppressionButton] state] == NSOnState : returnCode == NSAlertThirdButtonReturn))
  • trunk/macosx/BlocklistDownloaderViewController.m

    r6818 r6974  
    3232- (id) initWithPrefsController: (PrefsController *) prefsController;
    3333- (void) startDownload;
    34 - (void) failureSheetClosed: (NSAlert *) alert returnCode: (int) code contextInfo: (void *) info;
     34- (void) failureSheetClosed: (NSAlert *) alert returnCode: (NSInteger) code contextInfo: (void *) info;
    3535
    3636@end
     
    5151    [fButton sizeToFit];
    5252    NSRect buttonFrame = [fButton frame];
    53     buttonFrame.size.width += 12.0; //sizeToFit sizes a bit too small
     53    buttonFrame.size.width += 12.0f; //sizeToFit sizes a bit too small
    5454    buttonFrame.origin.x -= buttonFrame.size.width - oldWidth;
    5555    [fButton setFrame: buttonFrame];
     
    147147}
    148148
    149 - (void) failureSheetClosed: (NSAlert *) alert returnCode: (int) code contextInfo: (void *) info
     149- (void) failureSheetClosed: (NSAlert *) alert returnCode: (NSInteger) code contextInfo: (void *) info
    150150{
    151151    [[alert window] orderOut: self];
  • trunk/macosx/CTGradient/CTGradientAdditions.m

    r6958 r6974  
    3333    color1.green = greenComponent;
    3434    color1.blue = blueComponent;
    35     color1.alpha = 1.0;
    36     color1.position = 0.0;
     35    color1.alpha = 1.0f;
     36    color1.position = 0.0f;
    3737   
    3838    CTGradientElement color2;
    39     color2.red = redComponent * 0.95;
    40     color2.green = greenComponent * 0.95;
    41     color2.blue = blueComponent * 0.95;
    42     color2.alpha = 1.0;
    43     color2.position = 0.5;
     39    color2.red = redComponent * 0.95f;
     40    color2.green = greenComponent * 0.95f;
     41    color2.blue = blueComponent * 0.95f;
     42    color2.alpha = 1.0f;
     43    color2.position = 0.5f;
    4444   
    4545    CTGradientElement color3;
    46     color3.red = redComponent * 0.85;
    47     color3.green = greenComponent * 0.85;
    48     color3.blue = blueComponent * 0.85;
    49     color3.alpha = 1.0;
    50     color3.position = 0.5;
     46    color3.red = redComponent * 0.85f;
     47    color3.green = greenComponent * 0.85f;
     48    color3.blue = blueComponent * 0.85f;
     49    color3.alpha = 1.0f;
     50    color3.position = 0.5f;
    5151   
    5252    CTGradientElement color4;
     
    5454    color4.green = greenComponent;
    5555    color4.blue = blueComponent;
    56     color4.alpha = 1.0;
    57     color4.position = 1.0;
     56    color4.alpha = 1.0f;
     57    color4.position = 1.0f;
    5858   
    5959    CTGradient * newInstance = [[[self class] alloc] init];
     
    7070{
    7171    if (!fProgressWhiteGradient)
    72         fProgressWhiteGradient = [[[self class] progressGradientForRed: 0.95 green: 0.95 blue: 0.95] retain];
     72        fProgressWhiteGradient = [[[self class] progressGradientForRed: 0.95f green: 0.95f blue: 0.95f] retain];
    7373    return fProgressWhiteGradient;
    7474}
     
    7878{
    7979    if (!fProgressGrayGradient)
    80         fProgressGrayGradient = [[[self class] progressGradientForRed: 0.7 green: 0.7 blue: 0.7] retain];
     80        fProgressGrayGradient = [[[self class] progressGradientForRed: 0.7f green: 0.7f blue: 0.7f] retain];
    8181    return fProgressGrayGradient;
    8282}
     
    8686{
    8787    if (!fProgressLightGrayGradient)
    88         fProgressLightGrayGradient = [[[self class] progressGradientForRed: 0.87 green: 0.87 blue: 0.87] retain];
     88        fProgressLightGrayGradient = [[[self class] progressGradientForRed: 0.87f green: 0.87f blue: 0.87f] retain];
    8989    return fProgressLightGrayGradient;
    9090}
     
    9494{
    9595    if (!fProgressBlueGradient)
    96         fProgressBlueGradient = [[[self class] progressGradientForRed: 0.35 green: 0.67 blue: 0.98] retain];
     96        fProgressBlueGradient = [[[self class] progressGradientForRed: 0.35f green: 0.67f blue: 0.98f] retain];
    9797    return fProgressBlueGradient;
    9898}
     
    102102{
    103103    if (!fProgressDarkBlueGradient)
    104         fProgressDarkBlueGradient = [[[self class] progressGradientForRed: 0.616 green: 0.722 blue: 0.776] retain];
     104        fProgressDarkBlueGradient = [[[self class] progressGradientForRed: 0.616f green: 0.722f blue: 0.776f] retain];
    105105    return fProgressDarkBlueGradient;
    106106}
     
    110110{
    111111    if (!fProgressGreenGradient)
    112         fProgressGreenGradient = [[[self class] progressGradientForRed: 0.44 green: 0.89 blue: 0.40] retain];
     112        fProgressGreenGradient = [[[self class] progressGradientForRed: 0.44f green: 0.89f blue: 0.40f] retain];
    113113    return fProgressGreenGradient;
    114114}
     
    118118{
    119119    if (!fProgressLightGreenGradient)
    120         fProgressLightGreenGradient = [[[self class] progressGradientForRed: 0.62 green: 0.99 blue: 0.58] retain];
     120        fProgressLightGreenGradient = [[[self class] progressGradientForRed: 0.62f green: 0.99f blue: 0.58f] retain];
    121121    return fProgressLightGreenGradient;
    122122}
     
    126126{
    127127    if (!fProgressDarkGreenGradient)
    128         fProgressDarkGreenGradient = [[[self class] progressGradientForRed: 0.627 green: 0.714 blue: 0.639] retain];
     128        fProgressDarkGreenGradient = [[[self class] progressGradientForRed: 0.627f green: 0.714f blue: 0.639f] retain];
    129129    return fProgressDarkGreenGradient;
    130130}
     
    134134{
    135135    if (!fProgressRedGradient)
    136         fProgressRedGradient = [[[self class] progressGradientForRed: 0.902 green: 0.439 blue: 0.451] retain];
     136        fProgressRedGradient = [[[self class] progressGradientForRed: 0.902f green: 0.439f blue: 0.451f] retain];
    137137    return fProgressRedGradient;
    138138}
     
    142142{
    143143    if (!fProgressYellowGradient)
    144         fProgressYellowGradient = [[[self class] progressGradientForRed: 0.933 green: 0.890 blue: 0.243] retain];
     144        fProgressYellowGradient = [[[self class] progressGradientForRed: 0.933f green: 0.890f blue: 0.243f] retain];
    145145    return fProgressYellowGradient;
    146146}
  • trunk/macosx/ExpandedPathToIconTransformer.m

    r4423 r6974  
    5151   
    5252    [icon setScalesWhenResized: YES];
    53     [icon setSize: NSMakeSize(16.0, 16.0)];
     53    [icon setSize: NSMakeSize(16.0f, 16.0f)];
    5454   
    5555    return icon;
  • trunk/macosx/NSStringAdditions.m

    r6960 r6974  
    4848    if (size < pow(1024, 2))
    4949    {
    50         convertedSize = size / 1024.0;
     50        convertedSize = size / 1024.0f;
    5151        unit = NSLocalizedString(@"KB", "File size - kilobytes");
    5252    }
  • trunk/macosx/PiecesView.m

    r6958 r6974  
    2929
    3030#define MAX_ACROSS 18
    31 #define BETWEEN 1.0
     31#define BETWEEN 1.0f
    3232
    3333#define HIGH_PEERS 30
     
    4747   
    4848    [fBack lockFocus];
    49     CTGradient * gradient = [CTGradient gradientWithBeginningColor: [NSColor colorWithCalibratedWhite: 0.0 alpha: 0.4]
    50                                 endingColor: [NSColor colorWithCalibratedWhite: 0.2 alpha: 0.4]];
    51     [gradient fillRect: [self bounds] angle: 90.0];
     49    CTGradient * gradient = [CTGradient gradientWithBeginningColor: [NSColor colorWithCalibratedWhite: 0.0f alpha: 0.4f]
     50                                endingColor: [NSColor colorWithCalibratedWhite: 0.2f alpha: 0.4f]];
     51    [gradient fillRect: [self bounds] angle: 90.0f];
    5252    [fBack unlockFocus];
    5353   
    5454    //store box colors
    55     fGreenAvailabilityColor = [[NSColor colorWithCalibratedRed: 0.0 green: 1.0 blue: 0.4 alpha: 1.0] retain];
    56     fBluePieceColor = [[NSColor colorWithCalibratedRed: 0.0 green: 0.4 blue: 0.8 alpha: 1.0] retain];
     55    fGreenAvailabilityColor = [[NSColor colorWithCalibratedRed: 0.0f green: 1.0f blue: 0.4f alpha: 1.0f] retain];
     56    fBluePieceColor = [[NSColor colorWithCalibratedRed: 0.0f green: 0.4f blue: 0.8f alpha: 1.0f] retain];
    5757           
    5858    //actually draw the box
     
    148148            NSColor * pieceColor = nil;
    149149           
    150             if (showAvailablity ? pieces[index] == -1 : piecesPercent[index] == 1.0)
     150            if (showAvailablity ? pieces[index] == -1 : piecesPercent[index] == 1.0f)
    151151            {
    152152                if (first || fPieces[index] != PIECE_FINISHED)
     
    164164                }
    165165            }
    166             else if (showAvailablity ? pieces[index] == 0 : piecesPercent[index] == 0.0)
     166            else if (showAvailablity ? pieces[index] == 0 : piecesPercent[index] == 0.0f)
    167167            {
    168168                if (first || fPieces[index] != PIECE_NONE)
  • trunk/macosx/StatsWindowController.m

    r6951 r6974  
    3434
    3535- (void) performResetStats;
    36 - (void) resetSheetClosed: (NSAlert *) alert returnCode: (int) code contextInfo: (void *) info;
     36- (void) resetSheetClosed: (NSAlert *) alert returnCode: (NSInteger) code contextInfo: (void *) info;
    3737
    3838@end
     
    7474   
    7575    //size all elements
    76     float oldWidth = [fUploadedLabelField frame].size.width;
     76    CGFloat oldWidth = [fUploadedLabelField frame].size.width;
    7777   
    7878    [fUploadedLabelField sizeToFit];
     
    8282    [fNumOpenedLabelField sizeToFit];
    8383   
    84     float maxWidth = MAX([fUploadedLabelField frame].size.width, [fDownloadedLabelField frame].size.width);
     84    CGFloat maxWidth = MAX([fUploadedLabelField frame].size.width, [fDownloadedLabelField frame].size.width);
    8585    maxWidth = MAX(maxWidth, [fRatioLabelField frame].size.width);
    8686    maxWidth = MAX(maxWidth, [fTimeLabelField frame].size.width);
     
    113113   
    114114    //resize reset button
    115     float oldButtonWidth = [fResetButton frame].size.width;
     115    CGFloat oldButtonWidth = [fResetButton frame].size.width;
    116116   
    117117    [fResetButton setTitle: NSLocalizedString(@"Reset", "Stats window -> reset button")];
     
    119119   
    120120    NSRect buttonFrame = [fResetButton frame];
    121     buttonFrame.size.width += 10.0;
     121    buttonFrame.size.width += 10.0f;
    122122    buttonFrame.origin.x -= buttonFrame.size.width - oldButtonWidth;
    123123    [fResetButton setFrame: buttonFrame];
     
    207207}
    208208
    209 - (void) resetSheetClosed: (NSAlert *) alert returnCode: (int) code contextInfo: (void *) info
     209- (void) resetSheetClosed: (NSAlert *) alert returnCode: (NSInteger) code contextInfo: (void *) info
    210210{
    211211    [[alert window] orderOut: nil];
  • trunk/macosx/StatusBarView.m

    r5421 r6974  
    3131    if ((self = [super initWithFrame: rect]))
    3232    {
    33         fGrayBorderColor = [[NSColor colorWithCalibratedRed: 171.0/255.0 green: 171.0/255.0 blue: 171.0/255.0 alpha: 1.0] retain];
     33        fGrayBorderColor = [[NSColor colorWithCalibratedRed: 171.0f/255.0f green: 171.0f/255.0f blue: 171.0f/255.0f alpha: 1.0f] retain];
    3434    }
    3535    return self;
     
    4444- (void) drawRect: (NSRect) rect
    4545{
    46     NSRect lineBorderRect = NSMakeRect(rect.origin.x, [self bounds].size.height - 1.0, rect.size.width, 1.0);
     46    NSRect lineBorderRect = NSMakeRect(rect.origin.x, [self bounds].size.height - 1.0f, rect.size.width, 1.0f);
    4747    if (NSIntersectsRect(lineBorderRect, rect))
    4848    {
     
    5353    }
    5454   
    55     lineBorderRect.origin.y = 0.0;
     55    lineBorderRect.origin.y = 0.0f;
    5656    if (NSIntersectsRect(lineBorderRect, rect))
    5757    {
  • trunk/macosx/TorrentGroup.h

    r6917 r6974  
    3131}
    3232
    33 - (id) initWithGroup: (int) group;
     33- (id) initWithGroup: (NSInteger) group;
    3434
    3535- (NSInteger) groupIndex;
    3636- (NSMutableArray *) torrents;
    3737
    38 - (float) ratio;
    39 - (float) uploadRate;
    40 - (float) downloadRate;
     38- (CGFloat) ratio;
     39- (CGFloat) uploadRate;
     40- (CGFloat) downloadRate;
    4141
    4242@end
  • trunk/macosx/TorrentGroup.m

    r6917 r6974  
    2929@implementation TorrentGroup
    3030
    31 - (id) initWithGroup: (int) group
     31- (id) initWithGroup: (NSInteger) group
    3232{
    3333    if ((self = [super init]))
     
    5555}
    5656
    57 - (float) ratio
     57- (CGFloat) ratio
    5858{
    5959    uint64_t uploaded = 0, downloaded = 0;
     
    6969}
    7070
    71 - (float) uploadRate
     71- (CGFloat) uploadRate
    7272{
    73     float rate = 0.0;
     73    float rate = 0.0f;
    7474    NSEnumerator * enumerator = [fTorrents objectEnumerator];
    7575    Torrent * torrent;
     
    8080}
    8181
    82 - (float) downloadRate
     82- (CGFloat) downloadRate
    8383{
    84     float rate = 0.0;
     84    float rate = 0.0f;
    8585    NSEnumerator * enumerator = [fTorrents objectEnumerator];
    8686    Torrent * torrent;
Note: See TracChangeset for help on using the changeset viewer.