aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/SPPreferenceController.m28
1 files changed, 28 insertions, 0 deletions
diff --git a/Source/SPPreferenceController.m b/Source/SPPreferenceController.m
index b2b6db9d..79f18b62 100644
--- a/Source/SPPreferenceController.m
+++ b/Source/SPPreferenceController.m
@@ -1563,6 +1563,33 @@
return;
}
+ NSString *currentThemeName = [[prefs objectForKey:SPCustomQueryEditorThemeName] lowercaseString];
+ if([currentThemeName isEqualToString:@"default"]) {
+ [colorThemeName setHidden:NO];
+ [colorThemeNameLabel setHidden:NO];
+ return;
+ }
+
+ BOOL nameValid = NO;
+ for(NSString* item in [self getAvailableThemes]) {
+ if([[item lowercaseString] isEqualToString:currentThemeName]) {
+ nameValid = YES;
+ break;
+ }
+ }
+
+ if(nameValid) {
+ [colorThemeName setHidden:NO];
+ [colorThemeNameLabel setHidden:NO];
+ return;
+ } else {
+ [prefs setObject:@"User-defined" forKey:SPCustomQueryEditorThemeName];
+ [colorThemeName setHidden:YES];
+ [colorThemeNameLabel setHidden:YES];
+ [self updateColorSchemeSelectionMenu];
+ return;
+ }
+
[colorThemeName setHidden:NO];
[colorThemeNameLabel setHidden:NO];
@@ -1945,6 +1972,7 @@
[alert setAlertStyle:NSCriticalAlertStyle];
[alert runModal];
if (theme) [theme release];
+ [self updateDisplayColorThemeName];
return NO;
}