Issue #18377: Code cleanup in Python Launcher
This changeset fixes a number of compiler warnings in the Python Launcher
binary for OSX. It also cleans up whitespace usage in those sources.
diff --git a/Mac/PythonLauncher/PreferencesWindowController.m b/Mac/PythonLauncher/PreferencesWindowController.m
index 311c375..ec5bbe8 100644
--- a/Mac/PythonLauncher/PreferencesWindowController.m
+++ b/Mac/PythonLauncher/PreferencesWindowController.m
@@ -5,7 +5,7 @@
+ getPreferencesWindow
{
static PreferencesWindowController *_singleton;
-
+
if (!_singleton)
_singleton = [[PreferencesWindowController alloc] init];
[_singleton showWindow: _singleton];
@@ -21,15 +21,13 @@
- (void)load_defaults
{
NSString *title = [filetype titleOfSelectedItem];
-
+
settings = [FileSettings getDefaultsForFileType: title];
}
- (void)update_display
{
-// [[self window] setTitle: script];
-
- [interpreter reloadData];
+ [interpreter reloadData];
[interpreter setStringValue: [settings interpreter]];
[honourhashbang setState: [settings honourhashbang]];
[debug setState: [settings debug]];
@@ -41,7 +39,6 @@
[others setStringValue: [settings others]];
[with_terminal setState: [settings with_terminal]];
// Not scriptargs, it isn't for preferences
-
[commandline setStringValue: [settings commandLineForScript: @"<your script here>"]];
}
@@ -75,7 +72,7 @@
[self update_display];
}
-// FileSettingsSource protocol
+// FileSettingsSource protocol
- (NSString *) interpreter { return [interpreter stringValue];};
- (BOOL) honourhashbang { return [honourhashbang state]; };
- (BOOL) debug { return [debug state];};
@@ -98,23 +95,23 @@
// NSComboBoxDataSource protocol
- (unsigned int)comboBox:(NSComboBox *)aComboBox indexOfItemWithStringValue:(NSString *)aString
{
- NSArray *interp_list = [settings interpreters];
+ NSArray *interp_list = [settings interpreters];
unsigned int rv = [interp_list indexOfObjectIdenticalTo: aString];
- return rv;
+ return rv;
}
- (id)comboBox:(NSComboBox *)aComboBox objectValueForItemAtIndex:(int)index
{
- NSArray *interp_list = [settings interpreters];
+ NSArray *interp_list = [settings interpreters];
id rv = [interp_list objectAtIndex: index];
- return rv;
+ return rv;
}
- (int)numberOfItemsInComboBox:(NSComboBox *)aComboBox
{
- NSArray *interp_list = [settings interpreters];
+ NSArray *interp_list = [settings interpreters];
int rv = [interp_list count];
- return rv;
+ return rv;
}