Changeset 2282


Ignore:
Timestamp:
Jul 4, 2007, 4:40:18 PM (15 years ago)
Author:
livings124
Message:

improve priority context menu

Location:
trunk/macosx
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/English.lproj/InfoWindow.nib/info.nib

    r2189 r2282  
    44<dict>
    55        <key>IBDocumentLocation</key>
    6         <string>29 56 356 240 0 0 1024 746 </string>
     6        <string>35 67 356 240 0 0 1152 842 </string>
    77        <key>IBEditorPositions</key>
    88        <dict>
  • trunk/macosx/InfoWindowController.m

    r2279 r2282  
    673673            priority = PRIORITY_NORMAL;
    674674       
     675        NSIndexSet * fileIndexSet;
    675676        for (i = [indexSet firstIndex]; i != NSNotFound && (!current || !other); i = [indexSet indexGreaterThanIndex: i])
    676677        {
    677             if ([torrent hasFilePriority: priority forIndexes: [[fFileOutline itemAtRow: i] objectForKey: @"Indexes"]])
     678            fileIndexSet = [[fFileOutline itemAtRow: i] objectForKey: @"Indexes"];
     679            if (![torrent canChangeDownloadCheckForFiles: fileIndexSet])
     680                continue;
     681            else if ([torrent hasFilePriority: priority forIndexes: fileIndexSet])
    678682                current = YES;
    679683            else
     
    681685        }
    682686       
    683         [menuItem setState: current ? (other ? NSMixedState : NSOnState) : NSOffState];
    684         return YES;
     687        [menuItem setState: current ? NSOnState : NSOffState];
     688        return current || other;
    685689    }
    686690   
Note: See TracChangeset for help on using the changeset viewer.