Changeset 903


Ignore:
Timestamp:
Sep 24, 2006, 10:28:39 PM (15 years ago)
Author:
livings124
Message:

Add "Pieces Viewer," accessible through the View menu. I swear this was my own idea. :-p

Location:
branches/nat-traversal
Files:
12 added
7 edited

Legend:

Unmodified
Added
Removed
  • branches/nat-traversal/Transmission.xcodeproj/project.pbxproj

    r900 r903  
    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 */; };
     12                3518E4D10AC62517002ED3A2 /* PiecesBack.tiff in CopyFiles */ = {isa = PBXBuildFile; fileRef = 3518E4CD0AC62517002ED3A2 /* PiecesBack.tiff */; };
     13                3518E4D30AC62517002ED3A2 /* BoxBlue1.tiff in CopyFiles */ = {isa = PBXBuildFile; fileRef = 3518E4CF0AC62517002ED3A2 /* BoxBlue1.tiff */; };
     14                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 */; };
     17                3518E5210AC62A29002ED3A2 /* PiecesBack.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 3518E4CD0AC62517002ED3A2 /* PiecesBack.tiff */; };
     18                3518E5230AC62A2A002ED3A2 /* BoxBlue2.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 3518E4D00AC62517002ED3A2 /* BoxBlue2.tiff */; };
     19                3518E5240AC62A2B002ED3A2 /* BoxBlue1.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 3518E4CF0AC62517002ED3A2 /* BoxBlue1.tiff */; };
     20                3518E5290AC62A55002ED3A2 /* BoxBlue3.tiff in CopyFiles */ = {isa = PBXBuildFile; fileRef = 3518E5270AC62A55002ED3A2 /* BoxBlue3.tiff */; };
     21                3518E52A0AC62A55002ED3A2 /* BoxWhite.tiff in CopyFiles */ = {isa = PBXBuildFile; fileRef = 3518E5280AC62A55002ED3A2 /* BoxWhite.tiff */; };
     22                3518E52B0AC62A57002ED3A2 /* BoxWhite.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 3518E5280AC62A55002ED3A2 /* BoxWhite.tiff */; };
     23                3518E52C0AC62A57002ED3A2 /* BoxBlue3.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 3518E5270AC62A55002ED3A2 /* BoxBlue3.tiff */; };
     24                3518E5770AC63262002ED3A2 /* BoxGreen.tiff in CopyFiles */ = {isa = PBXBuildFile; fileRef = 3518E5760AC63262002ED3A2 /* BoxGreen.tiff */; };
     25                3518E57B0AC632EA002ED3A2 /* BoxGreen.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 3518E5760AC63262002ED3A2 /* BoxGreen.tiff */; };
    1026                35B037A70AC59BC600A10FDF /* Check.png in CopyFiles */ = {isa = PBXBuildFile; fileRef = 35B037A60AC59BC600A10FDF /* Check.png */; };
    1127                35B037B60AC59C4000A10FDF /* Check.png in Resources */ = {isa = PBXBuildFile; fileRef = 35B037A60AC59BC600A10FDF /* Check.png */; };
     
    196212                                35B037FB0AC5B53800A10FDF /* ResumeNoWaitOn.png in CopyFiles */,
    197213                                35B037FC0AC5B53800A10FDF /* ResumeNoWaitOff.png in CopyFiles */,
     214                                3518E4D10AC62517002ED3A2 /* PiecesBack.tiff in CopyFiles */,
     215                                3518E4D30AC62517002ED3A2 /* BoxBlue1.tiff in CopyFiles */,
     216                                3518E4D40AC62517002ED3A2 /* BoxBlue2.tiff in CopyFiles */,
     217                                3518E5290AC62A55002ED3A2 /* BoxBlue3.tiff in CopyFiles */,
     218                                3518E52A0AC62A55002ED3A2 /* BoxWhite.tiff in CopyFiles */,
     219                                3518E5770AC63262002ED3A2 /* BoxGreen.tiff in CopyFiles */,
    198220                        );
    199221                        runOnlyForDeploymentPostprocessing = 0;
     
    228250                29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
    229251                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>"; };
     254                3518E4CD0AC62517002ED3A2 /* PiecesBack.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = PiecesBack.tiff; path = macosx/Images/PiecesBack.tiff; sourceTree = "<group>"; };
     255                3518E4CF0AC62517002ED3A2 /* BoxBlue1.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = BoxBlue1.tiff; path = macosx/Images/BoxBlue1.tiff; sourceTree = "<group>"; };
     256                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>"; };
     258                3518E5270AC62A55002ED3A2 /* BoxBlue3.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = BoxBlue3.tiff; path = macosx/Images/BoxBlue3.tiff; sourceTree = "<group>"; };
     259                3518E5280AC62A55002ED3A2 /* BoxWhite.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = BoxWhite.tiff; path = macosx/Images/BoxWhite.tiff; sourceTree = "<group>"; };
     260                3518E5760AC63262002ED3A2 /* BoxGreen.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = BoxGreen.tiff; path = macosx/Images/BoxGreen.tiff; sourceTree = "<group>"; };
    230261                35B037A60AC59BC600A10FDF /* Check.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Check.png; path = macosx/Images/Check.png; sourceTree = "<group>"; };
    231262                35B037F90AC5B53800A10FDF /* ResumeNoWaitOn.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = ResumeNoWaitOn.png; path = macosx/Images/ResumeNoWaitOn.png; sourceTree = "<group>"; };
     
    422453                        isa = PBXGroup;
    423454                        children = (
     455                                3518E4A30AC620FC002ED3A2 /* PiecesWindowController.h */,
     456                                3518E4A40AC620FC002ED3A2 /* PiecesWindowController.m */,
    424457                                A2A306530AAD24A80049E2AC /* UKFileWatcher.h */,
    425458                                A2A306540AAD24A80049E2AC /* UKFileWatcher.m */,
     
    492525                                A259316A0A73B2CC002F4FE7 /* Transmission Help */,
    493526                                A2F8951E0A2D4BA500ED2127 /* Credits.rtf */,
     527                                3518E4CD0AC62517002ED3A2 /* PiecesBack.tiff */,
     528                                3518E4CF0AC62517002ED3A2 /* BoxBlue1.tiff */,
     529                                3518E4D00AC62517002ED3A2 /* BoxBlue2.tiff */,
     530                                3518E5270AC62A55002ED3A2 /* BoxBlue3.tiff */,
     531                                3518E5280AC62A55002ED3A2 /* BoxWhite.tiff */,
     532                                3518E5760AC63262002ED3A2 /* BoxGreen.tiff */,
    494533                                A2305AA40A3DCCEF00AB2D77 /* ProgressBarEndAdvanced.png */,
    495534                                A2305AA50A3DCCEF00AB2D77 /* ProgressBarEndBlue.png */,
     
    561600                                A253F7290A699373008EE24F /* FilterButtonSelectedRight.png */,
    562601                                A2912C520A2956E80097A0CA /* PrefsWindow.nib */,
     602                                3518E4D50AC6253F002ED3A2 /* PiecesWindow.nib */,
    563603                        );
    564604                        name = Resources;
     
    693733                                4DAB87C90ABE1F730081CF7E /* natpmp.h in Headers */,
    694734                                4DAB87CB0ABE1F730081CF7E /* http.h in Headers */,
     735                                3518E4A50AC620FC002ED3A2 /* PiecesWindowController.h in Headers */,
    695736                        );
    696737                        runOnlyForDeploymentPostprocessing = 0;
     
    846887                                35B038130AC5B6EB00A10FDF /* ResumeNoWaitOn.png in Resources */,
    847888                                35B038140AC5B6EC00A10FDF /* ResumeNoWaitOff.png in Resources */,
     889                                3518E4D70AC6253F002ED3A2 /* PiecesWindow.nib in Resources */,
     890                                3518E5210AC62A29002ED3A2 /* PiecesBack.tiff in Resources */,
     891                                3518E5230AC62A2A002ED3A2 /* BoxBlue2.tiff in Resources */,
     892                                3518E5240AC62A2B002ED3A2 /* BoxBlue1.tiff in Resources */,
     893                                3518E52B0AC62A57002ED3A2 /* BoxWhite.tiff in Resources */,
     894                                3518E52C0AC62A57002ED3A2 /* BoxBlue3.tiff in Resources */,
     895                                3518E57B0AC632EA002ED3A2 /* BoxGreen.tiff in Resources */,
    848896                        );
    849897                        runOnlyForDeploymentPostprocessing = 0;
     
    875923                                4DAB87CA0ABE1F730081CF7E /* natpmp.c in Sources */,
    876924                                4DAB87CC0ABE1F730081CF7E /* http.c in Sources */,
     925                                3518E4A60AC620FC002ED3A2 /* PiecesWindowController.m in Sources */,
    877926                        );
    878927                        runOnlyForDeploymentPostprocessing = 0;
     
    909958                                A2A306600AAD24A80049E2AC /* UKKQueue.m in Sources */,
    910959                                A2A306620AAD24A80049E2AC /* UKMainThreadProxy.m in Sources */,
     960                                3518E4FB0AC62832002ED3A2 /* PiecesWindowController.m in Sources */,
    911961                        );
    912962                        runOnlyForDeploymentPostprocessing = 0;
     
    942992                        );
    943993                        name = MainMenu.nib;
     994                        sourceTree = "<group>";
     995                };
     996                3518E4D50AC6253F002ED3A2 /* PiecesWindow.nib */ = {
     997                        isa = PBXVariantGroup;
     998                        children = (
     999                                3518E4D60AC6253F002ED3A2 /* English */,
     1000                        );
     1001                        name = PiecesWindow.nib;
    9441002                        sourceTree = "<group>";
    9451003                };
  • branches/nat-traversal/macosx/Controller.h

    r884 r903  
    3131#import "InfoWindowController.h"
    3232#import "MessageWindowController.h"
     33#import "PiecesWindowController.h"
    3334#import "Badger.h"
    3435#import "ImageBackgroundView.h"
     
    5051    InfoWindowController            * fInfoController;
    5152    MessageWindowController         * fMessageController;
     53    PiecesWindowController          * fPiecesWindowController;
    5254
    5355    IBOutlet NSWindow               * fWindow;
     
    140142
    141143- (void) showMessageWindow: (id) sender;
     144- (void) showPiecesView: (id) sender;
    142145
    143146- (void) updateControlTint: (NSNotification *) notification;
  • branches/nat-traversal/macosx/Controller.m

    r900 r903  
    8787        fMessageController = [[MessageWindowController alloc] initWithWindowNibName: @"MessageWindow"];
    8888        fInfoController = [[InfoWindowController alloc] initWithWindowNibName: @"InfoWindow"];
     89        fPiecesWindowController = [[PiecesWindowController alloc] initWithWindowNibName: @"PiecesWindow"];
    8990        fPrefsController = [[PrefsController alloc] initWithWindowNibName: @"PrefsWindow" handle: fLib];
    9091       
     
    101102{
    102103    [[NSNotificationCenter defaultCenter] removeObserver: self];
    103 
     104   
     105    [fInfoController release];
     106    [fMessageController release];
     107    [fPiecesWindowController release];
     108    [fPrefsController release];
     109   
     110    [fToolbar release];
    104111    [fTorrents release];
    105112    [fDisplayedTorrents release];
    106    
    107     [fToolbar release];
    108     [fInfoController release];
    109     [fPrefsController release];
    110113    [fBadger release];
    111114   
     
    928931{
    929932    [fMessageController showWindow: nil];
     933}
     934
     935- (void) showPiecesView: (id) sender
     936{
     937    if ([[fPiecesWindowController window] isVisible])
     938        [fPiecesWindowController close];
     939    else
     940    {
     941        [fPiecesWindowController updateView: nil];
     942        [[fPiecesWindowController window] orderFront: nil];
     943    }
    930944}
    931945
     
    15861600}
    15871601
    1588 /*- (void) tableView: (NSTableView *) t willDisplayCell: (id) cell
    1589     forTableColumn: (NSTableColumn *) tableColumn row: (int) row
    1590 {
    1591     [cell setTorrent: [fDisplayedTorrents objectAtIndex: row]];
    1592 }*/
    1593 
    15941602- (id) tableView: (NSTableView *) tableView objectValueForTableColumn: (NSTableColumn *) tableColumn row: (int) row
    15951603{
     
    17121720- (void) tableViewSelectionDidChange: (NSNotification *) notification
    17131721{
    1714     [fInfoController updateInfoForTorrents: [self torrentsAtIndexes: [fTableView selectedRowIndexes]]];
     1722    NSArray * torrents = [self torrentsAtIndexes: [fTableView selectedRowIndexes]];
     1723    [fInfoController updateInfoForTorrents: torrents];
     1724   
     1725    Torrent * torrent = [torrents count] == 1 ? [torrents objectAtIndex: 0] : nil;
     1726    [fPiecesWindowController setTorrent: torrent];
    17151727}
    17161728
     
    20512063    {
    20522064        NSString * title = [[fInfoController window] isVisible] ? @"Hide Inspector" : @"Show Inspector";
     2065        if (![[menuItem title] isEqualToString: title])
     2066                [menuItem setTitle: title];
     2067
     2068        return YES;
     2069    }
     2070   
     2071    //enable show pieces window
     2072    if (action == @selector(showPiecesView:))
     2073    {
     2074        NSString * title = [[fPiecesWindowController window] isVisible] ? @"Hide Pieces Viewer" : @"Show Pieces Viewer";
    20532075        if (![[menuItem title] isEqualToString: title])
    20542076                [menuItem setTitle: title];
  • branches/nat-traversal/macosx/English.lproj/MainMenu.nib/classes.nib

    r876 r903  
    2929                showMainWindow = id;
    3030                showMessageWindow = id;
     31                showPiecesView = id;
    3132                showPreferenceWindow = id;
    3233                stopAllTorrents = id;
  • branches/nat-traversal/macosx/English.lproj/MainMenu.nib/info.nib

    r897 r903  
    1414                <string>337 545 477 67 0 0 1152 842 </string>
    1515                <key>29</key>
    16                 <string>123 593 451 44 0 0 1024 746 </string>
     16                <string>280 699 451 44 0 0 1152 842 </string>
    1717                <key>456</key>
    1818                <string>340 316 240 225 0 0 1024 746 </string>
  • branches/nat-traversal/macosx/Torrent.m

    r892 r903  
    782782- (NSImage *) advancedBar
    783783{
    784     #warning figure out length
    785784    int width = 250; //integers for bars
    786785   
Note: See TracChangeset for help on using the changeset viewer.