Changeset 794


Ignore:
Timestamp:
Aug 19, 2006, 10:18:39 PM (15 years ago)
Author:
livings124
Message:

Acquire lock before setting completed badge to help get rid of problem of the completed badge not clearing when the main window is given focus

Location:
trunk
Files:
3 edited

Legend:

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

    r784 r794  
    258258                4DCCBB3C09C3D71100D3CABF /* TorrentCell.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = TorrentCell.m; path = macosx/TorrentCell.m; sourceTree = "<group>"; };
    259259                4DCCBB3D09C3D71100D3CABF /* TorrentCell.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = TorrentCell.h; path = macosx/TorrentCell.h; sourceTree = "<group>"; };
    260                 4DDBB71909E16BAE00284745 /* transmissioncli */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "compiled.mach-o.executable"; path = transmissioncli; sourceTree = BUILT_PRODUCTS_DIR; };
     260                4DDBB71909E16BAE00284745 /* transmissioncli */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = transmissioncli; sourceTree = BUILT_PRODUCTS_DIR; };
    261261                4DDBB71B09E16BF100284745 /* transmissioncli.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = transmissioncli.c; path = cli/transmissioncli.c; sourceTree = "<group>"; };
    262262                4DDFDD20099A5D8E00189D81 /* DownloadBadge.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = DownloadBadge.png; path = macosx/Images/DownloadBadge.png; sourceTree = "<group>"; };
  • trunk/macosx/Badger.h

    r711 r794  
    3535    NSDictionary    * fAttributes;
    3636   
     37    NSLock          * fLock;
     38   
    3739    int             fCompleted;
    3840    BOOL            fSpeedShown;
  • trunk/macosx/Badger.m

    r711 r794  
    5757        [stringShadow release];
    5858       
     59        fLock = [[NSLock alloc] init];
     60       
    5961        fCompleted = 0;
    6062        fSpeedShown = NO;
     
    6971    [fBadgedDockIcon release];
    7072    [fAttributes release];
     73    [fLock release];
    7174
    7275    [super dealloc];
     
    7780    NSImage * dockIcon = nil;
    7881    NSSize iconSize = [fDockIcon size];
     82
     83    [fLock lock]; //acquire lock to ensure completed badge is accurate
    7984
    8085    //set completed badge
     
    112117        fCompleted = completed;
    113118    }
     119   
     120    [fLock unlock];
    114121
    115122    //set upload and download rate badges
Note: See TracChangeset for help on using the changeset viewer.