Changeset 2266


Ignore:
Timestamp:
Jul 1, 2007, 1:27:26 PM (15 years ago)
Author:
livings124
Message:

a little code cleanup

Location:
trunk/macosx
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r2264 r2266  
    546546    }
    547547   
    548     //save history and stop running torrents
     548    //save history
    549549    [self updateTorrentHistory];
    550550   
    551     //make sure torrent is closed
     551    //make sure torrents are closed
    552552    enumerator = [fTorrents objectEnumerator];
    553553    Torrent * torrent;
  • trunk/macosx/CreatorWindowController.m

    r2261 r2266  
    6464        if (fInfo->fileCount == 0)
    6565        {
    66             NSAlert * alert = [[[NSAlert alloc] init] autorelease];
     66            NSAlert * alert = [[NSAlert alloc] init];
    6767            [alert addButtonWithTitle: NSLocalizedString(@"OK", "Create torrent -> no files -> button")];
    6868            [alert setMessageText: NSLocalizedString(@"This folder contains no files.",
     
    7373           
    7474            [alert runModal];
     75            [alert release];
    7576           
    7677            [self release];
  • trunk/macosx/DragOverlayWindow.h

    r2149 r2266  
    3939- (void) setURL: (NSString *) url;
    4040
     41- (void) fadeIn;
    4142- (void) fadeOut;
    4243
  • trunk/macosx/DragOverlayWindow.m

    r2244 r2266  
    126126    }
    127127   
    128     [[self contentView] setOverlay: icon mainLine: name subLine: secondString];
    129    
    130     //stop other animation and set to same progress
    131     if ([fFadeOutAnimation isAnimating])
    132     {
    133         [fFadeOutAnimation stopAnimation];
    134         [fFadeInAnimation setCurrentProgress: 1.0 - [fFadeOutAnimation currentProgress]];
    135     }
    136     [self setFrame: [[self parentWindow] frame] display: YES];
    137     [fFadeInAnimation startAnimation];
     128    [self fadeIn];
    138129}
    139130
    140131- (void) setFile: (NSString *) file
    141132{
    142        
    143133    [[self contentView] setOverlay: [NSImage imageNamed: @"CreateLarge.png"]
    144134        mainLine: NSLocalizedString(@"Create a Torrent File", "Drag overlay -> file") subLine: file];
    145135   
    146     //stop other animation and set to same progress
    147     if ([fFadeOutAnimation isAnimating])
    148     {
    149         [fFadeOutAnimation stopAnimation];
    150         [fFadeInAnimation setCurrentProgress: 1.0 - [fFadeOutAnimation currentProgress]];
    151     }
    152     [self setFrame: [[self parentWindow] frame] display: YES];
    153     [fFadeInAnimation startAnimation];
     136    [self fadeIn];
    154137}
    155138
     
    160143        mainLine: NSLocalizedString(@"Web Address", "Drag overlay -> url") subLine: url];
    161144   
     145    [self fadeIn];
     146}
     147
     148- (void) fadeIn
     149{
    162150    //stop other animation and set to same progress
    163151    if ([fFadeOutAnimation isAnimating])
  • trunk/macosx/Torrent.m

    r2262 r2266  
    193193- (void) dealloc
    194194{
    195     # warning cleanup
     195    #warning cleanup
    196196    if (fHandle)
    197197    {
Note: See TracChangeset for help on using the changeset viewer.