source: trunk/aux/cocotron/win32/cocotron/cocotron-r59942ee67d15.patch @ 14237

Last change on this file since 14237 was 14237, checked in by palter, 11 years ago

Update to Cocotron r59942ee67d15

File size: 1.9 KB
  • AppKit/NSApplication.m

    diff -r 59942ee67d15 AppKit/NSApplication.m
    a b  
    418418       needsUntitled = [_delegate applicationShouldOpenUntitledFile: self];
    419419   }
    420420
     421   if(needsUntitled && _delegate && [_delegate respondsToSelector: @selector(applicationOpenUntitledFile:)]) {
     422     needsUntitled = ![_delegate applicationOpenUntitledFile: self];
     423   }
     424
    421425   if(needsUntitled && controller && ![controller documentClassForType:[controller defaultType]]) {
    422426       needsUntitled = NO;
    423427   }
     
    472476
    473477-(void)run {
    474478   
    475    NSAutoreleasePool *pool=[NSAutoreleasePool new];
    476    [self finishLaunching];
    477    [pool release];
    478    
    479    _isRunning=YES;
     479  static BOOL didlaunch = NO;
     480  NSAutoreleasePool *pool;
     481
     482  _isRunning=YES;
     483
     484  if (!didlaunch) {
     485    didlaunch = YES;
     486    pool=[NSAutoreleasePool new];
     487    [self finishLaunching];
     488    [pool release];
     489  }
    480490   
    481491   do {
    482492       pool = [NSAutoreleasePool new];
  • AppKit/NSDocument.m

    diff -r 59942ee67d15 AppKit/NSDocument.m
    a b  
    2121
    2222@implementation NSDocument
    2323
     24static int untitled_document_number = 0;
     25
    2426+(NSArray *)readableTypes {
    2527   int             i;
    2628   NSArray        *knownDocTypes = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleDocumentTypes"];
     
    98100      _fileURL=nil;
    99101      _fileType=nil;
    100102      _changeCount=0;
    101       _untitledNumber=0;
     103      _untitledNumber=untitled_document_number++;
    102104      _hasUndoManager=YES;
    103105      _activeEditors=[NSMutableArray new];
    104106    }
     
    340342{
    341343  if(_fileURL==nil)
    342344    {
    343       if(_untitledNumber > 1)
     345      if(_untitledNumber != 0)
    344346        return [NSString stringWithFormat:@"Untitled %d", _untitledNumber];
    345347      else
    346348        return @"Untitled";
Note: See TracBrowser for help on using the repository browser.