mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 20:35:36 +00:00
remember the text in the URL sheet
This commit is contained in:
@@ -1229,7 +1229,6 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
|
||||
[[[URLSheetWindowController alloc] initWithController: self] beginSheetForWindow: fWindow];
|
||||
}
|
||||
|
||||
#warning need to remember sheet text between runs
|
||||
- (void) urlSheetDidEnd: (URLSheetWindowController *) controller url: (NSString *) urlString returnCode: (NSInteger) returnCode
|
||||
{
|
||||
if (returnCode != 1)
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
|
||||
@implementation URLSheetWindowController
|
||||
|
||||
NSString * urlString = @"";
|
||||
|
||||
- (id) initWithController: (Controller *) controller
|
||||
{
|
||||
if ((self = [self initWithWindowNibName: @"URLSheetWindow"]))
|
||||
@@ -39,6 +41,9 @@
|
||||
- (void) awakeFromNib
|
||||
{
|
||||
[fLabelField setStringValue: NSLocalizedString(@"Internet address of torrent file:", "URL sheet label")];
|
||||
|
||||
[fTextField setStringValue: urlString];
|
||||
[fTextField selectText: self];
|
||||
}
|
||||
|
||||
- (IBAction) beginSheetForWindow: (NSWindow *) window
|
||||
@@ -61,7 +66,8 @@
|
||||
|
||||
- (void) sheetDidEnd: (NSWindow *) sheet returnCode: (NSInteger) returnCode contextInfo: (void *) contextInfo
|
||||
{
|
||||
[fController urlSheetDidEnd: self url: [fTextField stringValue] returnCode: returnCode];
|
||||
urlString = [fTextField stringValue];
|
||||
[fController urlSheetDidEnd: self url: urlString returnCode: returnCode];
|
||||
}
|
||||
|
||||
- (void) controlTextDidChange: (NSNotification *) notification
|
||||
|
||||
Reference in New Issue
Block a user