- I have begun to swap in the ITTransientStatusWindow. The StatusWindow,
StatusWindowController, and StatusWindow nib have been removed from the
target. ITTSW references have been swapped in incompletely, which
results in build warnings and no window during runtime. I am going to
use an ITTSW subclass for MT. Everything still builds and runs.
- I rebuilt the Preferences nib. This should be the final UI for prefs.
The biggest change is that the Cancel/Apply/Save buttons are gone. NOTE:
I have not made changes take effect immediately yet. I have enabled the
close button on the prefs window.
- The Prefs and Registration nibs are now saved in the 10.2 keyed
format. I have no idea how the registration nib got modified, since
its days are numbered, but I went with it. :/
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
<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>
<key>IBFramework Version</key>
<string>291.0</string>
<key>IBGroupedObjects</key>
</dict>
<key>IBLastGroupID</key>
<string>1</string>
</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>
<key>IBSystem Version</key>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!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>IBFramework Version</key>
<string>291.0</string>
+ <key>IBOpenObjects</key>
+ <array>
+ <integer>31</integer>
+ </array>
<key>IBSystem Version</key>
<key>IBSystem Version</key>
-@class PreferencesController, StatusWindowController;
+@class PreferencesController, ITTransientStatusWindow;
@interface MenuTunes : NSObject
{
@interface MenuTunes : NSObject
{
NSMenuItem *playPauseMenuItem; //Toggle between 'Play' and 'Pause'
PreferencesController *prefsController;
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;
}
- (void)registerDefaultsIfNeeded;
#import "MenuTunes.h"
#import "PreferencesController.h"
#import "HotKeyCenter.h"
#import "MenuTunes.h"
#import "PreferencesController.h"
#import "HotKeyCenter.h"
-#import "StatusWindowController.h"
@interface MenuTunes(Private)
- (ITMTRemote *)loadRemote;
@interface MenuTunes(Private)
- (ITMTRemote *)loadRemote;
{
if ( ( self = [super init] ) ) {
remoteArray = [[NSMutableArray alloc] initWithCapacity:1];
{
if ( ( self = [super init] ) ) {
remoteArray = [[NSMutableArray alloc] initWithCapacity:1];
+ statusWindow = [ITTransientStatusWindow sharedWindow];
- (void)showCurrentTrackInfo
{
NSString *trackName = [currentRemote currentSongTitle];
- (void)showCurrentTrackInfo
{
NSString *trackName = [currentRemote currentSongTitle];
- if (!statusController && [trackName length]) {
+ if (!statusWindow && [trackName length]) {
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSString *stringToShow = @"";
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)
[NSTimer scheduledTimerWithTimeInterval:3.0
target:self
selector:@selector(fadeAndCloseStatusWindow)
- (void)showUpcomingSongs
{
int curPlaylist = [currentRemote currentPlaylistIndex];
- (void)showUpcomingSongs
{
int curPlaylist = [currentRemote currentPlaylistIndex];
- if (!statusController) {
int numSongs = [currentRemote numberOfSongsInPlaylistAtIndex:curPlaylist];
if (numSongs > 0) {
int numSongs = [currentRemote numberOfSongsInPlaylistAtIndex:curPlaylist];
if (numSongs > 0) {
int i;
NSString *songs = @"";
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];
for (i = curTrack + 1; i <= curTrack + numSongsInAdvance; i++) {
if (i <= numSongs) {
NSString *curSong = [currentRemote songTitleAtIndex:i];
songs = [songs stringByAppendingString:@"\n"];
}
}
songs = [songs stringByAppendingString:@"\n"];
}
}
- [statusController setUpcomingSongs:songs];
+ [statusWindow setUpcomingSongs:songs];
[NSTimer scheduledTimerWithTimeInterval:3.0
target:self
selector:@selector(fadeAndCloseStatusWindow)
[NSTimer scheduledTimerWithTimeInterval:3.0
target:self
selector:@selector(fadeAndCloseStatusWindow)
- (void)fadeAndCloseStatusWindow
{
- (void)fadeAndCloseStatusWindow
{
- [statusController fadeWindowOut];
- [statusController release];
- statusController = nil;
+ [statusWindow orderOut:self];
}
- (void)setKeyEquivalentForCode:(short)code andModifiers:(long)modifiers
}
- (void)setKeyEquivalentForCode:(short)code andModifiers:(long)modifiers