Changeset 2730


Ignore:
Timestamp:
Aug 13, 2007, 4:30:52 AM (15 years ago)
Author:
livings124
Message:

get rid of some warnings

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Transmission.xcodeproj/project.pbxproj

    r2729 r2730  
    314314                4DFBC2DE09C0970D00D5C571 /* Torrent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Torrent.m; path = macosx/Torrent.m; sourceTree = "<group>"; };
    315315                8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; name = Info.plist; path = macosx/Info.plist; sourceTree = "<group>"; };
    316                 8D1107320486CEB800E47090 /* Transmission.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = Transmission.app; sourceTree = BUILT_PRODUCTS_DIR; };
     316                8D1107320486CEB800E47090 /* Transmission.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Transmission.app; sourceTree = BUILT_PRODUCTS_DIR; };
    317317                A200B8390A2263BA007BBB1E /* InfoWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InfoWindowController.h; path = macosx/InfoWindowController.h; sourceTree = "<group>"; };
    318318                A200B83A0A2263BA007BBB1E /* InfoWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = InfoWindowController.m; path = macosx/InfoWindowController.m; sourceTree = "<group>"; };
  • trunk/macosx/Controller.m

    r2729 r2730  
    544544   
    545545    //remove all torrent files in the temporary directory
     546    #warning move?
    546547    if (fTempTorrentFiles)
    547548    {
     
    26892690        Torrent * torrent;
    26902691        while ((torrent = [enumerator nextObject]))
    2691         {
    26922692            if ([torrent isActive] || [torrent waitingToStart])
    26932693                return YES;
    2694         }
    26952694        return NO;
    26962695    }
     
    27022701        Torrent * torrent;
    27032702        while ((torrent = [enumerator nextObject]))
    2704         {
    27052703            if ([torrent isPaused] && ![torrent waitingToStart])
    27062704                return YES;
    2707         }
    27082705        return NO;
    27092706    }
  • trunk/macosx/TorrentCell.m

    r2725 r2730  
    6262            inBounds: (NSRect) bounds;
    6363- (NSRect) rectForProgressWithString: (NSAttributedString *) string inBounds: (NSRect) bounds;
    64 - (NSRect) rectForBarInBounds: (NSRect) bounds;
    6564- (NSRect) rectForStatusWithString: (NSAttributedString *) string
    6665            inBounds: (NSRect) bounds;
     
    167166}
    168167
    169 #warning remove other
    170168- (NSRect) barRectForBounds: (NSRect) bounds
    171169{
    172     return [self rectForBarInBounds: bounds];
     170    BOOL minimal = [fDefaults boolForKey: @"SmallView"];
     171   
     172    NSRect result = bounds;
     173    result.size.height = BAR_HEIGHT;
     174    result.origin.x = PADDING_HORIZONAL + (minimal ? IMAGE_SIZE_MIN : IMAGE_SIZE_REG)
     175                        + PADDING_BETWEEN_IMAGE_AND_TITLE - PADDING_LESS_BETWEEN_TITLE_AND_BAR;
     176   
     177    result.origin.y += PADDING_ABOVE_TITLE + HEIGHT_TITLE;
     178    if (minimal)
     179        result.origin.y += PADDING_BETWEEN_TITLE_AND_BAR_MIN;
     180    else
     181        result.origin.y += PADDING_BETWEEN_TITLE_AND_PROGRESS + HEIGHT_STATUS + PADDING_BETWEEN_PROGRESS_AND_BAR;
     182   
     183    result.size.width = NSMaxX(bounds) - result.origin.x - PADDING_HORIZONAL - BUTTONS_TOTAL_WIDTH;
     184   
     185    return result;
    173186}
    174187
     
    249262    }
    250263   
    251     #warning bar is already sized.....
    252264    //bar
    253     NSRect barRect = [self rectForBarInBounds: cellFrame];
     265    NSRect barRect = [self barRectForBounds: cellFrame];
    254266    NSImage * bar = [fDefaults boolForKey: @"UseAdvancedBar"]
    255267                    ? [self advancedBar: barRect.size.width] : [self simpleBar: barRect.size.width];
     
    567579}
    568580
    569 - (NSRect) rectForBarInBounds: (NSRect) bounds
    570 {
    571     BOOL minimal = [fDefaults boolForKey: @"SmallView"];
    572    
    573     NSRect result = bounds;
    574     result.size.height = BAR_HEIGHT;
    575     result.origin.x = PADDING_HORIZONAL + (minimal ? IMAGE_SIZE_MIN : IMAGE_SIZE_REG)
    576                         + PADDING_BETWEEN_IMAGE_AND_TITLE - PADDING_LESS_BETWEEN_TITLE_AND_BAR;
    577     #warning rename some
    578     result.origin.y += PADDING_ABOVE_TITLE + HEIGHT_TITLE;
    579     if (minimal)
    580         result.origin.y += PADDING_BETWEEN_TITLE_AND_BAR_MIN;
    581     else
    582         result.origin.y += PADDING_BETWEEN_TITLE_AND_PROGRESS + HEIGHT_STATUS + PADDING_BETWEEN_PROGRESS_AND_BAR;
    583    
    584     result.size.width = NSMaxX(bounds) - result.origin.x - PADDING_HORIZONAL - BUTTONS_TOTAL_WIDTH;
    585    
    586     return result;
    587 }
    588 
    589581- (NSRect) rectForStatusWithString: (NSAttributedString *) string inBounds: (NSRect) bounds
    590582{
Note: See TracChangeset for help on using the changeset viewer.