Changeset 828 for trunk/macosx
- Timestamp:
- Aug 22, 2006, 11:00:53 PM (16 years ago)
- Location:
- trunk/macosx
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/Controller.m
r807 r828 865 865 [panel setCanSelectHiddenExtension: YES]; 866 866 867 [panel beginSheetForDirectory: nil file: [torrent name] 868 modalForWindow: fWindow modalDelegate: self didEndSelector: 869 @selector(saveTorrentCopySheetClosed:returnCode:contextInfo:) contextInfo: torrents]; 870 } 871 } 872 873 - (void) saveTorrentCopySheetClosed: (NSSavePanel *) panel returnCode: (int) code 874 contextInfo: (NSMutableArray *) torrents 867 [panel beginSheetForDirectory: nil file: [torrent name] modalForWindow: fWindow modalDelegate: self 868 didEndSelector: @selector(saveTorrentCopySheetClosed:returnCode:contextInfo:) contextInfo: torrents]; 869 } 870 } 871 872 - (void) saveTorrentCopySheetClosed: (NSSavePanel *) panel returnCode: (int) code contextInfo: (NSMutableArray *) torrents 875 873 { 876 874 //if save successful, copy torrent to new location with name of data file … … 880 878 881 879 [torrents removeObjectAtIndex: 0]; 882 [self performSelectorOnMainThread: @selector(copyTorrentFileForTorrents:) 883 withObject: torrents waitUntilDone: NO]; 880 [self performSelectorOnMainThread: @selector(copyTorrentFileForTorrents:) withObject: torrents waitUntilDone: NO]; 884 881 } 885 882 -
trunk/macosx/English.lproj/MessageWindow.nib/classes.nib
r813 r828 3 3 {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 4 4 { 5 ACTIONS = {changeLevel = id; clearLog = id; };5 ACTIONS = {changeLevel = id; clearLog = id; writeToFile = id; }; 6 6 CLASS = MessageWindowController; 7 7 LANGUAGE = ObjC; -
trunk/macosx/MessageWindowController.h
r821 r828 41 41 - (void) clearLog: (id) sender; 42 42 43 - (void) writeToFile: (id) sender; 44 43 45 @end -
trunk/macosx/MessageWindowController.m
r824 r828 146 146 } 147 147 148 - (void) writeToFile: (id) sender 149 { 150 NSString * string = [[fTextView string] retain]; 151 152 NSSavePanel * panel = [NSSavePanel savePanel]; 153 [panel setRequiredFileType: @"txt"]; 154 [panel setCanSelectHiddenExtension: YES]; 155 156 [panel beginSheetForDirectory: nil file: @"untitled" modalForWindow: [self window] modalDelegate: self 157 didEndSelector: @selector(writeToFileSheetClosed:returnCode:contextInfo:) contextInfo: string]; 158 } 159 160 - (void) writeToFileSheetClosed: (NSSavePanel *) panel returnCode: (int) code contextInfo: (NSString *) string 161 { 162 if (code == NSOKButton) 163 [string writeToFile: [panel filename] atomically: YES encoding: NSUTF8StringEncoding error: nil]; 164 165 [string release]; 166 } 167 148 168 @end
Note: See TracChangeset
for help on using the changeset viewer.