mirror of https://github.com/python/cpython.git
Changed the input field for the interpreter to use (in the preferences
window) to a combobox listing the known interpreters.
This commit is contained in:
parent
9431e48d23
commit
f044e090c4
|
@ -23,6 +23,7 @@
|
||||||
@interface FileSettings : NSObject <FileSettingsSource>
|
@interface FileSettings : NSObject <FileSettingsSource>
|
||||||
{
|
{
|
||||||
NSString *interpreter; // The pathname of the interpreter to use
|
NSString *interpreter; // The pathname of the interpreter to use
|
||||||
|
NSArray *interpreters; // List of known interpreters
|
||||||
BOOL debug; // -d option: debug parser
|
BOOL debug; // -d option: debug parser
|
||||||
BOOL verbose; // -v option: verbose import
|
BOOL verbose; // -v option: verbose import
|
||||||
BOOL inspect; // -i option: interactive mode after script
|
BOOL inspect; // -i option: interactive mode after script
|
||||||
|
@ -54,5 +55,6 @@
|
||||||
//- (void)applyUserDefaults: (NSString *)filetype;
|
//- (void)applyUserDefaults: (NSString *)filetype;
|
||||||
- (void)applyValuesFromDict: (NSDictionary *)dict;
|
- (void)applyValuesFromDict: (NSDictionary *)dict;
|
||||||
- (void)reset;
|
- (void)reset;
|
||||||
|
- (NSArray *) interpreters;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -104,7 +104,6 @@
|
||||||
int i;
|
int i;
|
||||||
NSString *filename;
|
NSString *filename;
|
||||||
NSDictionary *dict;
|
NSDictionary *dict;
|
||||||
NSArray *interpreters;
|
|
||||||
static NSDictionary *factorySettings;
|
static NSDictionary *factorySettings;
|
||||||
|
|
||||||
self = [super init];
|
self = [super init];
|
||||||
|
@ -163,6 +162,7 @@
|
||||||
fsdefaults = [FileSettings getFactorySettingsForFileType: filetype];
|
fsdefaults = [FileSettings getFactorySettingsForFileType: filetype];
|
||||||
self = [self initWithFileSettings: fsdefaults];
|
self = [self initWithFileSettings: fsdefaults];
|
||||||
if (!self) return self;
|
if (!self) return self;
|
||||||
|
interpreters = [fsdefaults->interpreters retain];
|
||||||
[self applyUserDefaults: filetype];
|
[self applyUserDefaults: filetype];
|
||||||
prefskey = [filetype retain];
|
prefskey = [filetype retain];
|
||||||
return self;
|
return self;
|
||||||
|
@ -247,9 +247,11 @@
|
||||||
tabs?" -t":"",
|
tabs?" -t":"",
|
||||||
others,
|
others,
|
||||||
script,
|
script,
|
||||||
with_terminal? "&& exit" : " &"];
|
with_terminal? "&& echo Exit status: $? && exit 1" : " &"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSArray *) interpreters { return interpreters;};
|
||||||
|
|
||||||
// FileSettingsSource protocol
|
// FileSettingsSource protocol
|
||||||
- (NSString *) interpreter { return interpreter;};
|
- (NSString *) interpreter { return interpreter;};
|
||||||
- (BOOL) debug { return debug;};
|
- (BOOL) debug { return debug;};
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
IBClasses = (
|
IBClasses = (
|
||||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||||
{
|
{
|
||||||
ACTIONS = {do_apply = id; do_filetype = id; do_reset = id; };
|
ACTIONS = {"do_apply" = id; "do_filetype" = id; "do_reset" = id; };
|
||||||
CLASS = PreferencesWindowController;
|
CLASS = PreferencesWindowController;
|
||||||
LANGUAGE = ObjC;
|
LANGUAGE = ObjC;
|
||||||
OUTLETS = {
|
OUTLETS = {
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
others = NSTextField;
|
others = NSTextField;
|
||||||
tabs = NSButton;
|
tabs = NSButton;
|
||||||
verbose = NSButton;
|
verbose = NSButton;
|
||||||
with_terminal = NSButton;
|
"with_terminal" = NSButton;
|
||||||
};
|
};
|
||||||
SUPERCLASS = NSWindowController;
|
SUPERCLASS = NSWindowController;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="0.9">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>IBDocumentLocation</key>
|
<key>IBDocumentLocation</key>
|
||||||
<string>237 -80 356 240 0 0 1280 938 </string>
|
<string>126 59 356 240 0 0 1024 746 </string>
|
||||||
<key>IBFramework Version</key>
|
<key>IBFramework Version</key>
|
||||||
<string>263.2</string>
|
<string>291.0</string>
|
||||||
<key>IBOpenObjects</key>
|
<key>IBOpenObjects</key>
|
||||||
<array>
|
<array>
|
||||||
<integer>5</integer>
|
<integer>5</integer>
|
||||||
</array>
|
</array>
|
||||||
<key>IBSystem Version</key>
|
<key>IBSystem Version</key>
|
||||||
<string>5S66</string>
|
<string>6G30</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|
Binary file not shown.
|
@ -29,4 +29,9 @@
|
||||||
|
|
||||||
- (void)controlTextDidChange:(NSNotification *)aNotification;
|
- (void)controlTextDidChange:(NSNotification *)aNotification;
|
||||||
|
|
||||||
|
- (unsigned int)comboBox:(NSComboBox *)aComboBox indexOfItemWithStringValue:(NSString *)aString;
|
||||||
|
- (id)comboBox:(NSComboBox *)aComboBox objectValueForItemAtIndex:(int)index;
|
||||||
|
- (int)numberOfItemsInComboBox:(NSComboBox *)aComboBox;
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -90,5 +90,21 @@
|
||||||
[self update_display];
|
[self update_display];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// NSComboBoxDataSource protocol
|
||||||
|
- (unsigned int)comboBox:(NSComboBox *)aComboBox indexOfItemWithStringValue:(NSString *)aString
|
||||||
|
{
|
||||||
|
return [[settings interpreters] indexOfObjectIdenticalTo: aString];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (id)comboBox:(NSComboBox *)aComboBox objectValueForItemAtIndex:(int)index
|
||||||
|
{
|
||||||
|
return [[settings interpreters] objectAtIndex: index];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (int)numberOfItemsInComboBox:(NSComboBox *)aComboBox
|
||||||
|
{
|
||||||
|
return [[settings interpreters] count];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -132,6 +132,7 @@
|
||||||
4A9504D0FFE6A4CB11CA0CBA,
|
4A9504D0FFE6A4CB11CA0CBA,
|
||||||
4A9504D1FFE6A4CB11CA0CBA,
|
4A9504D1FFE6A4CB11CA0CBA,
|
||||||
);
|
);
|
||||||
|
hasScannedForEncodings = 1;
|
||||||
isa = PBXProject;
|
isa = PBXProject;
|
||||||
mainGroup = 2A37F4AAFDCFA73011CA2CEA;
|
mainGroup = 2A37F4AAFDCFA73011CA2CEA;
|
||||||
projectDirPath = "";
|
projectDirPath = "";
|
||||||
|
@ -169,11 +170,13 @@
|
||||||
refType = 4;
|
refType = 4;
|
||||||
};
|
};
|
||||||
2A37F4ACFDCFA73011CA2CEA = {
|
2A37F4ACFDCFA73011CA2CEA = {
|
||||||
|
fileEncoding = 30;
|
||||||
isa = PBXFileReference;
|
isa = PBXFileReference;
|
||||||
path = MyDocument.m;
|
path = MyDocument.m;
|
||||||
refType = 4;
|
refType = 4;
|
||||||
};
|
};
|
||||||
2A37F4AEFDCFA73011CA2CEA = {
|
2A37F4AEFDCFA73011CA2CEA = {
|
||||||
|
fileEncoding = 30;
|
||||||
isa = PBXFileReference;
|
isa = PBXFileReference;
|
||||||
path = MyDocument.h;
|
path = MyDocument.h;
|
||||||
refType = 4;
|
refType = 4;
|
||||||
|
@ -190,6 +193,7 @@
|
||||||
refType = 4;
|
refType = 4;
|
||||||
};
|
};
|
||||||
2A37F4B0FDCFA73011CA2CEA = {
|
2A37F4B0FDCFA73011CA2CEA = {
|
||||||
|
fileEncoding = 30;
|
||||||
isa = PBXFileReference;
|
isa = PBXFileReference;
|
||||||
path = main.m;
|
path = main.m;
|
||||||
refType = 4;
|
refType = 4;
|
||||||
|
@ -400,7 +404,6 @@
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
";
|
";
|
||||||
shouldUseHeadermap = 1;
|
|
||||||
};
|
};
|
||||||
2A37F4C7FDCFA73011CA2CEA = {
|
2A37F4C7FDCFA73011CA2CEA = {
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
|
@ -515,11 +518,13 @@
|
||||||
//F53
|
//F53
|
||||||
//F54
|
//F54
|
||||||
F52A90CD02EB5C6A01000102 = {
|
F52A90CD02EB5C6A01000102 = {
|
||||||
|
fileEncoding = 30;
|
||||||
isa = PBXFileReference;
|
isa = PBXFileReference;
|
||||||
path = FileSettings.m;
|
path = FileSettings.m;
|
||||||
refType = 4;
|
refType = 4;
|
||||||
};
|
};
|
||||||
F52A90CE02EB5C6A01000102 = {
|
F52A90CE02EB5C6A01000102 = {
|
||||||
|
fileEncoding = 30;
|
||||||
isa = PBXFileReference;
|
isa = PBXFileReference;
|
||||||
path = FileSettings.h;
|
path = FileSettings.h;
|
||||||
refType = 4;
|
refType = 4;
|
||||||
|
@ -581,6 +586,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
F5A42167038BDD8E0110C447 = {
|
F5A42167038BDD8E0110C447 = {
|
||||||
|
fileEncoding = 30;
|
||||||
isa = PBXFileReference;
|
isa = PBXFileReference;
|
||||||
path = factorySettings.plist;
|
path = factorySettings.plist;
|
||||||
refType = 4;
|
refType = 4;
|
||||||
|
@ -603,11 +609,13 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
F5A4C14002F2055C01000102 = {
|
F5A4C14002F2055C01000102 = {
|
||||||
|
fileEncoding = 30;
|
||||||
isa = PBXFileReference;
|
isa = PBXFileReference;
|
||||||
path = PreferencesWindowController.h;
|
path = PreferencesWindowController.h;
|
||||||
refType = 4;
|
refType = 4;
|
||||||
};
|
};
|
||||||
F5A4C14102F2055C01000102 = {
|
F5A4C14102F2055C01000102 = {
|
||||||
|
fileEncoding = 30;
|
||||||
isa = PBXFileReference;
|
isa = PBXFileReference;
|
||||||
path = PreferencesWindowController.m;
|
path = PreferencesWindowController.m;
|
||||||
refType = 4;
|
refType = 4;
|
||||||
|
@ -625,11 +633,13 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
F5A4C14402F2070D01000102 = {
|
F5A4C14402F2070D01000102 = {
|
||||||
|
fileEncoding = 30;
|
||||||
isa = PBXFileReference;
|
isa = PBXFileReference;
|
||||||
path = MyAppDelegate.m;
|
path = MyAppDelegate.m;
|
||||||
refType = 4;
|
refType = 4;
|
||||||
};
|
};
|
||||||
F5A4C14502F2070D01000102 = {
|
F5A4C14502F2070D01000102 = {
|
||||||
|
fileEncoding = 30;
|
||||||
isa = PBXFileReference;
|
isa = PBXFileReference;
|
||||||
path = MyAppDelegate.h;
|
path = MyAppDelegate.h;
|
||||||
refType = 4;
|
refType = 4;
|
||||||
|
@ -647,6 +657,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
F5AA9C6A02F8042D0110C447 = {
|
F5AA9C6A02F8042D0110C447 = {
|
||||||
|
fileEncoding = 30;
|
||||||
isa = PBXFileReference;
|
isa = PBXFileReference;
|
||||||
path = doscript.h;
|
path = doscript.h;
|
||||||
refType = 4;
|
refType = 4;
|
||||||
|
@ -670,6 +681,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
F5AAA21D02F8115D0110C447 = {
|
F5AAA21D02F8115D0110C447 = {
|
||||||
|
fileEncoding = 30;
|
||||||
isa = PBXFileReference;
|
isa = PBXFileReference;
|
||||||
path = doscript.m;
|
path = doscript.m;
|
||||||
refType = 4;
|
refType = 4;
|
||||||
|
|
|
@ -39,6 +39,11 @@
|
||||||
<string>/sw/bin/python</string>
|
<string>/sw/bin/python</string>
|
||||||
<string>/Library/Frameworks/Python.framework/Versions/Current/bin/python</string>
|
<string>/Library/Frameworks/Python.framework/Versions/Current/bin/python</string>
|
||||||
<string>/usr/bin/python</string>
|
<string>/usr/bin/python</string>
|
||||||
|
<string>/usr/local/bin/pythonw</string>
|
||||||
|
<string>/sw/bin/pythonw</string>
|
||||||
|
<string>/Library/Frameworks/Python.framework/Versions/Current/Resources/Python.app/Contents/MacOS/python</string>
|
||||||
|
<string>/usr/bin/pythonw</string>
|
||||||
|
<string>/Applications/MacPython-OSX/python-additions/Python.app/Contents/MacOS/python</string>
|
||||||
</array>
|
</array>
|
||||||
<key>nosite</key>
|
<key>nosite</key>
|
||||||
<false/>
|
<false/>
|
||||||
|
|
Loading…
Reference in New Issue