aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-08-19 10:16:17 +0000
committerBibiko <bibiko@eva.mpg.de>2010-08-19 10:16:17 +0000
commit14974deb7b7864ab908eba58bb88bcc446a796da (patch)
tree26d3b0c7621b7f89f6332362c7e22ddd071fffb7 /Source
parent50f47a853adcac4ee1d5394a6f4ef99789314cf3 (diff)
downloadsequelpro-14974deb7b7864ab908eba58bb88bcc446a796da.tar.gz
sequelpro-14974deb7b7864ab908eba58bb88bcc446a796da.tar.bz2
sequelpro-14974deb7b7864ab908eba58bb88bcc446a796da.zip
• fixed issue if SP's theme support folder or saved theme file resp. was removed while SP's Editor Preferences window is open
Diffstat (limited to 'Source')
-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;
}