source: trunk/macosx/FileRenameSheetController.h

Last change on this file was 13989, checked in by livings124, 9 years ago

properly enable/disable the rename confirm button

File size: 1.2 KB
Line 
1//
2//  FileRenameSheetController.h
3//  Transmission
4//
5//  Created by Mitchell Livingston on 1/20/13.
6//  Copyright (c) 2013 The Transmission Project. All rights reserved.
7//
8
9#import <Cocoa/Cocoa.h>
10
11@class FileListNode;
12@class Torrent;
13
14@interface FileRenameSheetController : NSWindowController
15{
16    Torrent * _torrent;
17    FileListNode * _node;
18    void (^_completionHandler)(BOOL);
19    NSString * _originalName;
20   
21    IBOutlet NSTextField * _labelField;
22    IBOutlet NSTextField * _inputField;
23    IBOutlet NSButton * _renameButton;
24    IBOutlet NSButton * _cancelButton;
25}
26
27+ (void) presentSheetForTorrent: (Torrent *) torrent modalForWindow: (NSWindow *) window completionHandler: (void (^)(BOOL didRename)) completionHandler;
28+ (void) presentSheetForFileListNode: (FileListNode *) node modalForWindow: (NSWindow *) window completionHandler: (void (^)(BOOL didRename)) completionHandler;
29
30@property (assign) IBOutlet NSTextField * labelField;
31@property (assign) IBOutlet NSTextField * inputField;
32@property (assign) IBOutlet NSButton * renameButton;
33@property (assign) IBOutlet NSButton * cancelButton;
34
35- (IBAction) rename: (id) sender;
36- (IBAction) cancelRename: (id) sender;
37
38@end
Note: See TracBrowser for help on using the repository browser.