2022-01-20 18:27:56 +00:00
|
|
|
// This file Copyright © 2008-2022 Transmission authors and contributors.
|
|
|
|
// It may be used under the MIT (SPDX: MIT) license.
|
|
|
|
// License text can be found in the licenses/ folder.
|
2008-01-04 04:45:31 +00:00
|
|
|
|
|
|
|
#import <Cocoa/Cocoa.h>
|
2018-09-30 10:37:30 +00:00
|
|
|
|
2012-10-30 00:22:10 +00:00
|
|
|
#import "Torrent.h"
|
2008-01-04 04:45:31 +00:00
|
|
|
|
|
|
|
@class Controller;
|
2009-10-11 03:36:50 +00:00
|
|
|
@class FileOutlineController;
|
|
|
|
@class Torrent;
|
2008-01-04 04:45:31 +00:00
|
|
|
|
|
|
|
@interface AddWindowController : NSWindowController
|
|
|
|
{
|
2021-08-15 09:41:48 +00:00
|
|
|
IBOutlet NSImageView* fIconView;
|
|
|
|
IBOutlet NSImageView* fLocationImageView;
|
|
|
|
IBOutlet NSTextField* fNameField;
|
|
|
|
IBOutlet NSTextField* fStatusField;
|
|
|
|
IBOutlet NSTextField* fLocationField;
|
|
|
|
IBOutlet NSButton* fStartCheck;
|
|
|
|
IBOutlet NSButton* fDeleteCheck;
|
|
|
|
IBOutlet NSPopUpButton* fGroupPopUp;
|
|
|
|
IBOutlet NSPopUpButton* fPriorityPopUp;
|
|
|
|
IBOutlet NSProgressIndicator* fVerifyIndicator;
|
|
|
|
|
|
|
|
IBOutlet NSTextField* fFileFilterField;
|
|
|
|
IBOutlet NSButton* fCheckAllButton;
|
|
|
|
IBOutlet NSButton* fUncheckAllButton;
|
|
|
|
|
|
|
|
IBOutlet FileOutlineController* fFileController;
|
|
|
|
IBOutlet NSScrollView* fFileScrollView;
|
|
|
|
|
|
|
|
Controller* fController;
|
|
|
|
|
|
|
|
Torrent* fTorrent;
|
|
|
|
NSString* fDestination;
|
|
|
|
NSString* fTorrentFile;
|
2008-12-13 22:10:11 +00:00
|
|
|
BOOL fLockDestination;
|
2017-01-24 17:53:16 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
BOOL fDeleteTorrentEnableInitially;
|
|
|
|
BOOL fCanToggleDelete;
|
2008-10-28 00:08:49 +00:00
|
|
|
NSInteger fGroupValue;
|
2017-01-24 17:53:16 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
NSTimer* fTimer;
|
2017-01-24 17:53:16 +00:00
|
|
|
|
2012-10-30 00:22:10 +00:00
|
|
|
TorrentDeterminationType fGroupValueDetermination;
|
2008-01-04 04:45:31 +00:00
|
|
|
}
|
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
// if canToggleDelete is NO, we will also not delete the file regardless of the delete check's state
|
|
|
|
// (this is so it can be disabled and checked for a downloaded torrent, where the file's already deleted)
|
|
|
|
- (instancetype)initWithTorrent:(Torrent*)torrent
|
|
|
|
destination:(NSString*)path
|
|
|
|
lockDestination:(BOOL)lockDestination
|
|
|
|
controller:(Controller*)controller
|
|
|
|
torrentFile:(NSString*)torrentFile
|
|
|
|
deleteTorrentCheckEnableInitially:(BOOL)deleteTorrent
|
|
|
|
canToggleDelete:(BOOL)canToggleDelete;
|
2008-01-04 04:45:31 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
@property(nonatomic, readonly) Torrent* torrent;
|
2008-01-05 21:31:05 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
- (void)setDestination:(id)sender;
|
2008-01-04 04:45:31 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
- (void)add:(id)sender;
|
|
|
|
- (void)cancelAdd:(id)sender;
|
2008-01-04 04:45:31 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
- (IBAction)setFileFilterText:(id)sender;
|
|
|
|
- (IBAction)checkAll:(id)sender;
|
|
|
|
- (IBAction)uncheckAll:(id)sender;
|
2012-05-20 00:19:55 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
- (void)verifyLocalData:(id)sender;
|
2008-01-09 19:52:11 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
- (void)changePriority:(id)sender;
|
2010-02-11 01:34:32 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
- (void)updateCheckButtons:(NSNotification*)notification;
|
2008-02-27 19:34:55 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
- (void)updateGroupMenu:(NSNotification*)notification;
|
2008-01-04 14:56:29 +00:00
|
|
|
|
2008-01-04 04:45:31 +00:00
|
|
|
@end
|