Changeset 6979


Ignore:
Timestamp:
Oct 29, 2008, 1:18:03 AM (12 years ago)
Author:
livings124
Message:

update NEWS; trivial changes

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEWS

    r6976 r6979  
    1515   + In the file inspector tab, show progress and size for folders
    1616   + Scrollbars correctly appear when the main window auto-resizes
    17    + Sparkle updated to 1.5
     17   + Sparkle updated to 1.5b6
    1818- GTK+
    1919   + Option to automatically update the blocklist weekly
  • trunk/macosx/Torrent.m

    r6958 r6979  
    389389    if ((stopRatio = [self actualStopRatio]) == INVALID || (ratio = [self ratio]) >= stopRatio)
    390390        return 1.0;
    391     else if (stopRatio > 0)
     391    else if (stopRatio > 0.0)
    392392        return ratio / stopRatio;
    393393    else
    394         return 0;
     394        return 0.0;
    395395}
    396396
  • trunk/macosx/TorrentTableView.h

    r6134 r6979  
    4343    IBOutlet NSMenu * fContextRow, * fContextNoRow;
    4444   
    45     int fMouseControlRow, fMouseRevealRow, fMouseActionRow, fActionPushedRow;
     45    NSInteger fMouseControlRow, fMouseRevealRow, fMouseActionRow, fActionPushedRow;
    4646    NSArray * fSelectedValues;
    4747   
     
    4949    Torrent * fMenuTorrent;
    5050   
    51     float fPiecesBarPercent;
     51    CGFloat fPiecesBarPercent;
    5252    NSAnimation * fPiecesBarAnimation;
    5353}
    5454
    55 - (BOOL) isGroupCollapsed: (int) value;
    56 - (void) removeCollapsedGroup: (int) value;
     55- (BOOL) isGroupCollapsed: (NSInteger) value;
     56- (void) removeCollapsedGroup: (NSInteger) value;
    5757- (void) removeAllCollapsedGroups;
    5858- (void) saveCollapsedGroups;
    5959
    6060- (void) removeButtonTrackingAreas;
    61 - (void) setControlButtonHover: (int) row;
    62 - (void) setRevealButtonHover: (int) row;
    63 - (void) setActionButtonHover: (int) row;
     61- (void) setControlButtonHover: (NSInteger) row;
     62- (void) setRevealButtonHover: (NSInteger) row;
     63- (void) setActionButtonHover: (NSInteger) row;
    6464
    6565- (void) selectValues: (NSArray *) values;
     
    6767- (NSArray *) selectedTorrents;
    6868
    69 - (NSRect) iconRectForRow: (int) row;
     69- (NSRect) iconRectForRow: (NSInteger) row;
    7070
    7171- (void) paste: (id) sender;
     
    8585
    8686- (void) togglePiecesBar;
    87 - (float) piecesBarPercent;
     87- (CGFloat) piecesBarPercent;
    8888
    8989@end
  • trunk/macosx/TorrentTableView.m

    r6889 r6979  
    3737#define ACTION_MENU_LIMIT_TAG 103
    3838
    39 #define GROUP_SPEED_IMAGE_COLUMN_WIDTH 8.0
    40 #define GROUP_RATIO_IMAGE_COLUMN_WIDTH 10.0
     39#define GROUP_SPEED_IMAGE_COLUMN_WIDTH 8.0f
     40#define GROUP_RATIO_IMAGE_COLUMN_WIDTH 10.0f
    4141
    4242#define TOGGLE_PROGRESS_SECONDS 0.175
     
    9797        [self setDelegate: self];
    9898       
    99         fPiecesBarPercent = [fDefaults boolForKey: @"PiecesBar"] ? 1.0 : 0.0;
     99        fPiecesBarPercent = [fDefaults boolForKey: @"PiecesBar"] ? 1.0f : 0.0f;
    100100    }
    101101   
     
    123123}
    124124
    125 - (BOOL) isGroupCollapsed: (int) value
     125- (BOOL) isGroupCollapsed: (NSInteger) value
    126126{
    127127    if (value == -1)
     
    131131}
    132132
    133 - (void) removeCollapsedGroup: (int) value
     133- (void) removeCollapsedGroup: (NSInteger) value
    134134{
    135135    if (value == -1)
     
    175175        [cell setRepresentedObject: item];
    176176       
    177         int row = [self rowForItem: item];
     177        NSInteger row = [self rowForItem: item];
    178178        if ([NSApp isOnLeopardOrBetter])
    179179        {
     
    212212        //adjust placement for proper vertical alignment
    213213        if (column == [self columnWithIdentifier: @"Group"])
    214             rect.size.height -= 1.0;
     214            rect.size.height -= 1.0f;
    215215       
    216216        return rect;
     
    235235    else if (ident)
    236236    {
    237         int count = [[item torrents] count];
     237        NSInteger count = [[item torrents] count];
    238238        if (count == 1)
    239239            return NSLocalizedString(@"1 transfer", "Torrent table -> group row -> tooltip");
     
    284284}
    285285
    286 - (void) setControlButtonHover: (int) row
     286- (void) setControlButtonHover: (NSInteger) row
    287287{
    288288    fMouseControlRow = row;
     
    291291}
    292292
    293 - (void) setRevealButtonHover: (int) row
     293- (void) setRevealButtonHover: (NSInteger) row
    294294{
    295295    fMouseRevealRow = row;
     
    298298}
    299299
    300 - (void) setActionButtonHover: (int) row
     300- (void) setActionButtonHover: (NSInteger) row
    301301{
    302302    fMouseActionRow = row;
     
    313313    if ((row = [dict objectForKey: @"Row"]))
    314314    {
    315         int rowVal = [row intValue];
     315        NSInteger rowVal = [row intValue];
    316316        NSString * type = [dict objectForKey: @"Type"];
    317317        if ([type isEqualToString: @"Action"])
     
    353353- (void) outlineViewItemDidExpand: (NSNotification *) notification
    354354{
    355     int value = [[[notification userInfo] objectForKey: @"NSObject"] groupIndex];
     355    NSInteger value = [[[notification userInfo] objectForKey: @"NSObject"] groupIndex];
    356356    if (value < 0)
    357357        value = MAX_GROUP;
     
    366366- (void) outlineViewItemDidCollapse: (NSNotification *) notification
    367367{
    368     int value = [[[notification userInfo] objectForKey: @"NSObject"] groupIndex];
     368    NSInteger value = [[[notification userInfo] objectForKey: @"NSObject"] groupIndex];
    369369    if (value < 0)
    370370        value = MAX_GROUP;
     
    401401    if ([self pointInActionRect: point])
    402402    {
    403         int row = [self rowAtPoint: point];
     403        NSInteger row = [self rowAtPoint: point];
    404404       
    405405        fActionPushedRow = row;
     
    414414    {
    415415        id item = nil;
    416         int row = [self rowAtPoint: point];
     416        NSInteger row = [self rowAtPoint: point];
    417417        if (row != -1)
    418418            item = [self itemAtRow: row];
     
    447447        else
    448448        {
    449             int group = [item groupIndex];
     449            NSInteger group = [item groupIndex];
    450450            for (NSInteger i = 0; i < [self numberOfRows]; i++)
    451451            {
     
    500500- (NSMenu *) menuForEvent: (NSEvent *) event
    501501{
    502     int row = [self rowAtPoint: [self convertPoint: [event locationInWindow] fromView: nil]];
     502    NSInteger row = [self rowAtPoint: [self convertPoint: [event locationInWindow] fromView: nil]];
    503503    if (row >= 0)
    504504    {
     
    543543}
    544544
    545 - (NSRect) iconRectForRow: (int) row
     545- (NSRect) iconRectForRow: (NSInteger) row
    546546{
    547547    return [fTorrentCell iconRectForBounds: [self rectOfRow: row]];
     
    582582- (void) displayTorrentMenuForEvent: (NSEvent *) event
    583583{
    584     int row = [self rowAtPoint: [self convertPoint: [event locationInWindow] fromView: nil]];
     584    NSInteger row = [self rowAtPoint: [self convertPoint: [event locationInWindow] fromView: nil]];
    585585    if (row < 0)
    586586        return;
     
    595595    NSRect rect = [fTorrentCell iconRectForBounds: [self rectOfRow: row]];
    596596    NSPoint location = rect.origin;
    597     location.y += rect.size.height + 5.0;
     597    location.y += rect.size.height + 5.0f;
    598598    location = [self convertPoint: location toView: nil];
    599599   
     
    622622        if ([menu numberOfItems] == 4)
    623623        {
    624             const int speedLimitActionValue[] = { 0, 5, 10, 20, 30, 40, 50, 75, 100, 150, 200, 250, 500, 750, -1 };
     624            const NSInteger speedLimitActionValue[] = { 0, 5, 10, 20, 30, 40, 50, 75, 100, 150, 200, 250, 500, 750, -1 };
    625625           
    626626            for (NSInteger i = 0; speedLimitActionValue[i] != -1; i++)
     
    637637       
    638638        BOOL upload = menu == fUploadMenu;
    639         int mode = [fMenuTorrent speedMode: upload];
     639        NSInteger mode = [fMenuTorrent speedMode: upload];
    640640       
    641641        item = [menu itemWithTag: ACTION_MENU_LIMIT_TAG];
     
    655655        if ([menu numberOfItems] == 4)
    656656        {
    657             const float ratioLimitActionValue[] = { 0.25, 0.5, 0.75, 1.0, 1.5, 2.0, 3.0, -1.0 };
     657            const CGFloat ratioLimitActionValue[] = { 0.25f, 0.5f, 0.75f, 1.0f, 1.5f, 2.0f, 3.0f, -1.0f };
    658658           
    659             for (NSInteger i = 0; ratioLimitActionValue[i] != -1.0; i++)
     659            for (NSInteger i = 0; ratioLimitActionValue[i] != -1.0f; i++)
    660660            {
    661661                item = [[NSMenuItem alloc] initWithTitle: [NSString localizedStringWithFormat: @"%.2f", ratioLimitActionValue[i]]
     
    668668        }
    669669       
    670         int mode = [fMenuTorrent ratioSetting];
     670        NSInteger mode = [fMenuTorrent ratioSetting];
    671671       
    672672        item = [menu itemWithTag: ACTION_MENU_LIMIT_TAG];
     
    735735        }
    736736       
    737         float newY = NSMaxY([self rectOfRow: i-1]);
     737        CGFloat newY = NSMaxY([self rectOfRow: i-1]);
    738738        visibleRect.size.height -= newY - visibleRect.origin.y;
    739739        visibleRect.origin.y = newY;
     
    741741   
    742742    //remaining visible rows continue alternating
    743     float height = [self rowHeight] + [self intercellSpacing].height;
    744     int numberOfRects = ceil(visibleRect.size.height / height);
     743    CGFloat height = [self rowHeight] + [self intercellSpacing].height;
     744    NSInteger numberOfRects = ceil(visibleRect.size.height / height);
    745745    visibleRect.size.height = height;
    746746   
     
    759759- (void) setQuickLimitMode: (id) sender
    760760{
    761     int mode;
     761    NSInteger mode;
    762762    switch ([sender tag])
    763763    {
     
    791791- (void) setQuickRatioMode: (id) sender
    792792{
    793     int mode;
     793    NSInteger mode;
    794794    switch ([sender tag])
    795795    {
     
    840840   
    841841    NSMutableArray * progressMarks = [NSMutableArray arrayWithCapacity: 16];
    842     for (NSAnimationProgress i = 0.0625; i <= 1.0; i += 0.0625)
     842    for (NSAnimationProgress i = 0.0625f; i <= 1.0f; i += 0.0625f)
    843843        [progressMarks addObject: [NSNumber numberWithFloat: i]];
    844844   
     
    867867            fPiecesBarPercent = progress;
    868868        else
    869             fPiecesBarPercent = 1.0 - progress;
     869            fPiecesBarPercent = 1.0f - progress;
    870870       
    871871        [self reloadData];
     
    873873}
    874874
    875 - (float) piecesBarPercent
     875- (CGFloat) piecesBarPercent
    876876{
    877877    return fPiecesBarPercent;
     
    884884- (BOOL) pointInControlRect: (NSPoint) point
    885885{
    886     int row = [self rowAtPoint: point];
     886    NSInteger row = [self rowAtPoint: point];
    887887    if (row < 0 || ![[self itemAtRow: row] isKindOfClass: [Torrent class]])
    888888        return NO;
     
    893893- (BOOL) pointInRevealRect: (NSPoint) point
    894894{
    895     int row = [self rowAtPoint: point];
     895    NSInteger row = [self rowAtPoint: point];
    896896    if (row < 0 || ![[self itemAtRow: row] isKindOfClass: [Torrent class]])
    897897        return NO;
     
    902902- (BOOL) pointInActionRect: (NSPoint) point
    903903{
    904     int row = [self rowAtPoint: point];
     904    NSInteger row = [self rowAtPoint: point];
    905905    if (row < 0 || ![[self itemAtRow: row] isKindOfClass: [Torrent class]])
    906906        return NO;
     
    911911- (BOOL) pointInGroupStatusRect: (NSPoint) point
    912912{
    913     int row = [self rowAtPoint: point];
     913    NSInteger row = [self rowAtPoint: point];
    914914    if (row < 0 || [[self itemAtRow: row] isKindOfClass: [Torrent class]])
    915915        return NO;
     
    929929    //change size of image column
    930930    NSTableColumn * ulImageTableColumn = [self tableColumnWithIdentifier: @"UL Image"];
    931     float oldWidth = [ulImageTableColumn width], newWidth = ratio ? GROUP_RATIO_IMAGE_COLUMN_WIDTH : GROUP_SPEED_IMAGE_COLUMN_WIDTH;
     931    CGFloat oldWidth = [ulImageTableColumn width], newWidth = ratio ? GROUP_RATIO_IMAGE_COLUMN_WIDTH : GROUP_SPEED_IMAGE_COLUMN_WIDTH;
    932932    if (oldWidth != newWidth)
    933933    {
Note: See TracChangeset for help on using the changeset viewer.