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

Unified Diff: Mac/PythonLauncher/FileSettings.m

Issue 15550: Trailing white spaces
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Mac/PythonLauncher/English.lproj/PreferenceWindow.nib/classes.nib ('k') | Mac/PythonLauncher/Makefile.in » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Mac/PythonLauncher/FileSettings.m Sat Aug 04 16:17:10 2012 +0200
+++ b/Mac/PythonLauncher/FileSettings.m Sat Aug 04 22:46:03 2012 +0300
@@ -14,7 +14,7 @@
{
static FileSettings *fsdefault_py, *fsdefault_pyw, *fsdefault_pyc;
FileSettings **curdefault;
-
+
if ([filetype isEqualToString: @"Python Script"]) {
curdefault = &fsdefault_py;
} else if ([filetype isEqualToString: @"Python GUI Script"]) {
@@ -36,7 +36,7 @@
{
static FileSettings *default_py, *default_pyw, *default_pyc;
FileSettings **curdefault;
-
+
if ([filetype isEqualToString: @"Python Script"]) {
curdefault = &default_py;
} else if ([filetype isEqualToString: @"Python GUI Script"]) {
@@ -57,7 +57,7 @@
+ (id)newSettingsForFileType: (NSString *)filetype
{
FileSettings *cur;
-
+
cur = [FileSettings new];
[cur initForFileType: filetype];
return [cur retain];
@@ -67,7 +67,7 @@
{
self = [super init];
if (!self) return self;
-
+
interpreter = [source->interpreter retain];
honourhashbang = source->honourhashbang;
debug = source->debug;
@@ -81,14 +81,14 @@
with_terminal = source->with_terminal;
prefskey = source->prefskey;
if (prefskey) [prefskey retain];
-
+
return self;
}
- (id)initForFileType: (NSString *)filetype
{
FileSettings *defaults;
-
+
defaults = [FileSettings getDefaultsForFileType: filetype];
self = [self initWithFileSettings: defaults];
origsource = [defaults retain];
@@ -107,10 +107,10 @@
NSString *filename;
NSDictionary *dict;
static NSDictionary *factorySettings;
-
+
self = [super init];
if (!self) return self;
-
+
if (factorySettings == NULL) {
NSBundle *bdl = [NSBundle mainBundle];
NSString *path = [ bdl pathForResource: @"factorySettings"
@@ -149,18 +149,18 @@
{
NSUserDefaults *defaults;
NSDictionary *dict;
-
+
defaults = [NSUserDefaults standardUserDefaults];
dict = [defaults dictionaryForKey: filetype];
if (!dict)
return;
[self applyValuesFromDict: dict];
}
-
+
- (id)initForDefaultFileType: (NSString *)filetype
{
FileSettings *fsdefaults;
-
+
fsdefaults = [FileSettings getFactorySettingsForFileType: filetype];
self = [self initWithFileSettings: fsdefaults];
if (!self) return self;
@@ -220,7 +220,7 @@
- (void)applyValuesFromDict: (NSDictionary *)dict
{
id value;
-
+
value = [dict objectForKey: @"interpreter"];
if (value) interpreter = [value retain];
value = [dict objectForKey: @"honourhashbang"];
@@ -265,7 +265,7 @@
script_dir = [script substringToIndex:
[script length]-[[script lastPathComponent] length]];
-
+
if (honourhashbang &&
(fp=fopen([script fileSystemRepresentation], "r")) &&
fgets(hashbangbuf, sizeof(hashbangbuf), fp) &&
@@ -278,7 +278,7 @@
}
if (!cur_interp)
cur_interp = interpreter;
-
+
return [NSString stringWithFormat:
@"cd '%@' && '%@'%s%s%s%s%s%s %@ '%@' %@ %s",
[self _replaceSingleQuotes:script_dir],
@@ -297,7 +297,7 @@
- (NSArray *) interpreters { return interpreters;};
-// FileSettingsSource protocol
+// FileSettingsSource protocol
- (NSString *) interpreter { return interpreter;};
- (BOOL) honourhashbang { return honourhashbang; };
- (BOOL) debug { return debug;};
« no previous file with comments | « Mac/PythonLauncher/English.lproj/PreferenceWindow.nib/classes.nib ('k') | Mac/PythonLauncher/Makefile.in » ('j') | no next file with comments »

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