Check the Info.plist for a CPDefaultTheme key for the name of the default theme.

Closes #418.
This commit is contained in:
Ross Boucher committed 2010-01-24 00:34:35 -08:00
1 parent 7ffb44e394
commit 5a8d491f10
1 file changed
+3 -3
+3 -3
View File
@@ -962,7 +962,7 @@ CPRunContinuesResponse = -1002;
+ (CPString)defaultThemeName
{
// FIXME: don't hardcode
return @"Aristo.blend";
return ([[CPBundle mainBundle] objectForInfoDictionaryKey:"CPDefaultTheme"] || @"Aristo");
}
@end
@@ -1069,7 +1069,7 @@ var _CPAppBootstrapperActions = nil;
+ (BOOL)loadDefaultTheme
{
var blend = [[CPThemeBlend alloc] initWithContentsOfURL:[[CPBundle bundleForClass:[CPApplication class]] pathForResource:[CPApplication defaultThemeName]]];
var blend = [[CPThemeBlend alloc] initWithContentsOfURL:[[CPBundle bundleForClass:[CPApplication class]] pathForResource:[CPApplication defaultThemeName] + ".blend"]];
[blend loadWithDelegate:self];
@@ -1078,7 +1078,7 @@ var _CPAppBootstrapperActions = nil;
+ (void)blendDidFinishLoading:(CPBundle)aBundle
{
[CPTheme setDefaultTheme:[CPTheme themeNamed:@"Aristo"]];
[CPTheme setDefaultTheme:[CPTheme themeNamed:[CPApplication defaultThemeName]]];
[self performActions];
}