From 5a8d491f10cb7c2a03bd48563c33cc52d9f766f8 Mon Sep 17 00:00:00 2001 From: Ross Boucher Date: Sun, 24 Jan 2010 00:34:35 -0800 Subject: [PATCH] Check the Info.plist for a CPDefaultTheme key for the name of the default theme. Closes #418. --- AppKit/CPApplication.j | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/AppKit/CPApplication.j b/AppKit/CPApplication.j index ee53c6643..c8debf421 100644 --- a/AppKit/CPApplication.j +++ b/AppKit/CPApplication.j @@ -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]; }