git.ithinksw.org
/
MenuTunes.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Mostly just moving files around for organizational puroposes. Created a Deprecated...
[MenuTunes.git]
/
MenuTunes.m
diff --git
a/MenuTunes.m
b/MenuTunes.m
index
487a5bb
..
5dc69be
100755
(executable)
--- a/
MenuTunes.m
+++ b/
MenuTunes.m
@@
-10,7
+10,6
@@
Things to do:
#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;
@@
-36,6
+35,7
@@
Things to do:
{
if ( ( self = [super init] ) ) {
remoteArray = [[NSMutableArray alloc] initWithCapacity:1];
{
if ( ( self = [super init] ) ) {
remoteArray = [[NSMutableArray alloc] initWithCapacity:1];
+ statusWindow = [ITTransientStatusWindow sharedWindow];
}
return self;
}
}
return self;
}
@@
-126,7
+126,7
@@
Things to do:
{
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
if (![defaults objectForKey:@"menu"]) {
{
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
if (![defaults objectForKey:@"menu"]) {
-
bool
found = NO;
+
BOOL
found = NO;
NSMutableDictionary *loginwindow;
NSMutableArray *loginarray;
int i;
NSMutableDictionary *loginwindow;
NSMutableArray *loginarray;
int i;
@@
-460,7
+460,7
@@
Things to do:
NSMenuItem *songItem;
songItem = [[NSMenuItem alloc] initWithTitle:curSong action:@selector(playTrack:) keyEquivalent:@""];
[songItem setTarget:self];
NSMenuItem *songItem;
songItem = [[NSMenuItem alloc] initWithTitle:curSong action:@selector(playTrack:) keyEquivalent:@""];
[songItem setTarget:self];
- [songItem setRepresentedObject:[NSNumber numberWithInt:i]];
+ [songItem setRepresentedObject:[NSNumber numberWithInt:i
+ 1
]];
[upcomingSongsMenu addItem:songItem];
[songItem release];
} else {
[upcomingSongsMenu addItem:songItem];
[songItem release];
} else {
@@
-494,7
+494,7
@@
Things to do:
NSMenuItem *tempItem;
tempItem = [[NSMenuItem alloc] initWithTitle:playlistName action:@selector(selectPlaylist:) keyEquivalent:@""];
[tempItem setTarget:self];
NSMenuItem *tempItem;
tempItem = [[NSMenuItem alloc] initWithTitle:playlistName action:@selector(selectPlaylist:) keyEquivalent:@""];
[tempItem setTarget:self];
- [tempItem setRepresentedObject:[NSNumber numberWithInt:i]];
+ [tempItem setRepresentedObject:[NSNumber numberWithInt:i
+ 1
]];
[playlistMenu addItem:tempItem];
[tempItem release];
}
[playlistMenu addItem:tempItem];
[tempItem release];
}
@@
-583,7
+583,7
@@
Things to do:
int playlist = [currentRemote currentPlaylistIndex];
if (trackPlayingIndex != lastSongIndex) {
int playlist = [currentRemote currentPlaylistIndex];
if (trackPlayingIndex != lastSongIndex) {
-
bool
wasPlayingRadio = isPlayingRadio;
+
BOOL
wasPlayingRadio = isPlayingRadio;
isPlayingRadio = [[currentRemote classOfPlaylistAtIndex:playlist] isEqualToString:@"radio tuner playlist"];
if (isPlayingRadio && !wasPlayingRadio) {
int i;
isPlayingRadio = [[currentRemote classOfPlaylistAtIndex:playlist] isEqualToString:@"radio tuner playlist"];
if (isPlayingRadio && !wasPlayingRadio) {
int i;
@@
-603,7
+603,7
@@
Things to do:
else
{
if (playlist != [currentRemote currentPlaylistIndex]) {
else
{
if (playlist != [currentRemote currentPlaylistIndex]) {
-
bool
wasPlayingRadio = isPlayingRadio;
+
BOOL
wasPlayingRadio = isPlayingRadio;
isPlayingRadio = [[currentRemote classOfPlaylistAtIndex:playlist] isEqualToString:@"radio tuner playlist"];
if (isPlayingRadio && !wasPlayingRadio) {
int i;
isPlayingRadio = [[currentRemote classOfPlaylistAtIndex:playlist] isEqualToString:@"radio tuner playlist"];
if (isPlayingRadio && !wasPlayingRadio) {
int i;
@@
-701,8
+701,8
@@
Things to do:
[currentRemote pause];
[playPauseMenuItem setTitle:@"Play"];
} else if ((state == forwarding) || (state == rewinding)) {
[currentRemote pause];
[playPauseMenuItem setTitle:@"Play"];
} else if ((state == forwarding) || (state == rewinding)) {
- [currentRemote play];
[currentRemote pause];
[currentRemote pause];
+ [currentRemote play];
} else {
[currentRemote play];
[playPauseMenuItem setTitle:@"Pause"];
} else {
[currentRemote play];
[playPauseMenuItem setTitle:@"Pause"];
@@
-722,11
+722,13
@@
Things to do:
- (void)fastForward:(id)sender
{
[currentRemote fastForward];
- (void)fastForward:(id)sender
{
[currentRemote fastForward];
+ [playPauseMenuItem setTitle:@"Play"];
}
- (void)rewind:(id)sender
{
[currentRemote rewind];
}
- (void)rewind:(id)sender
{
[currentRemote rewind];
+ [playPauseMenuItem setTitle:@"Play"];
}
//
}
//
@@
-772,7
+774,7
@@
Things to do:
- (void)showCurrentTrackInfo
{
NSString *trackName = [currentRemote currentSongTitle];
- (void)showCurrentTrackInfo
{
NSString *trackName = [currentRemote currentSongTitle];
- if (!status
Controller
&& [trackName length]) {
+ if (!status
Window
&& [trackName length]) {
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSString *stringToShow = @"";
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSString *stringToShow = @"";
@@
-812,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)
[NSTimer scheduledTimerWithTimeInterval:3.0
target:self
selector:@selector(fadeAndCloseStatusWindow)
@@
-825,7
+826,7
@@
Things to do:
- (void)showUpcomingSongs
{
int curPlaylist = [currentRemote currentPlaylistIndex];
- (void)showUpcomingSongs
{
int curPlaylist = [currentRemote currentPlaylistIndex];
- if (!status
Controller
) {
+ if (!status
Window
) {
int numSongs = [currentRemote numberOfSongsInPlaylistAtIndex:curPlaylist];
if (numSongs > 0) {
int numSongs = [currentRemote numberOfSongsInPlaylistAtIndex:curPlaylist];
if (numSongs > 0) {
@@
-834,7
+835,7
@@
Things to do:
int i;
NSString *songs = @"";
int i;
NSString *songs = @"";
- status
Controller = [[StatusWindowController alloc] init
];
+ status
Window = [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];
@@
-842,7
+843,7
@@
Things to do:
songs = [songs stringByAppendingString:@"\n"];
}
}
songs = [songs stringByAppendingString:@"\n"];
}
}
- [status
Controller
setUpcomingSongs:songs];
+ [status
Window
setUpcomingSongs:songs];
[NSTimer scheduledTimerWithTimeInterval:3.0
target:self
selector:@selector(fadeAndCloseStatusWindow)
[NSTimer scheduledTimerWithTimeInterval:3.0
target:self
selector:@selector(fadeAndCloseStatusWindow)
@@
-854,9
+855,7
@@
Things to do:
- (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