Changeset 4276 for trunk/macosx/Controller.m
- Timestamp:
- Dec 22, 2007, 3:39:52 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/Controller.m
r4275 r4276 2330 2330 2331 2331 NSEnumerator * enumerator = [newNames objectEnumerator]; 2332 int c anAdd, count;2332 int count; 2333 2333 tr_ctor * ctor; 2334 2334 while ((file = [enumerator nextObject])) 2335 2335 { 2336 tr_ctor *ctor = tr_ctorNew(fLib);2336 ctor = tr_ctorNew(fLib); 2337 2337 tr_ctorSetMetainfoFromFile(ctor, [file UTF8String]); 2338 canAdd = tr_torrentParseFromCtor(fLib, ctor, NULL); 2338 2339 switch (tr_torrentParseFromCtor(fLib, ctor, NULL)) 2340 { 2341 case TR_OK: 2342 if (!ask) 2343 count = [fTorrents count]; 2344 [self openFiles: [NSArray arrayWithObject: file]]; 2345 2346 //check if torrent was opened 2347 if (!ask && [fTorrents count] > count) 2348 [GrowlApplicationBridge notifyWithTitle: NSLocalizedString(@"Torrent File Auto Added", 2349 "Growl notification title") description: [file lastPathComponent] 2350 notificationName: GROWL_AUTO_ADD iconData: nil priority: 0 isSticky: NO clickContext: nil]; 2351 break; 2352 2353 case TR_EINVALID: 2354 [fAutoImportedNames removeObject: [file lastPathComponent]]; 2355 } 2356 2339 2357 tr_ctorFree(ctor); 2340 2341 if (canAdd == TR_OK)2342 {2343 if (!ask)2344 count = [fTorrents count];2345 [self openFiles: [NSArray arrayWithObject: file]];2346 2347 //check if torrent was opened2348 if (!ask && [fTorrents count] > count)2349 [GrowlApplicationBridge notifyWithTitle: NSLocalizedString(@"Torrent File Auto Added",2350 "Growl notification title") description: [file lastPathComponent]2351 notificationName: GROWL_AUTO_ADD iconData: nil priority: 0 isSticky: NO clickContext: nil];2352 }2353 else if (canAdd == TR_EINVALID)2354 [fAutoImportedNames removeObject: [file lastPathComponent]];2355 else;2356 2358 } 2357 2359
Note: See TracChangeset
for help on using the changeset viewer.