Changeset 3655


Ignore:
Timestamp:
Oct 30, 2007, 7:55:47 PM (15 years ago)
Author:
livings124
Message:

phase 1 of updating menu items to remove bindings

Location:
trunk/macosx
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r3645 r3655  
    257257    [fTableView setTorrents: fDisplayedTorrents];
    258258    [[fTableView tableColumnWithIdentifier: @"Torrent"] setDataCell: [[TorrentCell alloc] init]];
    259 
     259   
    260260    [fTableView registerForDraggedTypes: [NSArray arrayWithObject: TORRENT_TABLE_VIEW_DATA_TYPE]];
    261261    [fWindow registerForDraggedTypes: [NSArray arrayWithObjects: NSFilenamesPboardType, NSURLPboardType, nil]];
     
    18051805- (void) setSortReverse: (id) sender
    18061806{
     1807    [fDefaults setBool: ![fDefaults boolForKey: @"SortReverse"] forKey: @"SortReverse"];
    18071808    [self sortTorrents];
    18081809}
     
    22662267}
    22672268
    2268 - (BOOL) tableView: (NSTableView *) tableView writeRowsWithIndexes: (NSIndexSet *) indexes
    2269     toPasteboard: (NSPasteboard *) pasteboard
     2269#warning not working in Leopard
     2270- (BOOL) tableView: (NSTableView *) tableView writeRowsWithIndexes: (NSIndexSet *) indexes toPasteboard: (NSPasteboard *) pasteboard
    22702271{
    22712272    //only allow reordering of rows if sorting by order with no filter
    2272     if ([[fDefaults stringForKey: @"Sort"] isEqualToString: @"Order"]
    2273         && [[fDefaults stringForKey: @"Filter"] isEqualToString: @"None"]
     2273    if ([[fDefaults stringForKey: @"Sort"] isEqualToString: SORT_ORDER]
     2274        && [[fDefaults stringForKey: @"Filter"] isEqualToString: FILTER_NONE]
    22742275        && [[fSearchFilterField stringValue] length] == 0)
    22752276    {
     
    24752476{
    24762477    BOOL makeSmall = ![fDefaults boolForKey: @"SmallView"];
    2477     if (![NSApp isOnLeopardOrBetter])
    2478         makeSmall != makeSmall;
     2478    [fDefaults setBool: makeSmall forKey: @"SmallView"];
    24792479   
    24802480    [fTableView setRowHeight: makeSmall ? ROW_HEIGHT_SMALL : ROW_HEIGHT_REGULAR];
     
    28492849{
    28502850    SEL action = [menuItem action];
    2851 
     2851   
    28522852    //only enable some items if it is in a context menu or the window is useable
    28532853    BOOL canUseTable = [fWindow isKeyWindow] || [[menuItem menu] supermenu] != [NSApp mainMenu];
     
    28582858   
    28592859    //enable sort and advanced bar items
    2860     if (action == @selector(setSort:) || /*action == @selector(toggleAdvancedBar:) ||*/ action == @selector(toggleSmallView:))
     2860    if (action == @selector(setSort:) /*|| action == @selector(toggleAdvancedBar:) ||*/)
    28612861        return [fWindow isVisible];
     2862   
     2863    if (action == @selector(toggleSmallView:))
     2864    {
     2865        [menuItem setState: [fDefaults boolForKey: @"SmallView"] ? NSOnState : NSOffState];
     2866        return [fWindow isVisible];
     2867    }
    28622868
    28632869    //enable show info
     
    30513057    //enable reverse sort item
    30523058    if (action == @selector(setSortReverse:))
    3053         return ![[fDefaults stringForKey: @"Sort"] isEqualToString: @"Order"];
     3059    {
     3060        [menuItem setState: [fDefaults boolForKey: @"SortReverse"] ? NSOnState : NSOffState];
     3061        return ![[fDefaults stringForKey: @"Sort"] isEqualToString: SORT_ORDER];
     3062    }
    30543063   
    30553064    //check proper filter search item
  • trunk/macosx/English.lproj/MainMenu.nib/classes.nib

    r3582 r3655  
    2323                        <key>SUPERCLASS</key>
    2424                        <string>ImageBackgroundView</string>
     25                </dict>
     26                <dict>
     27                        <key>CLASS</key>
     28                        <string>NSApplication</string>
     29                        <key>LANGUAGE</key>
     30                        <string>ObjC</string>
     31                        <key>SUPERCLASS</key>
     32                        <string>NSResponder</string>
    2533                </dict>
    2634                <dict>
  • trunk/macosx/English.lproj/MainMenu.nib/info.nib

    r3582 r3655  
    1111        <key>IBOpenObjects</key>
    1212        <array>
    13                 <integer>21</integer>
     13                <integer>1639</integer>
    1414        </array>
    1515        <key>IBSystem Version</key>
  • trunk/macosx/TorrentTableView.m

    r3638 r3655  
    116116- (void) mouseDown: (NSEvent *) event
    117117{
    118     //NSLog(@"down");
    119118    fClickPoint = [self convertPoint: [event locationInWindow] fromView: nil];
    120119
Note: See TracChangeset for help on using the changeset viewer.