mirror of
https://github.com/transmission/transmission
synced 2024-12-25 01:03:01 +00:00
buttons in inspector to reveal data file and (public) torrent file
This commit is contained in:
parent
d397144b0f
commit
78ee2deab5
6 changed files with 36 additions and 1 deletions
10
macosx/English.lproj/InfoWindow.nib/classes.nib
generated
10
macosx/English.lproj/InfoWindow.nib/classes.nib
generated
|
@ -8,7 +8,13 @@
|
|||
},
|
||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{
|
||||
ACTIONS = {revealFile = id; setRatioCheck = id; setRatioLimit = id; };
|
||||
ACTIONS = {
|
||||
revealDataFile = id;
|
||||
revealFile = id;
|
||||
revealTorrentFile = id;
|
||||
setRatioCheck = id;
|
||||
setRatioLimit = id;
|
||||
};
|
||||
CLASS = InfoWindowController;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
|
@ -32,6 +38,8 @@
|
|||
fRatioField = NSTextField;
|
||||
fRatioLimitField = NSTextField;
|
||||
fRatioMatrix = NSMatrix;
|
||||
fRevealDataButton = NSButton;
|
||||
fRevealTorrentButton = NSButton;
|
||||
fSeedersField = NSTextField;
|
||||
fSizeField = NSTextField;
|
||||
fStateField = NSTextField;
|
||||
|
|
BIN
macosx/English.lproj/InfoWindow.nib/keyedobjects.nib
generated
BIN
macosx/English.lproj/InfoWindow.nib/keyedobjects.nib
generated
Binary file not shown.
|
@ -43,6 +43,7 @@
|
|||
* fDateStartedField, * fStateField,
|
||||
* fDownloadedValidField, * fDownloadedTotalField, * fUploadedTotalField,
|
||||
* fRatioField, * fSwarmSpeedField;
|
||||
IBOutlet NSButton * fRevealDataButton, * fRevealTorrentButton;
|
||||
|
||||
IBOutlet NSTableView * fPeerTable;
|
||||
IBOutlet NSTextField * fSeedersField, * fLeechersField, * fConnectedPeersField,
|
||||
|
@ -63,6 +64,9 @@
|
|||
|
||||
- (void) setNextTab;
|
||||
- (void) setPreviousTab;
|
||||
|
||||
- (void) revealTorrentFile: (id) sender;
|
||||
- (void) revealDataFile: (id) sender;
|
||||
- (void) revealFile: (id) sender;
|
||||
|
||||
- (void) setRatioCheck: (id) sender;
|
||||
|
|
|
@ -150,6 +150,9 @@
|
|||
[fDataLocationField setToolTip: nil];
|
||||
[fDateStartedField setStringValue: @""];
|
||||
|
||||
[fRevealDataButton setHidden: YES];
|
||||
[fRevealTorrentButton setHidden: YES];
|
||||
|
||||
//don't allow empty fields to be selected
|
||||
[fTrackerField setSelectable: NO];
|
||||
[fAnnounceField setSelectable: NO];
|
||||
|
@ -201,6 +204,9 @@
|
|||
[fDataLocationField setToolTip: [torrent dataLocation]];
|
||||
[fDateStartedField setObjectValue: [torrent date]];
|
||||
|
||||
[fRevealDataButton setHidden: NO];
|
||||
[fRevealTorrentButton setHidden: ![torrent publicTorrent]];
|
||||
|
||||
//allow these fields to be selected
|
||||
[fTrackerField setSelectable: YES];
|
||||
[fAnnounceField setSelectable: YES];
|
||||
|
@ -531,6 +537,16 @@
|
|||
return descriptors;
|
||||
}
|
||||
|
||||
- (void) revealTorrentFile: (id) sender
|
||||
{
|
||||
[[fTorrents objectAtIndex: 0] revealPublicTorrent];
|
||||
}
|
||||
|
||||
- (void) revealDataFile: (id) sender
|
||||
{
|
||||
[[fTorrents objectAtIndex: 0] revealData];
|
||||
}
|
||||
|
||||
- (void) revealFile: (id) sender
|
||||
{
|
||||
NSIndexSet * indexSet = [fFileTable selectedRowIndexes];
|
||||
|
|
|
@ -88,6 +88,7 @@
|
|||
- (BOOL) waitingToStart;
|
||||
|
||||
- (void) revealData;
|
||||
- (void) revealPublicTorrent;
|
||||
- (void) trashData;
|
||||
- (void) trashTorrent;
|
||||
|
||||
|
|
|
@ -432,6 +432,12 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
|||
[[NSWorkspace sharedWorkspace] selectFile: [self dataLocation] inFileViewerRootedAtPath: nil];
|
||||
}
|
||||
|
||||
- (void) revealPublicTorrent
|
||||
{
|
||||
if (fPublicTorrent)
|
||||
[[NSWorkspace sharedWorkspace] selectFile: fPublicTorrentLocation inFileViewerRootedAtPath: nil];
|
||||
}
|
||||
|
||||
- (void) trashData
|
||||
{
|
||||
[self trashFile: [self dataLocation]];
|
||||
|
|
Loading…
Reference in a new issue