source: trunk/aux/cocotron/win32/cocotron/cocotron-r773.patch @ 13482

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

Update to Cocotron r773 which seems to fix the window closing bug\!

File size: 11.6 KB
  • AppKit/NSApplication.m

     
    2929#import <AppKit/CGWindow.h>
    3030#import <AppKit/NSRaise.h>
    3131#import <objc/message.h>
     32#import <AppKit/NSWindow.h>
    3233
    3334NSString * const NSModalPanelRunLoopMode=@"NSModalPanelRunLoopMode";
    3435NSString * const NSEventTrackingRunLoopMode=@"NSEventTrackingRunLoopMode";
     
    413414       needsUntitled = [_delegate applicationShouldOpenUntitledFile: self];
    414415   }
    415416
     417   if(needsUntitled && _delegate && [_delegate respondsToSelector: @selector(applicationOpenUntitledFile:)]) {
     418     needsUntitled = ![_delegate applicationOpenUntitledFile: self];
     419   }
     420                                                 
     421
    416422   if(needsUntitled && controller && ![controller documentClassForType:[controller defaultType]]) {
    417423       needsUntitled = NO;
    418424   }
     
    466472}
    467473
    468474-(void)run {
    469    
    470    NSAutoreleasePool *pool=[NSAutoreleasePool new];
    471    [self finishLaunching];
    472    [pool release];
     475  static BOOL didlaunch = NO;
     476  NSAutoreleasePool *pool;
     477
     478  _isRunning=YES;
     479
     480  if (!didlaunch) {
     481    didlaunch = YES;
     482    pool=[NSAutoreleasePool new];
     483    [self finishLaunching];
     484    [pool release];
     485  }
    473486   
    474    _isRunning=YES;
    475487   
    476488   do {
    477489       pool = [NSAutoreleasePool new];
  • AppKit/AppKit.xcodeproj/project.pbxproj

    Cannot display: file marked as a binary type.
    svn:mime-type = application/octet-stream
    
    Property changes on: AppKit/NSImageNameGoLeftTemplate.pdf
    ___________________________________________________________________
    Added: svn:mime-type
       + application/octet-stream
    
     
    2727                A1CC70491005371100DB9974 /* NSTextFieldBinder.m in Sources */ = {isa = PBXBuildFile; fileRef = A1CC70411005371100DB9974 /* NSTextFieldBinder.m */; };
    2828                C81BEA0F0EA6038800478D50 /* O2Context_cairo.h in Headers */ = {isa = PBXBuildFile; fileRef = C81BEA0D0EA6038800478D50 /* O2Context_cairo.h */; settings = {ATTRIBUTES = (Private, ); }; };
    2929                C81BEA100EA6038800478D50 /* O2Context_cairo.m in Sources */ = {isa = PBXBuildFile; fileRef = C81BEA0E0EA6038800478D50 /* O2Context_cairo.m */; };
     30                C829A6A310FF911400A2306E /* NSImageNameGoLeftTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = C829A6A210FF911400A2306E /* NSImageNameGoLeftTemplate.pdf */; };
     31                C829A6A410FF911F00A2306E /* NSImageNameGoLeftTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = C829A6A210FF911400A2306E /* NSImageNameGoLeftTemplate.pdf */; };
     32                C829A6A510FF912000A2306E /* NSImageNameGoLeftTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = C829A6A210FF911400A2306E /* NSImageNameGoLeftTemplate.pdf */; };
     33                C829A6A610FF912100A2306E /* NSImageNameGoLeftTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = C829A6A210FF911400A2306E /* NSImageNameGoLeftTemplate.pdf */; };
     34                C829A6A710FF912200A2306E /* NSImageNameGoLeftTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = C829A6A210FF911400A2306E /* NSImageNameGoLeftTemplate.pdf */; };
     35                C829A6B310FFA2D100A2306E /* NSImageNameGoRightTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = C829A6B210FFA2D100A2306E /* NSImageNameGoRightTemplate.pdf */; };
    3036                C84909370E8D1FB900BA6D3A /* NSUserDefaultsControllerProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = C84909350E8D1FB900BA6D3A /* NSUserDefaultsControllerProxy.h */; settings = {ATTRIBUTES = (Private, ); }; };
    3137                C84909380E8D1FB900BA6D3A /* NSUserDefaultsControllerProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = C84909360E8D1FB900BA6D3A /* NSUserDefaultsControllerProxy.m */; };
    3238                C85D91950EE6A806004EBAEA /* NSDictionaryController.h in Headers */ = {isa = PBXBuildFile; fileRef = C85D91930EE6A806004EBAEA /* NSDictionaryController.h */; settings = {ATTRIBUTES = (Public, ); }; };
     
    44144420                A1CC70411005371100DB9974 /* NSTextFieldBinder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSTextFieldBinder.m; sourceTree = "<group>"; };
    44154421                C81BEA0D0EA6038800478D50 /* O2Context_cairo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = O2Context_cairo.h; sourceTree = "<group>"; };
    44164422                C81BEA0E0EA6038800478D50 /* O2Context_cairo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = O2Context_cairo.m; sourceTree = "<group>"; };
     4423                C829A6A210FF911400A2306E /* NSImageNameGoLeftTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = NSImageNameGoLeftTemplate.pdf; sourceTree = "<group>"; };
     4424                C829A6B210FFA2D100A2306E /* NSImageNameGoRightTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = NSImageNameGoRightTemplate.pdf; sourceTree = "<group>"; };
    44174425                C84909350E8D1FB900BA6D3A /* NSUserDefaultsControllerProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSUserDefaultsControllerProxy.h; sourceTree = "<group>"; };
    44184426                C84909360E8D1FB900BA6D3A /* NSUserDefaultsControllerProxy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSUserDefaultsControllerProxy.m; sourceTree = "<group>"; };
    44194427                C85D91930EE6A806004EBAEA /* NSDictionaryController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSDictionaryController.h; sourceTree = "<group>"; };
     
    51985206                6E2B54E60976075300DA0954 /* Images */ = {
    51995207                        isa = PBXGroup;
    52005208                        children = (
     5209                                C829A6B210FFA2D100A2306E /* NSImageNameGoRightTemplate.pdf */,
     5210                                C829A6A210FF911400A2306E /* NSImageNameGoLeftTemplate.pdf */,
    52015211                                FEED24790EC9E8F200A5B07E /* NSImageNameRefreshTemplate.pdf */,
    52025212                                FE86887C0BC3FFA4009F515C /* NSButtonCell_disclosure_highlighted.tif */,
    52035213                                FE86887D0BC3FFA4009F515C /* NSButtonCell_disclosure_normal.tif */,
     
    82108220                                C88977040EA0BF3100D0A0A2 /* NSSystemInfoPanel.nib in Resources */,
    82118221                                FEED247B0EC9E8F200A5B07E /* NSImageNameRefreshTemplate.pdf in Resources */,
    82128222                                FEE36B810F4B20C6005AEBBF /* NSToolbarOverflowArrow.pdf in Resources */,
     8223                                C829A6A410FF911F00A2306E /* NSImageNameGoLeftTemplate.pdf in Resources */,
    82138224                        );
    82148225                        runOnlyForDeploymentPostprocessing = 0;
    82158226                };
     
    82598270                                C8A2E56A0F07EA1F0054397C /* NSSystemInfoPanel.nib in Resources */,
    82608271                                C8A2E56B0F07EA1F0054397C /* NSImageNameRefreshTemplate.pdf in Resources */,
    82618272                                FEE36B820F4B20C6005AEBBF /* NSToolbarOverflowArrow.pdf in Resources */,
     8273                                C829A6A510FF912000A2306E /* NSImageNameGoLeftTemplate.pdf in Resources */,
    82628274                        );
    82638275                        runOnlyForDeploymentPostprocessing = 0;
    82648276                };
     
    83088320                                FE8286820D34727900F7489F /* NSSystemInfoPanel.nib in Resources */,
    83098321                                FEED247A0EC9E8F200A5B07E /* NSImageNameRefreshTemplate.pdf in Resources */,
    83108322                                FEE36B800F4B20C6005AEBBF /* NSToolbarOverflowArrow.pdf in Resources */,
     8323                                C829A6A310FF911400A2306E /* NSImageNameGoLeftTemplate.pdf in Resources */,
     8324                                C829A6B310FFA2D100A2306E /* NSImageNameGoRightTemplate.pdf in Resources */,
    83118325                        );
    83128326                        runOnlyForDeploymentPostprocessing = 0;
    83138327                };
     
    83578371                                FE5A8BD910C6F50E005E348A /* NSSystemInfoPanel.nib in Resources */,
    83588372                                FE5A8BDA10C6F50E005E348A /* NSImageNameRefreshTemplate.pdf in Resources */,
    83598373                                FE5A8BDB10C6F50E005E348A /* NSToolbarOverflowArrow.pdf in Resources */,
     8374                                C829A6A710FF912200A2306E /* NSImageNameGoLeftTemplate.pdf in Resources */,
    83608375                        );
    83618376                        runOnlyForDeploymentPostprocessing = 0;
    83628377                };
     
    84068421                                FEA316430FD5667D00F480D4 /* NSSystemInfoPanel.nib in Resources */,
    84078422                                FEA316440FD5667D00F480D4 /* NSImageNameRefreshTemplate.pdf in Resources */,
    84088423                                FEA316450FD5667D00F480D4 /* NSToolbarOverflowArrow.pdf in Resources */,
     8424                                C829A6A610FF912100A2306E /* NSImageNameGoLeftTemplate.pdf in Resources */,
    84098425                        );
    84108426                        runOnlyForDeploymentPostprocessing = 0;
    84118427                };
  • AppKit/nib.subproj/NSCustomResource.m

     
    3737   if([_className isEqualToString:@"NSImage"]){
    3838    NSImage *image;
    3939   
    40     if([_resourceName isEqualToString:@"NSRefreshTemplate"]){
     40    if([_resourceName isEqualToString:@"NSGoLeftTemplate"]){
     41     image=[NSImage imageNamed:@"NSImageNameGoLeftTemplate"];
     42     [image setSize:NSMakeSize(12,12)];
     43    }
     44    else if([_resourceName isEqualToString:@"NSGoRightTemplate"]){
     45     image=[NSImage imageNamed:@"NSImageNameGoRightTemplate"];
     46     [image setSize:NSMakeSize(12,12)];
     47    }
     48    else if([_resourceName isEqualToString:@"NSRefreshTemplate"]){
    4149     image=[NSImage imageNamed:@"NSImageNameRefreshTemplate"];
    4250     [image setSize:NSMakeSize(12,12)];
    4351    }
  • AppKit/NSToolbar.subproj/NSToolbarView.m

     
    237237
    238238
    239239-(void)drawRect:(NSRect)rect {
     240   //fix problem where the background of the toolbar would be partly black
     241   [[NSColor controlColor] setFill];
     242   NSRectFill(rect);
     243
    240244   if(_overflow){
    241245    NSSize imageSize=[[self overflowImage] size];
    242246    NSRect rect=[self overflowRect];
  • AppKit/NSToolbar.subproj/NSToolbarItem.m

     
    504504     imageRect.origin.y=bounds.origin.y+labelHeight;
    505505     imageRect.origin.x=bounds.origin.x+floor((bounds.size.width-imageRect.size.width)/2);
    506506     [image drawInRect:imageRect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:highlighted?0.5:1.0];
    507     }       
     507    }
     508    //Erlend: add support for non-images (NSButton, NSSegmentedControl)
     509    else {
     510     NSRect viewRect;
     511     viewRect.origin.y=bounds.origin.y+labelHeight;
     512     viewRect.origin.x=bounds.origin.x;
     513       
     514     viewRect.size.width = bounds.size.width;
     515     viewRect.size.height = bounds.size.height - labelHeight;
     516       
     517     [[self view] setFrame: viewRect];
     518    }       
    508519   }
    509520   
    510521}
  • AppKit/NSDocument.m

    Cannot display: file marked as a binary type.
    svn:mime-type = application/octet-stream
    
    Property changes on: AppKit/NSImageNameGoRightTemplate.pdf
    ___________________________________________________________________
    Added: svn:mime-type
       + application/octet-stream
    
     
    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.