|
77 | 77 | #endif |
78 | 78 | @"10", @"fontSizePoints", |
79 | 79 | @"Menlo", @"font", |
80 | | - @"edit-xcode", @"hlTheme", |
| 80 | + @"edit-xcode", @"hlTheme", |
81 | 81 | // @"-lz -j 3 -t 4 --kw-case=capitalize ", @"extraHLFlags", |
82 | 82 | @"-t 4 --kw-case=capitalize ", @"extraHLFlags", |
83 | 83 | @"/opt/local/bin/highlight", @"pathHL", |
84 | 84 | @"", @"maxFileSize", |
85 | 85 | @"UTF-8", @"textEncoding", |
86 | 86 | @"UTF-8", @"webkitTextEncoding", nil]]; |
| 87 | + |
87 | 88 | [env addEntriesFromDictionary:[defaults persistentDomainForName:myDomain]]; |
88 | 89 |
|
| 90 | + // This overrides hlTheme if hlThumbTheme is set and we're generating a thumbnail |
| 91 | + // (This way we won't irritate people with existing installs) |
| 92 | + // Admittedly, it's a little shady, overriding the set value, but I'd rather complicate the compiled code |
| 93 | + if (thumbnail && [[env allKeys] containsObject:@"hlThumbTheme"]) { |
| 94 | + [env setObject:[env objectForKey:@"hlThumbTheme"] forKey:@"hlTheme"]; |
| 95 | + } |
| 96 | + |
89 | 97 | NSString *cmd = [NSString stringWithFormat: |
90 | 98 | @"'%@/colorize.sh' '%@' '%@' %s", |
91 | 99 | rsrcEsc, rsrcEsc, [targetEsc stringByReplacingOccurrencesOfString:@"'" withString:@"'\\''"], thumbnail ? "1" : "0"]; |
|
0 commit comments