Changeset 10369


Ignore:
Timestamp:
Mar 14, 2010, 1:52:45 AM (12 years ago)
Author:
livings124
Message:

add an optional clearView method to the InfoViewController? protocol

Location:
trunk/macosx
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/InfoActivityViewController.h

    r10368 r10369  
    5151- (void) setPiecesView: (id) sender;
    5252- (void) setPiecesViewForAvailable: (BOOL) available;
    53 - (void) clearPiecesView;
     53- (void) clearView;
    5454
    5555@end
  • trunk/macosx/InfoActivityViewController.m

    r10335 r10369  
    149149}
    150150
    151 - (void) clearPiecesView
     151- (void) clearView
    152152{
    153153    [fPiecesView clearView];
  • trunk/macosx/InfoPeersViewController.h

    r10368 r10369  
    4545- (void) updateInfo;
    4646
    47 - (void) clearPeers;
     47- (void) clearView;
    4848- (void) stopWebSeedAnimation;
    4949
  • trunk/macosx/InfoPeersViewController.m

    r10335 r10369  
    222222}
    223223
    224 - (void) clearPeers
     224- (void) clearView
    225225{
    226226    //if in the middle of animating, just stop and resize immediately
  • trunk/macosx/InfoTrackersViewController.h

    r10368 r10369  
    4747- (void) updateInfo;
    4848
    49 - (void) clearTrackers;
     49- (void) clearView;
    5050
    5151- (void) addRemoveTracker: (id) sender;
  • trunk/macosx/InfoTrackersViewController.m

    r10335 r10369  
    123123}
    124124
    125 - (void) clearTrackers
     125- (void) clearView
    126126{
    127127    [fTrackers release];
  • trunk/macosx/InfoViewController.h

    r10368 r10369  
    3131- (void) updateInfo;
    3232
     33@optional
     34- (void) clearView;
     35
    3336@end
  • trunk/macosx/InfoWindowController.m

    r10368 r10369  
    214214        [(InfoTabButtonCell *)[fTabMatrix cellWithTag: oldTabTag] setSelectedTab: NO];
    215215       
     216        if ([fViewController respondsToSelector: @selector(clearView)])
     217            [fViewController clearView];
     218       
    216219        switch (oldTabTag)
    217220        {
    218             case TAB_ACTIVITY_TAG:
    219                 [fActivityViewController clearPiecesView];
    220                 break;
    221            
    222221            case TAB_TRACKERS_TAG:
    223                 [fTrackersViewController clearTrackers];
    224                
    225222                oldResizeSaveKey = @"InspectorContentHeightTracker";
    226223                break;
    227            
    228224            case TAB_PEERS_TAG:
    229                 [fPeersViewController clearPeers];
    230                
    231225                oldResizeSaveKey = @"InspectorContentHeightPeers";
    232226                break;
    233            
    234227            case TAB_FILE_TAG:
    235228                oldResizeSaveKey = @"InspectorContentHeightFiles";
     
    238231       
    239232        NSView * oldView = [fViewController view];
    240         oldHeight = [oldView frame].size.height;
     233        oldHeight = NSHeight([oldView frame]);
    241234        if (oldResizeSaveKey)
    242235            [[NSUserDefaults standardUserDefaults] setFloat: oldHeight forKey: oldResizeSaveKey];
Note: See TracChangeset for help on using the changeset viewer.