source: trunk/aux/cocotron/win32/cocotron/cocotron-r633.patch @ 12833

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

Update to r633 of Cocotron which fixes the resizing bug

File size: 3.7 KB
  • Foundation/NSUserDefaults/NSUserDefaults.m

     
    341341}
    342342
    343343-(void)setInteger:(NSInteger)value forKey:(NSString *)defaultName {
    344    [self setObject:[NSNumber numberWithInteger:value] forKey:defaultName];
     344  [self setObject:[NSString stringWithFormat: @"%d",value] forKey:defaultName];
    345345}
    346346
    347347-(void)setFloat:(float)value forKey:(NSString *)defaultName {
    348    [self setObject:[NSNumber numberWithFloat:value] forKey:defaultName];
     348  [self setObject:[NSString stringWithFormat: @"%f",value] forKey:defaultName];
    349349}
    350350
    351351-(void)removeObjectForKey:(NSString *)key {
  • AppKit/NSApplication.h

     
    99#import <AppKit/NSResponder.h>
    1010#import <AppKit/AppKitExport.h>
    1111#import <AppKit/NSGraphics.h>
     12#import <AppKit/NSWindow.h>
    1213
    13 @class NSWindow,NSImage,NSMenu, NSPasteboard, NSDisplay;
     14@class NSWindow,NSImage,NSMenu, NSPasteboard, NSDisplay, NSWindowController, NSDocument;
    1415
    1516APPKIT_EXPORT NSString *NSModalPanelRunLoopMode;
    1617APPKIT_EXPORT NSString *NSEventTrackingRunLoopMode;
     
    209210@end
    210211
    211212@interface NSObject(NSApplication_serviceRequest)
     213
    212214-(BOOL)writeSelectionToPasteboard:(NSPasteboard *)pasteboard types:(NSArray *)types;
    213215@end
    214216
  • 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 *NSModalPanelRunLoopMode=@"NSModalPanelRunLoopMode";
    3435NSString *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/NSDocument.m

     
    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    }
     
    344346{
    345347  if(_fileURL==nil)
    346348    {
    347       if(_untitledNumber > 1)
     349      if(_untitledNumber != 0)
    348350        return [NSString stringWithFormat:@"Untitled %d", _untitledNumber];
    349351      else
    350352        return @"Untitled";
Note: See TracBrowser for help on using the repository browser.