1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-03 10:15:45 +00:00

don't autoimport created torrents

This commit is contained in:
Mitchell Livingston 2007-07-05 01:44:01 +00:00
parent af6a17cd57
commit 8075c388c2
4 changed files with 21 additions and 1 deletions

2
NEWS
View file

@ -11,7 +11,7 @@ NEWS file for Transmission <http://transmission.m0k.org/>
- OS X:
+ Overlay when dragging torrent files, URLs, and data files onto window
+ Ability to set an amount of time to consider a transfer stalled
+ Progress bar displays more information
+ More progress bar colors
+ Various smaller interface improvements
- GTK:
+ Interface significantly reworked to closer match the Mac version

View file

@ -199,6 +199,8 @@
- (void) changeAutoImport;
- (void) checkAutoImportDirectory;
- (void) beginCreateFile: (NSNotification *) notification;
- (void) sleepCallBack: (natural_t) messageType argument: (void *) messageArgument;
- (void) toggleSmallView: (id) sender;

View file

@ -421,6 +421,10 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
[nc addObserver: self selector: @selector(updateDockBadge:)
name: @"DockBadgeChange" object: nil];
//open newly created torrent file
[nc addObserver: self selector: @selector(beginCreateFile:)
name: @"BeginCreateTorrentFile" object: nil];
//open newly created torrent file
[nc addObserver: self selector: @selector(openCreatedFile:)
name: @"OpenCreatedTorrentFile" object: nil];
@ -2086,6 +2090,19 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
[newNames release];
}
- (void) beginCreateFile: (NSNotification *) notification
{
if (![fDefaults boolForKey: @"AutoImport"])
return;
NSString * location = [notification object],
* path = [fDefaults stringForKey: @"AutoImportDirectory"];
if (location && path && [[[location stringByDeletingLastPathComponent] stringByExpandingTildeInPath]
isEqualToString: [path stringByExpandingTildeInPath]])
[fAutoImportedNames addObject: [location lastPathComponent]];
}
- (int) numberOfRowsInTableView: (NSTableView *) tableview
{
return [fDisplayedTorrents count];

View file

@ -233,6 +233,7 @@
[fDefaults setBool: fOpenTorrent forKey: @"CreatorOpen"];
[fDefaults setObject: [fLocation stringByDeletingLastPathComponent] forKey: @"CreatorLocation"];
[[NSNotificationCenter defaultCenter] postNotificationName: @"BeginCreateTorrentFile" object: fLocation userInfo: nil];
tr_makeMetaInfo(fInfo, [fLocation UTF8String], [trackerString UTF8String], [[fCommentView string] UTF8String],
[fPrivateCheck state] == NSOnState);