Ignore:
Timestamp:
May 28, 2012, 5:26:15 PM (9 years ago)
Author:
livings124
Message:

#4922 On Lion, use window restoration on the preferences window

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/PrefsController.m

    r13318 r13321  
    2626#import "BlocklistDownloaderViewController.h"
    2727#import "BlocklistScheduler.h"
     28#import "Controller.h"
    2829#import "PortChecker.h"
    2930#import "BonjourController.h"
     
    7374}
    7475
     76#warning elliminate?
    7577+ (tr_session *) handle
    7678{
     
    171173    fHasLoaded = YES;
    172174   
     175    [[self window] setRestorationClass: [self class]];
     176   
    173177    NSToolbar * toolbar = [[NSToolbar alloc] initWithIdentifier: @"Preferences Toolbar"];
    174178    [toolbar setDelegate: self];
     
    336340}
    337341
     342+ (void) restoreWindowWithIdentifier: (NSString *) identifier state: (NSCoder *) state completionHandler: (void (^)(NSWindow *, NSError *)) completionHandler
     343{
     344    NSWindow * window = [[(Controller *)[NSApp delegate] prefsController] window];
     345    completionHandler(window, nil);
     346}
     347
    338348//for a beta release, always use the beta appcast
    339349#if defined(TR_BETA_RELEASE)
     
    369379- (void) setRandomPortOnStart: (id) sender
    370380{
    371     tr_sessionSetPeerPortRandomOnStart(fHandle, [sender state] == NSOnState);
     381    tr_sessionSetPeerPortRandomOnStart(fHandle, [(NSButton *)sender state] == NSOnState);
    372382}
    373383
Note: See TracChangeset for help on using the changeset viewer.