Changeset 1010 for trunk/macosx


Ignore:
Timestamp:
Oct 15, 2006, 7:57:40 PM (15 years ago)
Author:
livings124
Message:

buttons in inspector to reveal data file and (public) torrent file

Location:
trunk/macosx
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/English.lproj/InfoWindow.nib/classes.nib

    r1002 r1010  
    99        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
    1010        {
    11             ACTIONS = {revealFile = id; setRatioCheck = id; setRatioLimit = id; };
     11            ACTIONS = {
     12                revealDataFile = id;
     13                revealFile = id;
     14                revealTorrentFile = id;
     15                setRatioCheck = id;
     16                setRatioLimit = id;
     17            };
    1218            CLASS = InfoWindowController;
    1319            LANGUAGE = ObjC;
     
    3339                fRatioLimitField = NSTextField;
    3440                fRatioMatrix = NSMatrix;
     41                fRevealDataButton = NSButton;
     42                fRevealTorrentButton = NSButton;
    3543                fSeedersField = NSTextField;
    3644                fSizeField = NSTextField;
  • trunk/macosx/InfoWindowController.h

    r923 r1010  
    4444                        * fDownloadedValidField, * fDownloadedTotalField, * fUploadedTotalField,
    4545                        * fRatioField, * fSwarmSpeedField;
     46    IBOutlet NSButton * fRevealDataButton, * fRevealTorrentButton;
    4647
    4748    IBOutlet NSTableView * fPeerTable;
     
    6465- (void) setNextTab;
    6566- (void) setPreviousTab;
     67
     68- (void) revealTorrentFile: (id) sender;
     69- (void) revealDataFile: (id) sender;
    6670- (void) revealFile: (id) sender;
    6771
  • trunk/macosx/InfoWindowController.m

    r1008 r1010  
    151151        [fDateStartedField setStringValue: @""];
    152152       
     153        [fRevealDataButton setHidden: YES];
     154        [fRevealTorrentButton setHidden: YES];
     155       
    153156        //don't allow empty fields to be selected
    154157        [fTrackerField setSelectable: NO];
     
    201204        [fDataLocationField setToolTip: [torrent dataLocation]];
    202205        [fDateStartedField setObjectValue: [torrent date]];
     206       
     207        [fRevealDataButton setHidden: NO];
     208        [fRevealTorrentButton setHidden: ![torrent publicTorrent]];
    203209       
    204210        //allow these fields to be selected
     
    532538}
    533539
     540- (void) revealTorrentFile: (id) sender
     541{
     542    [[fTorrents objectAtIndex: 0] revealPublicTorrent];
     543}
     544
     545- (void) revealDataFile: (id) sender
     546{
     547    [[fTorrents objectAtIndex: 0] revealData];
     548}
     549
    534550- (void) revealFile: (id) sender
    535551{
  • trunk/macosx/Torrent.h

    r1006 r1010  
    8989
    9090- (void)    revealData;
     91- (void)    revealPublicTorrent;
    9192- (void)    trashData;
    9293- (void)    trashTorrent;
  • trunk/macosx/Torrent.m

    r1006 r1010  
    431431{
    432432    [[NSWorkspace sharedWorkspace] selectFile: [self dataLocation] inFileViewerRootedAtPath: nil];
     433}
     434
     435- (void) revealPublicTorrent
     436{
     437    if (fPublicTorrent)
     438        [[NSWorkspace sharedWorkspace] selectFile: fPublicTorrentLocation inFileViewerRootedAtPath: nil];
    433439}
    434440
Note: See TracChangeset for help on using the changeset viewer.