Refactor hardcoded Aristo.blend into CPApplication +defaultThemeName

This commit is contained in:
Tom Robinson
2010-01-13 01:53:23 -08:00
parent ff4fd1411e
commit 345f5e14de
+7 -1
View File
@@ -958,6 +958,12 @@ CPRunContinuesResponse = -1002;
[self._activeMenu cancelTracking];
}
+ (CPString)defaultThemeName
{
// FIXME: don't hardcode
return @"Aristo.blend";
}
@end
var _CPModalSessionMake = function(aWindow, aStopCode)
@@ -1062,7 +1068,7 @@ var _CPAppBootstrapperActions = nil;
+ (BOOL)loadDefaultTheme
{
var blend = [[CPThemeBlend alloc] initWithContentsOfURL:[[CPBundle bundleForClass:[CPApplication class]] pathForResource:@"Aristo.blend"]];
var blend = [[CPThemeBlend alloc] initWithContentsOfURL:[[CPBundle bundleForClass:[CPApplication class]] pathForResource:[CPApplication defaultThemeName]]];
[blend loadWithDelegate:self];