Ignore:
Timestamp:
Mar 19, 2014, 11:31:01 PM (11 years ago)
Author:
dmik
Message:

python: Merge vendor 2.7.6 to trunk.

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk

  • python/trunk/Mac/PythonLauncher/MyDocument.m

    r2 r391  
    1717    self = [super init];
    1818    if (self) {
    19    
     19
    2020        // Add your subclass-specific initialization here.
    2121        // If an error occurs here, send a [self dealloc] message and return nil.
     
    3838    NSApplication *app = [NSApplication sharedApplication];
    3939    [super close];
    40     if ([[app delegate] shouldTerminate])
     40    if ([(MyAppDelegate*)[app delegate] shouldTerminate])
    4141        [app terminate: self];
    4242}
     
    4444- (void)load_defaults
    4545{
    46 //    if (settings) [settings release];
    4746    settings = [FileSettings newSettingsForFileType: filetype];
    4847}
     
    5049- (void)update_display
    5150{
    52 //    [[self window] setTitle: script];
    53    
    5451    [interpreter setStringValue: [settings interpreter]];
    5552    [honourhashbang setState: [settings honourhashbang]];
     
    6360    [scriptargs setStringValue: [settings scriptargs]];
    6461    [with_terminal setState: [settings with_terminal]];
    65    
     62
    6663    [commandline setStringValue: [settings commandLineForScript: script]];
    6764}
     
    7673    const char *cmdline;
    7774    int sts;
    78    
    79      cmdline = [[settings commandLineForScript: script] cString];
     75
     76     cmdline = [[settings commandLineForScript: script] UTF8String];
    8077   if ([settings with_terminal]) {
    8178        sts = doscript(cmdline);
     
    108105    // Insert code here to read your document from the given data.  You can also choose to override -loadFileWrapperRepresentation:ofType: or -readFromFile:ofType: instead.
    109106    BOOL show_ui;
    110    
    111     // ask the app delegate whether we should show the UI or not. 
    112     show_ui = [[[NSApplication sharedApplication] delegate] shouldShowUI];
     107
     108    // ask the app delegate whether we should show the UI or not.
     109    show_ui = [(MyAppDelegate*)[[NSApplication sharedApplication] delegate] shouldShowUI];
    113110    [script release];
    114111    script = [fileName retain];
    115112    [filetype release];
    116113    filetype = [type retain];
    117 //    if (settings) [settings release];
    118114    settings = [FileSettings newSettingsForFileType: filetype];
    119115    if (show_ui) {
     
    153149}
    154150
    155 // FileSettingsSource protocol 
     151// FileSettingsSource protocol
    156152- (NSString *) interpreter { return [interpreter stringValue];};
    157153- (BOOL) honourhashbang { return [honourhashbang state];};
Note: See TracChangeset for help on using the changeset viewer.