summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2004-07-16 12:36:02 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2004-07-16 12:36:02 (GMT)
commit122f87fa040688ee9e7092797edab901e48fc26a (patch)
tree2e4b7802f0d523fc4e01338247de3850db301141
parent6e3b425f3f8f5716fcd13dc0a236bd96a1ea000f (diff)
downloadcpython-122f87fa040688ee9e7092797edab901e48fc26a.zip
cpython-122f87fa040688ee9e7092797edab901e48fc26a.tar.gz
cpython-122f87fa040688ee9e7092797edab901e48fc26a.tar.bz2
The interpreter popup was never filled with any data, fixed.
Fixes #775878.
-rw-r--r--Mac/OSX/PythonLauncher/PreferencesWindowController.h2
-rw-r--r--Mac/OSX/PythonLauncher/PreferencesWindowController.m13
2 files changed, 11 insertions, 4 deletions
diff --git a/Mac/OSX/PythonLauncher/PreferencesWindowController.h b/Mac/OSX/PythonLauncher/PreferencesWindowController.h
index 63c1836..6346996 100644
--- a/Mac/OSX/PythonLauncher/PreferencesWindowController.h
+++ b/Mac/OSX/PythonLauncher/PreferencesWindowController.h
@@ -7,7 +7,7 @@
@interface PreferencesWindowController : NSWindowController <FileSettingsSource>
{
IBOutlet NSPopUpButton *filetype;
- IBOutlet NSTextField *interpreter;
+ IBOutlet NSComboBox *interpreter;
IBOutlet NSButton *honourhashbang;
IBOutlet NSButton *debug;
IBOutlet NSButton *verbose;
diff --git a/Mac/OSX/PythonLauncher/PreferencesWindowController.m b/Mac/OSX/PythonLauncher/PreferencesWindowController.m
index 5dd08f3..311c375 100644
--- a/Mac/OSX/PythonLauncher/PreferencesWindowController.m
+++ b/Mac/OSX/PythonLauncher/PreferencesWindowController.m
@@ -29,6 +29,7 @@
{
// [[self window] setTitle: script];
+ [interpreter reloadData];
[interpreter setStringValue: [settings interpreter]];
[honourhashbang setState: [settings honourhashbang]];
[debug setState: [settings debug]];
@@ -97,17 +98,23 @@
// NSComboBoxDataSource protocol
- (unsigned int)comboBox:(NSComboBox *)aComboBox indexOfItemWithStringValue:(NSString *)aString
{
- return [[settings interpreters] indexOfObjectIdenticalTo: aString];
+ NSArray *interp_list = [settings interpreters];
+ unsigned int rv = [interp_list indexOfObjectIdenticalTo: aString];
+ return rv;
}
- (id)comboBox:(NSComboBox *)aComboBox objectValueForItemAtIndex:(int)index
{
- return [[settings interpreters] objectAtIndex: index];
+ NSArray *interp_list = [settings interpreters];
+ id rv = [interp_list objectAtIndex: index];
+ return rv;
}
- (int)numberOfItemsInComboBox:(NSComboBox *)aComboBox
{
- return [[settings interpreters] count];
+ NSArray *interp_list = [settings interpreters];
+ int rv = [interp_list count];
+ return rv;
}