Skip to content

Commit

Permalink
Properly disable indentation and fix color of Simplified Light.
Browse files Browse the repository at this point in the history
  • Loading branch information
emsquared committed Jul 27, 2012
1 parent 4604582 commit 5ac3028
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
14 changes: 9 additions & 5 deletions Classes/Preferences/Themes/TPCOtherTheme.m
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

@interface TPCOtherTheme ()
@property (nonatomic, strong) NSDictionary *styleSettings;
@property (nonatomic, strong) GRMustacheTemplateRepository *templateRepository;
@property (nonatomic, strong) GRMustacheTemplateRepository *styleTemplateRepository;
@property (nonatomic, strong) GRMustacheTemplateRepository *appTemplateRepository;
@end

Expand All @@ -61,7 +61,7 @@ - (NSColor *)colorForKey:(NSString *)key
NSString *hexValue = [self.styleSettings objectForKey:key];

if ([hexValue length] == 7 || [hexValue length] == 4) {
[NSColor fromCSS:hexValue];
return [NSColor fromCSS:hexValue];
}

return nil;
Expand Down Expand Up @@ -121,7 +121,7 @@ - (GRMustacheTemplate *)templateWithName:(NSString *)name
{
NSError *load_error;

GRMustacheTemplate *tmpl = [self.templateRepository templateForName:name error:&load_error];
GRMustacheTemplate *tmpl = [self.styleTemplateRepository templateForName:name error:&load_error];

if (PointerIsEmpty(tmpl) || load_error) {
if (load_error.code == GRMustacheErrorCodeTemplateNotFound || load_error.code == 260) {
Expand Down Expand Up @@ -151,9 +151,9 @@ - (void)reload

dictPath = [self.path stringByAppendingPathComponent:@"/Data/Templates"];

self.templateRepository = [GRMustacheTemplateRepository templateRepositoryWithBaseURL:[NSURL fileURLWithPath:dictPath]];
self.styleTemplateRepository = [GRMustacheTemplateRepository templateRepositoryWithBaseURL:[NSURL fileURLWithPath:dictPath]];

if (PointerIsEmpty(self.templateRepository)) {
if (PointerIsEmpty(self.styleTemplateRepository)) {
exit(10);
}

Expand Down Expand Up @@ -192,6 +192,10 @@ - (void)reload

self.indentationOffset = [self doubleForKey:@"Indentation Offset"];

if (self.indentationOffset <= 0.0) {
self.indentationOffset = TXThemeDisabledIndentationOffset;
}

// ---- //

[[_NSUserDefaultsController() values] setValue:@(NSObjectIsEmpty(self.nicknameFormat)) forKey:@"Theme -> Nickname Format Preference Enabled"];
Expand Down
4 changes: 2 additions & 2 deletions Resources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
<key>TXBundleBuildCodeName</key>
<string>Turtle Soup</string>
<key>TXBundleBuildNumber</key>
<string>12117</string>
<string>12124</string>
<key>TXBundleBuildReference</key>
<string>2.1.1-262-g1b17433-appstore</string>
<string>2.1.1-263-g4604582-debug</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
<key>Indentation Offset</key>
<integer>6</integer>
<key>Underlying Window Color</key>
<string>#000000</string>
<string>#FFFFFF</string>
</dict>
</plist>

0 comments on commit 5ac3028

Please sign in to comment.