source: trunk/aux/cocotron/win32/cocotron/cocotron-r1717c90b4d27.patch @ 14419

Last change on this file since 14419 was 14419, checked in by palter, 10 years ago

Update to Cocotron r1717c90b4d27.

File size: 1.9 KB
  • AppKit/NSApplication.m

    diff -r 1717c90b4d27 AppKit/NSApplication.m
    a b  
    415415       needsUntitled = [_delegate applicationShouldOpenUntitledFile: self];
    416416   }
    417417
     418   if(needsUntitled && _delegate && [_delegate respondsToSelector: @selector(applicationOpenUntitledFile:)]) {
     419     needsUntitled = ![_delegate applicationOpenUntitledFile: self];
     420   }
     421
    418422   if(needsUntitled && controller && ![controller documentClassForType:[controller defaultType]]) {
    419423       needsUntitled = NO;
    420424   }
     
    477481
    478482-(void)run {
    479483   
    480    NSAutoreleasePool *pool=[NSAutoreleasePool new];
    481    [self finishLaunching];
    482    [pool release];
    483    
    484    _isRunning=YES;
     484  static BOOL didlaunch = NO;
     485  NSAutoreleasePool *pool;
     486
     487  _isRunning=YES;
     488
     489  if (!didlaunch) {
     490    didlaunch = YES;
     491    pool=[NSAutoreleasePool new];
     492    [self finishLaunching];
     493    [pool release];
     494  }
    485495   
    486496   do {
    487497       pool = [NSAutoreleasePool new];
  • AppKit/NSDocument.m

    diff -r 1717c90b4d27 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.