From: Matthew Judy Date: Sat, 22 Feb 2003 00:18:18 +0000 (+0000) Subject: This is a progressive checkin. It has the following effects: X-Git-Tag: v1.0~231 X-Git-Url: http://git.ithinksw.org/MenuTunes.git/commitdiff_plain/bb84d84505744320f081b3826b959c787f659287 This is a progressive checkin. It has the following effects: - 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. :/ --- diff --git a/English.lproj/Preferences.nib/info.nib b/English.lproj/Preferences.nib/info.nib index 15c28fe..f884d1b 100755 --- a/English.lproj/Preferences.nib/info.nib +++ b/English.lproj/Preferences.nib/info.nib @@ -3,7 +3,7 @@ IBDocumentLocation - 71 12 356 240 0 0 1280 938 + 4 276 356 240 0 0 1056 770 IBFramework Version 291.0 IBGroupedObjects @@ -16,7 +16,16 @@ IBLastGroupID 1 + IBLockedObjects + + 281 + + IBOpenObjects + + 115 + 6 + IBSystem Version - 6G20 + 6I32 diff --git a/English.lproj/Preferences.nib/keyedobjects.nib b/English.lproj/Preferences.nib/keyedobjects.nib new file mode 100755 index 0000000..9ccd686 Binary files /dev/null and b/English.lproj/Preferences.nib/keyedobjects.nib differ diff --git a/English.lproj/Preferences.nib/objects.nib b/English.lproj/Preferences.nib/objects.nib deleted file mode 100755 index 9b65108..0000000 Binary files a/English.lproj/Preferences.nib/objects.nib and /dev/null differ diff --git a/English.lproj/Registration.nib/info.nib b/English.lproj/Registration.nib/info.nib index 4b48012..f813748 100755 --- a/English.lproj/Registration.nib/info.nib +++ b/English.lproj/Registration.nib/info.nib @@ -2,9 +2,20 @@ + IBDocumentLocation + 30 27 356 240 0 0 1056 770 + IBEditorPositions + + 31 + 177 408 305 135 0 0 1056 770 + IBFramework Version 291.0 + IBOpenObjects + + 31 + IBSystem Version - 6G20 + 6I32 diff --git a/English.lproj/Registration.nib/keyedobjects.nib b/English.lproj/Registration.nib/keyedobjects.nib new file mode 100755 index 0000000..0285599 Binary files /dev/null and b/English.lproj/Registration.nib/keyedobjects.nib differ diff --git a/English.lproj/Registration.nib/objects.nib b/English.lproj/Registration.nib/objects.nib deleted file mode 100755 index 44010d7..0000000 Binary files a/English.lproj/Registration.nib/objects.nib and /dev/null differ diff --git a/MenuTunes.h b/MenuTunes.h index 304b34d..6e66299 100755 --- a/MenuTunes.h +++ b/MenuTunes.h @@ -20,7 +20,7 @@ //@class MenuTunesView; -@class PreferencesController, StatusWindowController; +@class PreferencesController, ITTransientStatusWindow; @interface MenuTunes : NSObject { @@ -52,7 +52,7 @@ 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; diff --git a/MenuTunes.m b/MenuTunes.m index 1dd7df6..5dc69be 100755 --- a/MenuTunes.m +++ b/MenuTunes.m @@ -10,7 +10,6 @@ Things to do: #import "MenuTunes.h" #import "PreferencesController.h" #import "HotKeyCenter.h" -#import "StatusWindowController.h" @interface MenuTunes(Private) - (ITMTRemote *)loadRemote; @@ -36,6 +35,7 @@ Things to do: { if ( ( self = [super init] ) ) { remoteArray = [[NSMutableArray alloc] initWithCapacity:1]; + statusWindow = [ITTransientStatusWindow sharedWindow]; } return self; } @@ -774,7 +774,7 @@ Things to do: - (void)showCurrentTrackInfo { NSString *trackName = [currentRemote currentSongTitle]; - if (!statusController && [trackName length]) { + if (!statusWindow && [trackName length]) { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSString *stringToShow = @""; @@ -814,8 +814,7 @@ Things to do: } } - statusController = [[StatusWindowController alloc] init]; - [statusController setTrackInfo:stringToShow]; + [statusWindow setTrackInfo:stringToShow]; [NSTimer scheduledTimerWithTimeInterval:3.0 target:self selector:@selector(fadeAndCloseStatusWindow) @@ -827,7 +826,7 @@ Things to do: - (void)showUpcomingSongs { int curPlaylist = [currentRemote currentPlaylistIndex]; - if (!statusController) { + if (!statusWindow) { int numSongs = [currentRemote numberOfSongsInPlaylistAtIndex:curPlaylist]; if (numSongs > 0) { @@ -836,7 +835,7 @@ Things to do: 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]; @@ -844,7 +843,7 @@ Things to do: songs = [songs stringByAppendingString:@"\n"]; } } - [statusController setUpcomingSongs:songs]; + [statusWindow setUpcomingSongs:songs]; [NSTimer scheduledTimerWithTimeInterval:3.0 target:self selector:@selector(fadeAndCloseStatusWindow) @@ -856,9 +855,7 @@ Things to do: - (void)fadeAndCloseStatusWindow { - [statusController fadeWindowOut]; - [statusController release]; - statusController = nil; + [statusWindow orderOut:self]; } - (void)setKeyEquivalentForCode:(short)code andModifiers:(long)modifiers