Changeset 923


Ignore:
Timestamp:
Sep 25, 2006, 8:53:10 PM (15 years ago)
Author:
livings124
Message:

Move the pieces viewer into the Activity pane of Inspector.

Location:
trunk
Files:
2 added
2 deleted
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/Transmission.xcodeproj/project.pbxproj

    r922 r923  
    88
    99/* Begin PBXBuildFile section */
    10                 3518E4A50AC620FC002ED3A2 /* PiecesWindowController.h in Headers */ = {isa = PBXBuildFile; fileRef = 3518E4A30AC620FC002ED3A2 /* PiecesWindowController.h */; };
    11                 3518E4A60AC620FC002ED3A2 /* PiecesWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3518E4A40AC620FC002ED3A2 /* PiecesWindowController.m */; };
     10                3518E4A50AC620FC002ED3A2 /* PiecesView.h in Headers */ = {isa = PBXBuildFile; fileRef = 3518E4A30AC620FC002ED3A2 /* PiecesView.h */; };
     11                3518E4A60AC620FC002ED3A2 /* PiecesView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3518E4A40AC620FC002ED3A2 /* PiecesView.m */; };
    1212                3518E4D10AC62517002ED3A2 /* PiecesBack.tiff in CopyFiles */ = {isa = PBXBuildFile; fileRef = 3518E4CD0AC62517002ED3A2 /* PiecesBack.tiff */; };
    1313                3518E4D30AC62517002ED3A2 /* BoxBlue1.tiff in CopyFiles */ = {isa = PBXBuildFile; fileRef = 3518E4CF0AC62517002ED3A2 /* BoxBlue1.tiff */; };
    1414                3518E4D40AC62517002ED3A2 /* BoxBlue2.tiff in CopyFiles */ = {isa = PBXBuildFile; fileRef = 3518E4D00AC62517002ED3A2 /* BoxBlue2.tiff */; };
    15                 3518E4D70AC6253F002ED3A2 /* PiecesWindow.nib in Resources */ = {isa = PBXBuildFile; fileRef = 3518E4D50AC6253F002ED3A2 /* PiecesWindow.nib */; };
    16                 3518E4FB0AC62832002ED3A2 /* PiecesWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3518E4A40AC620FC002ED3A2 /* PiecesWindowController.m */; };
     15                3518E4FB0AC62832002ED3A2 /* PiecesView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3518E4A40AC620FC002ED3A2 /* PiecesView.m */; };
    1716                3518E5210AC62A29002ED3A2 /* PiecesBack.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 3518E4CD0AC62517002ED3A2 /* PiecesBack.tiff */; };
    1817                3518E5230AC62A2A002ED3A2 /* BoxBlue2.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 3518E4D00AC62517002ED3A2 /* BoxBlue2.tiff */; };
     
    250249                29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
    251250                32CA4F630368D1EE00C91783 /* Transmission_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Transmission_Prefix.pch; path = macosx/Transmission_Prefix.pch; sourceTree = "<group>"; };
    252                 3518E4A30AC620FC002ED3A2 /* PiecesWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PiecesWindowController.h; sourceTree = "<group>"; };
    253                 3518E4A40AC620FC002ED3A2 /* PiecesWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PiecesWindowController.m; sourceTree = "<group>"; };
     251                3518E4A30AC620FC002ED3A2 /* PiecesView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PiecesView.h; sourceTree = "<group>"; };
     252                3518E4A40AC620FC002ED3A2 /* PiecesView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PiecesView.m; sourceTree = "<group>"; };
    254253                3518E4CD0AC62517002ED3A2 /* PiecesBack.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = PiecesBack.tiff; path = macosx/Images/PiecesBack.tiff; sourceTree = "<group>"; };
    255254                3518E4CF0AC62517002ED3A2 /* BoxBlue1.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = BoxBlue1.tiff; path = macosx/Images/BoxBlue1.tiff; sourceTree = "<group>"; };
    256255                3518E4D00AC62517002ED3A2 /* BoxBlue2.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = BoxBlue2.tiff; path = macosx/Images/BoxBlue2.tiff; sourceTree = "<group>"; };
    257                 3518E4D60AC6253F002ED3A2 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = macosx/English.lproj/PiecesWindow.nib; sourceTree = "<group>"; };
    258256                3518E5270AC62A55002ED3A2 /* BoxBlue3.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = BoxBlue3.tiff; path = macosx/Images/BoxBlue3.tiff; sourceTree = "<group>"; };
    259257                3518E5280AC62A55002ED3A2 /* BoxWhite.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = BoxWhite.tiff; path = macosx/Images/BoxWhite.tiff; sourceTree = "<group>"; };
     
    453451                        isa = PBXGroup;
    454452                        children = (
    455                                 3518E4A30AC620FC002ED3A2 /* PiecesWindowController.h */,
    456                                 3518E4A40AC620FC002ED3A2 /* PiecesWindowController.m */,
     453                                3518E4A30AC620FC002ED3A2 /* PiecesView.h */,
     454                                3518E4A40AC620FC002ED3A2 /* PiecesView.m */,
    457455                                A2A306530AAD24A80049E2AC /* UKFileWatcher.h */,
    458456                                A2A306540AAD24A80049E2AC /* UKFileWatcher.m */,
     
    600598                                A253F7290A699373008EE24F /* FilterButtonSelectedRight.png */,
    601599                                A2912C520A2956E80097A0CA /* PrefsWindow.nib */,
    602                                 3518E4D50AC6253F002ED3A2 /* PiecesWindow.nib */,
    603600                        );
    604601                        name = Resources;
     
    733730                                4DAB87C90ABE1F730081CF7E /* natpmp.h in Headers */,
    734731                                4DAB87CB0ABE1F730081CF7E /* http.h in Headers */,
    735                                 3518E4A50AC620FC002ED3A2 /* PiecesWindowController.h in Headers */,
     732                                3518E4A50AC620FC002ED3A2 /* PiecesView.h in Headers */,
    736733                        );
    737734                        runOnlyForDeploymentPostprocessing = 0;
     
    887884                                35B038130AC5B6EB00A10FDF /* ResumeNoWaitOn.png in Resources */,
    888885                                35B038140AC5B6EC00A10FDF /* ResumeNoWaitOff.png in Resources */,
    889                                 3518E4D70AC6253F002ED3A2 /* PiecesWindow.nib in Resources */,
    890886                                3518E5210AC62A29002ED3A2 /* PiecesBack.tiff in Resources */,
    891887                                3518E5230AC62A2A002ED3A2 /* BoxBlue2.tiff in Resources */,
     
    923919                                4DAB87CA0ABE1F730081CF7E /* natpmp.c in Sources */,
    924920                                4DAB87CC0ABE1F730081CF7E /* http.c in Sources */,
    925                                 3518E4A60AC620FC002ED3A2 /* PiecesWindowController.m in Sources */,
     921                                3518E4A60AC620FC002ED3A2 /* PiecesView.m in Sources */,
    926922                        );
    927923                        runOnlyForDeploymentPostprocessing = 0;
     
    958954                                A2A306600AAD24A80049E2AC /* UKKQueue.m in Sources */,
    959955                                A2A306620AAD24A80049E2AC /* UKMainThreadProxy.m in Sources */,
    960                                 3518E4FB0AC62832002ED3A2 /* PiecesWindowController.m in Sources */,
     956                                3518E4FB0AC62832002ED3A2 /* PiecesView.m in Sources */,
    961957                        );
    962958                        runOnlyForDeploymentPostprocessing = 0;
     
    992988                        );
    993989                        name = MainMenu.nib;
    994                         sourceTree = "<group>";
    995                 };
    996                 3518E4D50AC6253F002ED3A2 /* PiecesWindow.nib */ = {
    997                         isa = PBXVariantGroup;
    998                         children = (
    999                                 3518E4D60AC6253F002ED3A2 /* English */,
    1000                         );
    1001                         name = PiecesWindow.nib;
    1002990                        sourceTree = "<group>";
    1003991                };
  • trunk/macosx/Controller.h

    r920 r923  
    3131#import "InfoWindowController.h"
    3232#import "MessageWindowController.h"
    33 #import "PiecesWindowController.h"
    3433#import "Badger.h"
    3534#import "ImageBackgroundView.h"
     
    5150    InfoWindowController            * fInfoController;
    5251    MessageWindowController         * fMessageController;
    53     PiecesWindowController          * fPiecesWindowController;
    5452
    5553    IBOutlet NSWindow               * fWindow;
     
    142140
    143141- (void) showMessageWindow: (id) sender;
    144 - (void) showPiecesView: (id) sender;
    145142
    146143- (void) updateControlTint: (NSNotification *) notification;
  • trunk/macosx/Controller.m

    r920 r923  
    8787        fMessageController = [[MessageWindowController alloc] initWithWindowNibName: @"MessageWindow"];
    8888        fInfoController = [[InfoWindowController alloc] initWithWindowNibName: @"InfoWindow"];
    89         fPiecesWindowController = [[PiecesWindowController alloc] initWithWindowNibName: @"PiecesWindow"];
    9089        fPrefsController = [[PrefsController alloc] initWithWindowNibName: @"PrefsWindow" handle: fLib];
    9190       
     
    105104    [fInfoController release];
    106105    [fMessageController release];
    107     [fPiecesWindowController release];
    108106    [fPrefsController release];
    109107   
     
    359357    if ([fDefaults boolForKey: @"InfoVisible"])
    360358        [self showInfo: nil];
    361    
    362     if ([fDefaults boolForKey: @"PiecesViewerVisible"])
    363         [self showPiecesView: nil];
    364359   
    365360    //timer to auto toggle speed limit
     
    429424    //remember window states and close all windows
    430425    [fDefaults setBool: [[fInfoController window] isVisible] forKey: @"InfoVisible"];
    431     [fDefaults setBool: [[fPiecesWindowController window] isVisible] forKey: @"PiecesViewerVisible"];
    432426    [[NSApp windows] makeObjectsPerformSelector: @selector(close)];
    433427    [self showStatusBar: NO animate: NO];
     
    937931}
    938932
    939 - (void) showPiecesView: (id) sender
    940 {
    941     if ([[fPiecesWindowController window] isVisible])
    942         [fPiecesWindowController close];
    943     else
    944     {
    945         [fPiecesWindowController updateView: NO];
    946         [[fPiecesWindowController window] orderFront: nil];
    947     }
    948 }
    949 
    950933- (void) updateControlTint: (NSNotification *) notification
    951934{
     
    977960    if ([[fInfoController window] isVisible])
    978961        [fInfoController updateInfoStats];
    979    
    980     //update pieces viewer
    981     if ([[fPiecesWindowController window] isVisible])
    982         [fPiecesWindowController updateView: NO];
    983962
    984963    //badge dock
     
    17281707- (void) tableViewSelectionDidChange: (NSNotification *) notification
    17291708{
    1730     NSArray * torrents = [self torrentsAtIndexes: [fTableView selectedRowIndexes]];
    1731     [fInfoController updateInfoForTorrents: torrents];
    1732    
    1733     Torrent * torrent = [torrents count] == 1 ? [torrents objectAtIndex: 0] : nil;
    1734     [fPiecesWindowController setTorrent: torrent];
     1709    [fInfoController updateInfoForTorrents: [self torrentsAtIndexes: [fTableView selectedRowIndexes]]];
    17351710}
    17361711
     
    20712046    {
    20722047        NSString * title = [[fInfoController window] isVisible] ? @"Hide Inspector" : @"Show Inspector";
    2073         if (![[menuItem title] isEqualToString: title])
    2074                 [menuItem setTitle: title];
    2075 
    2076         return YES;
    2077     }
    2078    
    2079     //enable show pieces window
    2080     if (action == @selector(showPiecesView:))
    2081     {
    2082         NSString * title = [[fPiecesWindowController window] isVisible] ? @"Hide Pieces Viewer" : @"Show Pieces Viewer";
    20832048        if (![[menuItem title] isEqualToString: title])
    20842049                [menuItem setTitle: title];
  • trunk/macosx/Defaults.plist

    r920 r923  
    5555        <key>NatTraversal</key>
    5656        <true/>
    57         <key>PiecesViewerVisible</key>
    58         <false/>
    5957        <key>PlayDownloadSound</key>
    6058        <true/>
  • trunk/macosx/English.lproj/InfoWindow.nib/classes.nib

    r921 r923  
    2929                fPieceSizeField = NSTextField;
    3030                fPiecesField = NSTextField;
     31                fPiecesView = PiecesView;
    3132                fRatioField = NSTextField;
    3233                fRatioLimitField = NSTextField;
     
    4445            SUPERCLASS = NSWindowController;
    4546        },
    46         {CLASS = NSSegmentedControl; LANGUAGE = ObjC; SUPERCLASS = NSControl; }
     47        {CLASS = NSSegmentedControl; LANGUAGE = ObjC; SUPERCLASS = NSControl; },
     48        {
     49            CLASS = PiecesView;
     50            LANGUAGE = ObjC;
     51            OUTLETS = {fImageView = NSImageView; };
     52            SUPERCLASS = NSObject;
     53        }
    4754    );
    4855    IBVersion = 1;
  • trunk/macosx/English.lproj/MainMenu.nib/classes.nib

    r920 r923  
    2929                showMainWindow = id;
    3030                showMessageWindow = id;
    31                 showPiecesView = id;
    3231                showPreferenceWindow = id;
    3332                stopAllTorrents = id;
  • trunk/macosx/English.lproj/MainMenu.nib/info.nib

    r920 r923  
    3232        <key>IBOpenObjects</key>
    3333        <array>
     34                <integer>21</integer>
    3435                <integer>29</integer>
    35                 <integer>21</integer>
    3636        </array>
    3737        <key>IBSystem Version</key>
  • trunk/macosx/InfoWindowController.h

    r921 r923  
    2525#import <Cocoa/Cocoa.h>
    2626#import "Torrent.h"
     27#import "PiecesView.h"
    2728#import <transmission.h>
    2829
     
    5354    IBOutlet NSMatrix * fRatioMatrix;
    5455    IBOutlet NSTextField * fRatioLimitField;
     56   
     57    IBOutlet PiecesView * fPiecesView;
    5558}
    5659
  • trunk/macosx/InfoWindowController.m

    r922 r923  
    170170        [fPeers removeAllObjects];
    171171        [fPeerTable reloadData];
     172       
     173        [fPiecesView setTorrent: nil];
    172174    }
    173175    else
     
    206208        [fTorrentLocationField setSelectable: YES];
    207209        [fDataLocationField setSelectable: YES];
     210       
     211        [fPiecesView setTorrent: torrent];
    208212    }
    209213   
     
    280284        if ([[[fTabView selectedTabViewItem] identifier] isEqualToString: TAB_PEERS_IDENT])
    281285            [self reloadPeerTable];
     286       
     287        //update pieces view if visible
     288        if ([[[fTabView selectedTabViewItem] identifier] isEqualToString: TAB_ACTIVITY_IDENT])
     289            [fPiecesView updateView: NO];
    282290    }
    283291}
     
    385393    float height;
    386394    if ([identifier isEqualToString: TAB_ACTIVITY_IDENT])
     395    {
    387396        height = TAB_ACTIVITY_HEIGHT;
     397       
     398        [fPiecesView updateView: NO];
     399    }
    388400    else if ([identifier isEqualToString: TAB_PEERS_IDENT])
    389401    {
Note: See TracChangeset for help on using the changeset viewer.