Changeset 154
- Timestamp:
- Mar 14, 2006, 11:50:04 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_api/macosx/Controller.m
r153 r154 610 610 - (void) updateTorrentHistory 611 611 { 612 if( [fTorrents count] < 1 )613 return;614 615 612 NSMutableArray * history = [NSMutableArray 616 613 arrayWithCapacity: [fTorrents count]]; … … 916 913 || action == @selector(removeTorrentDeleteBoth:)) 917 914 { 918 if( !torrent )919 return NO;920 921 915 //append or remove ellipsis when needed 922 if( [torrent isActive] && [fDefaults boolForKey: @"CheckRemove"] ) 916 if( torrent && [torrent isActive] && 917 [fDefaults boolForKey: @"CheckRemove"] ) 923 918 { 924 919 if (![[menuItem title] hasSuffix:NS_ELLIPSIS]) … … 930 925 [menuItem setTitle:[[menuItem title] substringToIndex:[[menuItem title] length]-[NS_ELLIPSIS length]]]; 931 926 } 932 return YES;927 return ( torrent != nil ); 933 928 } 934 929 … … 937 932 action == @selector(stopTorrent:) ) 938 933 { 939 if( !torrent ) 940 return NO; 941 942 if( [torrent isActive] ) 934 if( !torrent || [torrent isActive] ) 943 935 { 944 936 [menuItem setTitle: @"Pause"]; … … 950 942 [menuItem setAction: @selector( resumeTorrent: )]; 951 943 } 944 return ( torrent != nil ); 952 945 } 953 946
Note: See TracChangeset
for help on using the changeset viewer.