Changeset 2102
- Timestamp:
- Jun 16, 2007, 9:21:43 PM (15 years ago)
- Location:
- branches/file_selection/macosx
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/file_selection/macosx/CreatorWindowController.h
r2100 r2102 30 30 IBOutlet NSImageView * fIcon, * fLocationIcon; 31 31 IBOutlet NSTextField * fNameField, * fStatusField, * fPiecesField, * fLocationField, 32 * fTrackerField ;32 * fTrackerField, * fTorrentNameField; 33 33 IBOutlet NSTextView * fCommentView; 34 34 IBOutlet NSButton * fPrivateCheck; -
branches/file_selection/macosx/CreatorWindowController.m
r2100 r2102 92 92 [fLocationField setStringValue: [fLocation stringByAbbreviatingWithTildeInPath]]; 93 93 [fLocationField setToolTip: fLocation]; 94 95 [fTorrentNameField setStringValue: [name stringByAppendingPathExtension: @"torrent"]]; 94 96 } 95 97 … … 132 134 [alert setMessageText: NSLocalizedString(@"Tracker address must begin with \"http://\".", 133 135 "Create torrent -> http warning -> title")]; 134 [alert setInformativeText: NSLocalizedString(@" Please change the tracker address to create the torrent.",136 [alert setInformativeText: NSLocalizedString(@"Change the tracker address to create the torrent.", 135 137 "Create torrent -> http warning -> warning")]; 136 138 [alert setAlertStyle: NSWarningAlertStyle]; … … 144 146 trackerString = [@"http://" stringByAppendingString: trackerString]; 145 147 146 #warning make user-settable 147 NSString * file = [fLocation stringByAppendingPathComponent: 148 [[fPath lastPathComponent] stringByAppendingPathExtension: @"torrent"]]; 149 150 tr_makeMetaInfo(fInfo, [file UTF8String], [trackerString UTF8String], [[fCommentView string] UTF8String], 151 [fPrivateCheck state] == NSOnState); 148 NSString * torrentName = [fTorrentNameField stringValue]; 149 if ([[torrentName pathExtension] caseInsensitiveCompare: @"torrent"] != NSOrderedSame) 150 { 151 NSAlert * alert = [[[NSAlert alloc] init] autorelease]; 152 [alert addButtonWithTitle: NSLocalizedString(@"OK", "Create torrent -> .torrent warning -> button")]; 153 [alert setMessageText: NSLocalizedString(@"Torrents must end in \".torrent\".", 154 "Create torrent -> .torrent warning -> title")]; 155 [alert setInformativeText: NSLocalizedString(@"Add this file extension to create the torrent.", 156 "Create torrent -> .torrent warning -> warning")]; 157 [alert setAlertStyle: NSWarningAlertStyle]; 158 159 [alert beginSheetModalForWindow: [self window] modalDelegate: self didEndSelector: nil contextInfo: nil]; 160 161 return; 162 } 163 164 tr_makeMetaInfo(fInfo, [[fLocation stringByAppendingPathComponent: torrentName] UTF8String], [trackerString UTF8String], 165 [[fCommentView string] UTF8String], [fPrivateCheck state] == NSOnState); 152 166 153 167 #warning add to T
Note: See TracChangeset
for help on using the changeset viewer.