Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(7)

Delta Between Two Patch Sets: Mac/PythonLauncher/PreferencesWindowController.m

Issue 15550: Trailing white spaces
Left Patch Set: Created 7 years, 8 months ago
Right Patch Set: Created 7 years, 8 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « Mac/PythonLauncher/MyDocument.m ('k') | Mac/README » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 #import "PreferencesWindowController.h" 1 #import "PreferencesWindowController.h"
2 2
3 @implementation PreferencesWindowController 3 @implementation PreferencesWindowController
4 4
5 + getPreferencesWindow 5 + getPreferencesWindow
6 { 6 {
7 static PreferencesWindowController *_singleton; 7 static PreferencesWindowController *_singleton;
8 8
9 if (!_singleton) 9 if (!_singleton)
10 _singleton = [[PreferencesWindowController alloc] init]; 10 _singleton = [[PreferencesWindowController alloc] init];
11 [_singleton showWindow: _singleton]; 11 [_singleton showWindow: _singleton];
12 return _singleton; 12 return _singleton;
13 } 13 }
14 14
15 - (id) init 15 - (id) init
16 { 16 {
17 self = [self initWithWindowNibName: @"PreferenceWindow"]; 17 self = [self initWithWindowNibName: @"PreferenceWindow"];
18 return self; 18 return self;
19 } 19 }
20 20
21 - (void)load_defaults 21 - (void)load_defaults
22 { 22 {
23 NSString *title = [filetype titleOfSelectedItem]; 23 NSString *title = [filetype titleOfSelectedItem];
24 24
25 settings = [FileSettings getDefaultsForFileType: title]; 25 settings = [FileSettings getDefaultsForFileType: title];
26 } 26 }
27 27
28 - (void)update_display 28 - (void)update_display
29 { 29 {
30 // [[self window] setTitle: script]; 30 // [[self window] setTitle: script];
31 31
32 [interpreter reloadData]; 32 [interpreter reloadData];
33 [interpreter setStringValue: [settings interpreter]]; 33 [interpreter setStringValue: [settings interpreter]];
34 [honourhashbang setState: [settings honourhashbang]]; 34 [honourhashbang setState: [settings honourhashbang]];
35 [debug setState: [settings debug]]; 35 [debug setState: [settings debug]];
36 [verbose setState: [settings verbose]]; 36 [verbose setState: [settings verbose]];
37 [inspect setState: [settings inspect]]; 37 [inspect setState: [settings inspect]];
38 [optimize setState: [settings optimize]]; 38 [optimize setState: [settings optimize]];
39 [nosite setState: [settings nosite]]; 39 [nosite setState: [settings nosite]];
40 [tabs setState: [settings tabs]]; 40 [tabs setState: [settings tabs]];
41 [others setStringValue: [settings others]]; 41 [others setStringValue: [settings others]];
42 [with_terminal setState: [settings with_terminal]]; 42 [with_terminal setState: [settings with_terminal]];
43 // Not scriptargs, it isn't for preferences 43 // Not scriptargs, it isn't for preferences
44 44
45 [commandline setStringValue: [settings commandLineForScript: @"<your script here>"]]; 45 [commandline setStringValue: [settings commandLineForScript: @"<your script here>"]];
46 } 46 }
47 47
48 - (void) windowDidLoad 48 - (void) windowDidLoad
49 { 49 {
50 [super windowDidLoad]; 50 [super windowDidLoad];
51 [self load_defaults]; 51 [self load_defaults];
52 [self update_display]; 52 [self update_display];
53 } 53 }
54 54
(...skipping 13 matching lines...) Expand all
68 [settings reset]; 68 [settings reset];
69 [self update_display]; 69 [self update_display];
70 } 70 }
71 71
72 - (IBAction)do_apply:(id)sender 72 - (IBAction)do_apply:(id)sender
73 { 73 {
74 [self update_settings]; 74 [self update_settings];
75 [self update_display]; 75 [self update_display];
76 } 76 }
77 77
78 // FileSettingsSource protocol 78 // FileSettingsSource protocol
79 - (NSString *) interpreter { return [interpreter stringValue];}; 79 - (NSString *) interpreter { return [interpreter stringValue];};
80 - (BOOL) honourhashbang { return [honourhashbang state]; }; 80 - (BOOL) honourhashbang { return [honourhashbang state]; };
81 - (BOOL) debug { return [debug state];}; 81 - (BOOL) debug { return [debug state];};
82 - (BOOL) verbose { return [verbose state];}; 82 - (BOOL) verbose { return [verbose state];};
83 - (BOOL) inspect { return [inspect state];}; 83 - (BOOL) inspect { return [inspect state];};
84 - (BOOL) optimize { return [optimize state];}; 84 - (BOOL) optimize { return [optimize state];};
85 - (BOOL) nosite { return [nosite state];}; 85 - (BOOL) nosite { return [nosite state];};
86 - (BOOL) tabs { return [tabs state];}; 86 - (BOOL) tabs { return [tabs state];};
87 - (NSString *) others { return [others stringValue];}; 87 - (NSString *) others { return [others stringValue];};
88 - (BOOL) with_terminal { return [with_terminal state];}; 88 - (BOOL) with_terminal { return [with_terminal state];};
(...skipping 23 matching lines...) Expand all
112 112
113 - (int)numberOfItemsInComboBox:(NSComboBox *)aComboBox 113 - (int)numberOfItemsInComboBox:(NSComboBox *)aComboBox
114 { 114 {
115 NSArray *interp_list = [settings interpreters]; 115 NSArray *interp_list = [settings interpreters];
116 int rv = [interp_list count]; 116 int rv = [interp_list count];
117 return rv; 117 return rv;
118 } 118 }
119 119
120 120
121 @end 121 @end
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+