diff options
author | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2009-07-27 17:45:14 +0000 |
---|---|---|
committer | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2009-07-27 17:45:14 +0000 |
commit | d800df3e1bd4782b0b0fa368d38525e1eb95a465 (patch) | |
tree | 9123214413bf4d7395851ac5bab5a86d3e3fb126 /AppKit | |
parent | 53bb5210cd74858f657718678ffddf17c1d666fb (diff) |
[Author: alcor]
Add constant for theme user default
R=dmaclach
DELTA=9 (7 added, 0 deleted, 2 changed)
Diffstat (limited to 'AppKit')
-rw-r--r-- | AppKit/GTMTheme.h | 5 | ||||
-rw-r--r-- | AppKit/GTMTheme.m | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/AppKit/GTMTheme.h b/AppKit/GTMTheme.h index d5e02b9..52d5d13 100644 --- a/AppKit/GTMTheme.h +++ b/AppKit/GTMTheme.h @@ -22,7 +22,10 @@ #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 // Sent whenever the theme changes. Object => GTMTheme that changed -GTM_EXTERN NSString *kGTMThemeDidChangeNotification; +GTM_EXTERN NSString *const kGTMThemeDidChangeNotification; + +// Key for user defaults defining background color +GTM_EXTERN NSString *const kGTMThemeBackgroundColorKey; enum { GTMThemeStyleTabBarSelected, diff --git a/AppKit/GTMTheme.m b/AppKit/GTMTheme.m index 91c4891..45d92ff 100644 --- a/AppKit/GTMTheme.m +++ b/AppKit/GTMTheme.m @@ -23,7 +23,8 @@ #import <QuartzCore/QuartzCore.h> static GTMTheme *gGTMDefaultTheme = nil; -NSString *kGTMThemeDidChangeNotification = @"kGTMThemeDidChangeNotification"; +NSString *const kGTMThemeDidChangeNotification = @"GTMThemeDidChangeNotification"; +NSString *const kGTMThemeBackgroundColorKey = @"GTMThemeBackgroundColor"; @implementation NSWindow (GTMTheme) - (GTMTheme *)gtm_theme { @@ -187,8 +188,11 @@ NSString *kGTMThemeDidChangeNotification = @"kGTMThemeDidChangeNotification"; if (!state) { // TODO(alcor): dim images when disabled color = [NSColor colorWithPatternImage:backgroundImage_]; + // TODO(alcor): |color| is never used! if ((state & GTMThemeStateActiveWindow) != GTMThemeStateActiveWindow) { + // TODO(alcor): this recursive call will also return nil since when you + // ask for the active style, it never returns anything. NSImage *image = [self backgroundImageForStyle:style state:GTMThemeStateActiveWindow]; |