Changeset 176


Ignore:
Timestamp:
Apr 1, 2006, 4:17:59 PM (16 years ago)
Author:
titer
Message:

Dynamic checks for whether NSToolbar supports item selection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/compat-10.2/macosx/PrefsController.m

    r175 r176  
    7979        setFrame: NSZeroRect];
    8080
    81 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
    82     [fToolbar setSelectedItemIdentifier: TOOLBAR_GENERAL];
    83 #endif
     81    if( [fToolbar respondsToSelector: @selector(setSelectedItemIdentifier:) ] )
     82        [fToolbar setSelectedItemIdentifier: TOOLBAR_GENERAL];
    8483    [self setPrefView: fGeneralView];
    8584
     
    182181}
    183182
     183/* Only used on OS X >= 10.3 */
    184184- (NSArray *) toolbarSelectableItemIdentifiers: (NSToolbar *)toolbar
    185185{
     
    346346    windowRect.size.height += difference;
    347347   
    348 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
    349     [fPrefsWindow setTitle: [fToolbar selectedItemIdentifier]];
    350 #endif
     348    if( [fToolbar respondsToSelector: @selector(selectedItemIdentifier) ] )
     349        [fPrefsWindow setTitle: [fToolbar selectedItemIdentifier]];
    351350    [fPrefsWindow setContentView: fBlankView];
    352351    [fPrefsWindow setFrame:windowRect display: YES animate: YES];
Note: See TracChangeset for help on using the changeset viewer.