<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
- <string>71 12 356 240 0 0 1280 938 </string>
+ <string>4 276 356 240 0 0 1056 770 </string>
<key>IBFramework Version</key>
<string>291.0</string>
<key>IBGroupedObjects</key>
</dict>
<key>IBLastGroupID</key>
<string>1</string>
+ <key>IBLockedObjects</key>
+ <array>
+ <integer>281</integer>
+ </array>
+ <key>IBOpenObjects</key>
+ <array>
+ <integer>115</integer>
+ <integer>6</integer>
+ </array>
<key>IBSystem Version</key>
- <string>6G20</string>
+ <string>6I32</string>
</dict>
</plist>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
+ <key>IBDocumentLocation</key>
+ <string>30 27 356 240 0 0 1056 770 </string>
+ <key>IBEditorPositions</key>
+ <dict>
+ <key>31</key>
+ <string>177 408 305 135 0 0 1056 770 </string>
+ </dict>
<key>IBFramework Version</key>
<string>291.0</string>
+ <key>IBOpenObjects</key>
+ <array>
+ <integer>31</integer>
+ </array>
<key>IBSystem Version</key>
- <string>6G20</string>
+ <string>6I32</string>
</dict>
</plist>
//@class MenuTunesView;
-@class PreferencesController, StatusWindowController;
+@class PreferencesController, ITTransientStatusWindow;
@interface MenuTunes : NSObject
{
NSMenuItem *playPauseMenuItem; //Toggle between 'Play' and 'Pause'
PreferencesController *prefsController;
- StatusWindowController *statusController; //Shows track info and upcoming songs.
+ ITTransientStatusWindow *statusWindow; //Shows track info and upcoming songs.
}
- (void)registerDefaultsIfNeeded;
#import "MenuTunes.h"
#import "PreferencesController.h"
#import "HotKeyCenter.h"
-#import "StatusWindowController.h"
@interface MenuTunes(Private)
- (ITMTRemote *)loadRemote;
{
if ( ( self = [super init] ) ) {
remoteArray = [[NSMutableArray alloc] initWithCapacity:1];
+ statusWindow = [ITTransientStatusWindow sharedWindow];
}
return self;
}
- (void)showCurrentTrackInfo
{
NSString *trackName = [currentRemote currentSongTitle];
- if (!statusController && [trackName length]) {
+ if (!statusWindow && [trackName length]) {
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSString *stringToShow = @"";
}
}
- statusController = [[StatusWindowController alloc] init];
- [statusController setTrackInfo:stringToShow];
+ [statusWindow setTrackInfo:stringToShow];
[NSTimer scheduledTimerWithTimeInterval:3.0
target:self
selector:@selector(fadeAndCloseStatusWindow)
- (void)showUpcomingSongs
{
int curPlaylist = [currentRemote currentPlaylistIndex];
- if (!statusController) {
+ if (!statusWindow) {
int numSongs = [currentRemote numberOfSongsInPlaylistAtIndex:curPlaylist];
if (numSongs > 0) {
int i;
NSString *songs = @"";
- statusController = [[StatusWindowController alloc] init];
+ statusWindow = [ITTransientStatusWindow sharedWindow];
for (i = curTrack + 1; i <= curTrack + numSongsInAdvance; i++) {
if (i <= numSongs) {
NSString *curSong = [currentRemote songTitleAtIndex:i];
songs = [songs stringByAppendingString:@"\n"];
}
}
- [statusController setUpcomingSongs:songs];
+ [statusWindow setUpcomingSongs:songs];
[NSTimer scheduledTimerWithTimeInterval:3.0
target:self
selector:@selector(fadeAndCloseStatusWindow)
- (void)fadeAndCloseStatusWindow
{
- [statusController fadeWindowOut];
- [statusController release];
- statusController = nil;
+ [statusWindow orderOut:self];
}
- (void)setKeyEquivalentForCode:(short)code andModifiers:(long)modifiers