Changeset 9267


Ignore:
Timestamp:
Oct 10, 2009, 1:21:27 PM (13 years ago)
Author:
livings124
Message:

attempt number one of fixing 10.5 support

Location:
trunk/macosx
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r9262 r9267  
    697697    [fDefaults setBool: [[fInfoController window] isVisible] forKey: @"InfoVisible"];
    698698   
    699     const BOOL quickLookOpen = [NSApp isOnSnowLeopardOrBetter] && [QLPreviewPanel sharedPreviewPanelExists]
    700                                 && [[QLPreviewPanel sharedPreviewPanel] isVisible];
     699    const BOOL quickLookOpen = [NSApp isOnSnowLeopardOrBetter] && [QLPreviewPanelSL sharedPreviewPanelExists]
     700                                && [[QLPreviewPanelSL sharedPreviewPanel] isVisible];
    701701    for (NSWindow * window in [NSApp windows])
    702702    {
    703         if (!quickLookOpen || window != [QLPreviewPanel sharedPreviewPanel]) //hide quicklook window last to avoid animation
     703        if (!quickLookOpen || window != [QLPreviewPanelSL sharedPreviewPanel]) //hide quicklook window last to avoid animation
    704704            [window orderOut: nil];
    705705    }
     
    707707    if (quickLookOpen)
    708708    {
    709         [[QLPreviewPanel sharedPreviewPanel] updateController];
    710         [[QLPreviewPanel sharedPreviewPanel] orderOut: nil];
     709        [[QLPreviewPanelSL sharedPreviewPanel] updateController];
     710        [[QLPreviewPanelSL sharedPreviewPanel] orderOut: nil];
    711711    }
    712712   
     
    15231523    [fInfoController setInfoForTorrents: [fTableView selectedTorrents]];
    15241524   
    1525     if ([NSApp isOnSnowLeopardOrBetter] && [QLPreviewPanel sharedPreviewPanelExists] && [[QLPreviewPanel sharedPreviewPanel] isVisible])
    1526         [[QLPreviewPanel sharedPreviewPanel] reloadData];
     1525    if ([NSApp isOnSnowLeopardOrBetter] && [QLPreviewPanelSL sharedPreviewPanelExists] && [[QLPreviewPanelSL sharedPreviewPanel] isVisible])
     1526        [[QLPreviewPanelSL sharedPreviewPanel] reloadData];
    15271527}
    15281528
     
    40254025        return;
    40264026   
    4027     if ([[QLPreviewPanel sharedPreviewPanel] isVisible])
    4028         [[QLPreviewPanel sharedPreviewPanel] orderOut: nil];
     4027    if ([[QLPreviewPanelSL sharedPreviewPanel] isVisible])
     4028        [[QLPreviewPanelSL sharedPreviewPanel] orderOut: nil];
    40294029    else
    4030         [[QLPreviewPanel sharedPreviewPanel] makeKeyAndOrderFront: nil];
     4030        [[QLPreviewPanelSL sharedPreviewPanel] makeKeyAndOrderFront: nil];
    40314031}
    40324032
  • trunk/macosx/FileOutlineController.m

    r9054 r9267  
    133133- (void) outlineViewSelectionDidChange: (NSNotification *) notification
    134134{
    135     if ([NSApp isOnSnowLeopardOrBetter] && [QLPreviewPanel sharedPreviewPanelExists] && [[QLPreviewPanel sharedPreviewPanel] isVisible])
    136     {
    137         [[QLPreviewPanel sharedPreviewPanel] reloadData];
    138         [[QLPreviewPanel sharedPreviewPanel] updateController];
     135    if ([NSApp isOnSnowLeopardOrBetter] && [QLPreviewPanelSL sharedPreviewPanelExists]
     136        && [[QLPreviewPanelSL sharedPreviewPanel] isVisible])
     137    {
     138        [[QLPreviewPanelSL sharedPreviewPanel] reloadData];
     139        [[QLPreviewPanelSL sharedPreviewPanel] updateController];
    139140    }
    140141}
  • trunk/macosx/FileOutlineView.m

    r9084 r9267  
    9292   
    9393    //don't allow quick look on add window
    94     if ([NSApp isOnSnowLeopardOrBetter] && firstChar == ' ' && [[[self window] windowController] conformsToProtocol: @protocol(QLPreviewPanelDataSource)])
    95     {
    96         if ([[QLPreviewPanel sharedPreviewPanel] isVisible])
    97             [[QLPreviewPanel sharedPreviewPanel] orderOut: nil];
     94    #warning get rid of conversion of protocol and replace with @protocol(QLPreviewPanelDataSource)
     95    if ([NSApp isOnSnowLeopardOrBetter] && firstChar == ' ' && [[[self window] windowController] conformsToProtocol: NSProtocolFromString(@"QLPreviewPanelDataSource")])
     96    {
     97        if ([[QLPreviewPanelSL sharedPreviewPanel] isVisible])
     98            [[QLPreviewPanelSL sharedPreviewPanel] orderOut: nil];
    9899        else
    99             [[QLPreviewPanel sharedPreviewPanel] makeKeyAndOrderFront: nil];
     100            [[QLPreviewPanelSL sharedPreviewPanel] makeKeyAndOrderFront: nil];
    100101    }
    101102   
  • trunk/macosx/InfoWindowController.h

    r9250 r9267  
    3333@class PiecesView;
    3434
    35 @interface InfoWindowController : NSWindowController <QLPreviewPanelDataSource, QLPreviewPanelDelegate>
     35#warning uncomment
     36@interface InfoWindowController : NSWindowController //<QLPreviewPanelDataSource, QLPreviewPanelDelegate>
    3637{
    3738    NSArray * fTorrents;
     
    7980    NSString * fInitialString;
    8081   
    81     QLPreviewPanel * fPreviewPanel;
     82    #warning change to QLPreviewPanel
     83    id fPreviewPanel;
    8284}
    8385
  • trunk/macosx/InfoWindowController.m

    r9250 r9267  
    815815   
    816816    if ([NSApp isOnSnowLeopardOrBetter] && (fCurrentTabTag == TAB_FILES_TAG || oldTabTag == TAB_FILES_TAG)
    817         && ([QLPreviewPanel sharedPreviewPanelExists] && [[QLPreviewPanel sharedPreviewPanel] isVisible]))
    818         [[QLPreviewPanel sharedPreviewPanel] updateController];
     817        && ([QLPreviewPanelSL sharedPreviewPanelExists] && [[QLPreviewPanelSL sharedPreviewPanel] isVisible]))
     818        [[QLPreviewPanelSL sharedPreviewPanel] updateController];
    819819}
    820820
     
    11151115}*/
    11161116
    1117 - (BOOL) acceptsPreviewPanelControl: (QLPreviewPanel *) panel
     1117#warning change to QLPreviewPanel
     1118- (BOOL) acceptsPreviewPanelControl: (id) panel
    11181119{
    11191120    return fCurrentTabTag == TAB_FILES_TAG && [self canQuickLook];
    11201121}
    11211122
    1122 - (void) beginPreviewPanelControl: (QLPreviewPanel *) panel
     1123- (void) beginPreviewPanelControl: (id) panel
    11231124{
    11241125    fPreviewPanel = [panel retain];
    1125     fPreviewPanel.delegate = self;
    1126     fPreviewPanel.dataSource = self;
    1127 }
    1128 
    1129 - (void) endPreviewPanelControl: (QLPreviewPanel *) panel
     1126    [fPreviewPanel setDelegate: self];
     1127    [fPreviewPanel setDataSource: self];
     1128}
     1129
     1130- (void) endPreviewPanelControl: (id) panel
    11301131{
    11311132    [fPreviewPanel release];
     
    11331134}
    11341135
    1135 - (NSInteger) numberOfPreviewItemsInPreviewPanel: (QLPreviewPanel *) panel
     1136- (NSInteger) numberOfPreviewItemsInPreviewPanel: (id) panel
    11361137{
    11371138    return [[self quickLookURLs] count];
    11381139}
    11391140
    1140 - (id <QLPreviewItem>) previewPanel: (QLPreviewPanel *)panel previewItemAtIndex: (NSInteger) index
     1141- (id /*<QLPreviewItem>*/) previewPanel: (id)panel previewItemAtIndex: (NSInteger) index
    11411142{
    11421143    return [[self quickLookURLs] objectAtIndex: index];
    11431144}
    11441145
    1145 - (BOOL) previewPanel: (QLPreviewPanel *) panel handleEvent: (NSEvent *) event
     1146- (BOOL) previewPanel: (id) panel handleEvent: (NSEvent *) event
    11461147{
    11471148    if ([event type] == NSKeyDown)
     
    11541155}
    11551156
    1156 - (NSRect) previewPanel: (QLPreviewPanel *) panel sourceFrameOnScreenForPreviewItem: (id <QLPreviewItem>) item
     1157- (NSRect) previewPanel: (id) panel sourceFrameOnScreenForPreviewItem: (id /*<QLPreviewItem>*/) item
    11571158{
    11581159    FileOutlineView * fileOutlineView = [fFileController outlineView];
  • trunk/macosx/NSApplicationAdditions.h

    r9010 r9267  
    2323 *****************************************************************************/
    2424
     25#define QLPreviewPanelSL NSClassFromString(@"QLPreviewPanel")
     26
    2527@interface NSApplication (NSApplicationAdditions)
    2628
  • trunk/macosx/TorrentTableView.h

    r9057 r9267  
    3232#define GROUP_SEPARATOR_HEIGHT 18.0
    3333
    34 @interface TorrentTableView : NSOutlineView <QLPreviewPanelDataSource, QLPreviewPanelDelegate>
     34#warning revert
     35@interface TorrentTableView : NSOutlineView //<QLPreviewPanelDataSource, QLPreviewPanelDelegate>
    3536{
    3637    IBOutlet Controller * fController;
     
    5455    NSAnimation * fPiecesBarAnimation;
    5556   
    56     QLPreviewPanel * fPreviewPanel;
     57    #warning change to QLPreviewPanel
     58    id fPreviewPanel;
    5759}
    5860
  • trunk/macosx/TorrentTableView.m

    r9241 r9267  
    875875}
    876876
    877 - (BOOL) acceptsPreviewPanelControl: (QLPreviewPanel *) panel
     877#warning change from id to QLPreviewPanel
     878- (BOOL) acceptsPreviewPanelControl: (id) panel
    878879{
    879880    return YES;
    880881}
    881882
    882 - (void) beginPreviewPanelControl: (QLPreviewPanel *) panel
     883- (void) beginPreviewPanelControl: (id) panel
    883884{
    884885    fPreviewPanel = [panel retain];
    885     fPreviewPanel.delegate = self;
    886     fPreviewPanel.dataSource = self;
    887 }
    888 
    889 - (void) endPreviewPanelControl: (QLPreviewPanel *) panel
     886    [fPreviewPanel setDelegate: self];
     887    [fPreviewPanel setDataSource: self];
     888}
     889
     890- (void) endPreviewPanelControl: (id) panel
    890891{
    891892    [fPreviewPanel release];
     
    893894}
    894895
    895 - (NSInteger) numberOfPreviewItemsInPreviewPanel: (QLPreviewPanel *) panel
     896- (NSInteger) numberOfPreviewItemsInPreviewPanel: (id) panel
    896897{
    897898    return [[self quickLookableTorrents] count];
    898899}
    899900
    900 - (id <QLPreviewItem>) previewPanel: (QLPreviewPanel *)panel previewItemAtIndex: (NSInteger) index
     901- (id /*<QLPreviewItem>*/) previewPanel: (id) panel previewItemAtIndex: (NSInteger) index
    901902{
    902903    return [[self quickLookableTorrents] objectAtIndex: index];
    903904}
    904905
    905 - (BOOL) previewPanel: (QLPreviewPanel *) panel handleEvent: (NSEvent *) event
     906- (BOOL) previewPanel: (id) panel handleEvent: (NSEvent *) event
    906907{
    907908    if ([event type] == NSKeyDown)
     
    914915}
    915916
    916 - (NSRect) previewPanel: (QLPreviewPanel *) panel sourceFrameOnScreenForPreviewItem: (id <QLPreviewItem>) item
     917- (NSRect) previewPanel: (id) panel sourceFrameOnScreenForPreviewItem: (id /*<QLPreviewItem>*/) item
    917918{
    918919    const NSInteger row = [self rowForItem: item];
Note: See TracChangeset for help on using the changeset viewer.