Changeset 3394


Ignore:
Timestamp:
Oct 13, 2007, 1:54:19 PM (15 years ago)
Author:
livings124
Message:

fix a redundant check...all this destination code probably needs cleaning up sooner or later

Location:
trunk/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/DragOverlayView.m

    r3391 r3394  
    2525#import "DragOverlayView.h"
    2626#import "NSBezierPathAdditions.h"
     27
     28#define PADDING 10.0
    2729
    2830@implementation DragOverlayView
     
    8789- (void) setOverlay: (NSImage *) icon mainLine: (NSString *) mainLine subLine: (NSString *) subLine
    8890{
    89     if (fBadge)
    90         [fBadge release];
     91    [fBadge release];
    9192    fBadge = [fBackBadge copy];
    9293    NSSize badgeSize = [fBadge size];
     
    111112    }
    112113   
    113     float padding = 10.0;
    114    
    115114    [fBadge lockFocus];
    116115   
    117116    //place icon
    118     [icon compositeToPoint: NSMakePoint(padding, (badgeSize.height - iconSize.height) * 0.5)
     117    [icon compositeToPoint: NSMakePoint(PADDING, (badgeSize.height - iconSize.height) * 0.5)
    119118                operation: NSCompositeSourceOver];
    120119    [icon release];
     
    124123    NSSize subLineSize = [subLine sizeWithAttributes: fSubLineAttributes];
    125124   
    126     NSRect lineRect = NSMakeRect(padding + iconSize.width + 5.0,
     125    NSRect lineRect = NSMakeRect(PADDING + iconSize.width + 5.0,
    127126                        (badgeSize.height + (subLineSize.height + 2.0 - mainLineSize.height)) * 0.5,
    128                         badgeSize.width - (padding + iconSize.width + 2.0) - padding, mainLineSize.height);
     127                        badgeSize.width - (PADDING + iconSize.width + 2.0) - PADDING, mainLineSize.height);
    129128    [mainLine drawInRect: lineRect withAttributes: fMainLineAttributes];
    130129   
  • trunk/macosx/Torrent.m

    r3383 r3394  
    556556        return;
    557557   
    558     NSString * folder = [[openPanel filenames] objectAtIndex: 0];
    559     if (fUseIncompleteFolder)
    560         [self changeDownloadFolder: folder];
    561     else
    562         [self changeDownloadFolder: folder];
     558    [self changeDownloadFolder: [[openPanel filenames] objectAtIndex: 0]];
    563559   
    564560    [self startTransfer];
Note: See TracChangeset for help on using the changeset viewer.