git.ithinksw.org
/
MenuTunes.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5d522e0
)
Reset the screen that the status window is on when the system's screens change.
author
Kent Sutherland
<git@ksuther.com>
Wed, 30 Mar 2011 06:50:53 +0000
(
02:50
-0400)
committer
Kent Sutherland
<git@ksuther.com>
Wed, 30 Mar 2011 06:50:53 +0000
(
02:50
-0400)
StatusWindowController.m
patch
|
blob
|
history
diff --git
a/StatusWindowController.m
b/StatusWindowController.m
index
2e4593e
..
aa684a3
100755
(executable)
--- a/
StatusWindowController.m
+++ b/
StatusWindowController.m
@@
-98,6
+98,8
@@
static StatusWindowController *sharedController;
} else {
[(ITTSWBackgroundView *)[_window contentView] setBackgroundColor:[NSColor blueColor]];
}
} else {
[(ITTSWBackgroundView *)[_window contentView] setBackgroundColor:[NSColor blueColor]];
}
+
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(screenParametersChanged:) name:NSApplicationDidChangeScreenParametersNotification object:nil];
}
return self;
}
return self;
@@
-105,10
+107,23
@@
static StatusWindowController *sharedController;
- (void)dealloc
{
- (void)dealloc
{
+ [[NSNotificationCenter defaultCenter] removeObserver:self];
+
[_window release];
[super dealloc];
}
[_window release];
[super dealloc];
}
+- (void)screenParametersChanged:(NSNotification *)notification
+{
+ NSArray *screens = [NSScreen screens];
+ int screenIndex = [df integerForKey:@"statusWindowScreenIndex"];
+
+ if (screenIndex >= [screens count]) {
+ screenIndex = 0;
+ }
+ [_window setScreen:[screens objectAtIndex:screenIndex]];
+}
+
- (void)showSongInfoWindowWithSource:(ITMTRemotePlayerSource)source
title: (NSString *)title
album: (NSString *)album
- (void)showSongInfoWindowWithSource:(ITMTRemotePlayerSource)source
title: (NSString *)title
album: (NSString *)album