From b092ed8c2c787bed7ec1a54b10cd7111e1406803 Mon Sep 17 00:00:00 2001 From: Klaas Pieter Annema Date: Mon, 30 Aug 2010 13:35:19 +0200 Subject: [PATCH] only load Aristo from AppKit/Resources Other themes are loaded from the main bundle's resource directory --- AppKit/CPApplication.j | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/AppKit/CPApplication.j b/AppKit/CPApplication.j index ad729b0f5..1abca9afa 100644 --- a/AppKit/CPApplication.j +++ b/AppKit/CPApplication.j @@ -1113,8 +1113,15 @@ var _CPAppBootstrapperActions = nil; + (BOOL)loadDefaultTheme { - var blend = [[CPThemeBlend alloc] initWithContentsOfURL:[[CPBundle bundleForClass:[CPApplication class]] pathForResource:[CPApplication defaultThemeName] + ".blend"]]; + var defaultThemeName = [CPApplication defaultThemeName], + themeURL = nil; + if (defaultThemeName === @"Aristo") + themeURL = [[CPBundle bundleForClass:[CPApplication class]] pathForResource:defaultThemeName + @".blend"]; + else + themeURL = [[CPBundle mainBundle] pathForResource:defaultThemeName + @".blend"]; + + var blend = [[CPThemeBlend alloc] initWithContentsOfURL:themeURL]; [blend loadWithDelegate:self]; return YES;