Changeset 2295


Ignore:
Timestamp:
Jul 5, 2007, 1:44:01 AM (15 years ago)
Author:
livings124
Message:

don't autoimport created torrents

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEWS

    r2294 r2295  
    1212   + Overlay when dragging torrent files, URLs, and data files onto window
    1313   + Ability to set an amount of time to consider a transfer stalled
    14    + Progress bar displays more information
     14   + More progress bar colors
    1515   + Various smaller interface improvements
    1616 - GTK:
  • trunk/macosx/Controller.h

    r2270 r2295  
    200200- (void) checkAutoImportDirectory;
    201201
     202- (void) beginCreateFile: (NSNotification *) notification;
     203
    202204- (void) sleepCallBack: (natural_t) messageType argument: (void *) messageArgument;
    203205
  • trunk/macosx/Controller.m

    r2284 r2295  
    421421    [nc addObserver: self selector: @selector(updateDockBadge:)
    422422                    name: @"DockBadgeChange" object: nil];
     423   
     424    //open newly created torrent file
     425    [nc addObserver: self selector: @selector(beginCreateFile:)
     426                    name: @"BeginCreateTorrentFile" object: nil];
    423427   
    424428    //open newly created torrent file
     
    20872091}
    20882092
     2093- (void) beginCreateFile: (NSNotification *) notification
     2094{
     2095    if (![fDefaults boolForKey: @"AutoImport"])
     2096        return;
     2097   
     2098    NSString * location = [notification object],
     2099            * path = [fDefaults stringForKey: @"AutoImportDirectory"];
     2100   
     2101    if (location && path && [[[location stringByDeletingLastPathComponent] stringByExpandingTildeInPath]
     2102                                    isEqualToString: [path stringByExpandingTildeInPath]])
     2103        [fAutoImportedNames addObject: [location lastPathComponent]];
     2104}
     2105
    20892106- (int) numberOfRowsInTableView: (NSTableView *) tableview
    20902107{
  • trunk/macosx/CreatorWindowController.m

    r2266 r2295  
    234234    [fDefaults setObject: [fLocation stringByDeletingLastPathComponent] forKey: @"CreatorLocation"];
    235235   
     236    [[NSNotificationCenter defaultCenter] postNotificationName: @"BeginCreateTorrentFile" object: fLocation userInfo: nil];
    236237    tr_makeMetaInfo(fInfo, [fLocation UTF8String], [trackerString UTF8String], [[fCommentView string] UTF8String],
    237238                    [fPrivateCheck state] == NSOnState);
Note: See TracChangeset for help on using the changeset viewer.