X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/b936ca5ffb6320a3febce6a7d0c2875b072ac6bc..ce07e58f56b64ce6eea89ecbd66fa7bb8af57519:/MainController.m diff --git a/MainController.m b/MainController.m index ea44696..16738a3 100755 --- a/MainController.m +++ b/MainController.m @@ -294,6 +294,7 @@ static MainController *sharedController; [[HotKeyCenter sharedCenter] removeHotKey:@"NextTrack"]; [[HotKeyCenter sharedCenter] removeHotKey:@"PrevTrack"]; [[HotKeyCenter sharedCenter] removeHotKey:@"TrackInfo"]; + [[HotKeyCenter sharedCenter] removeHotKey:@"ShowPlayer"]; [[HotKeyCenter sharedCenter] removeHotKey:@"UpcomingSongs"]; [[HotKeyCenter sharedCenter] removeHotKey:@"ToggleLoop"]; [[HotKeyCenter sharedCenter] removeHotKey:@"ToggleShuffle"]; @@ -323,6 +324,12 @@ static MainController *sharedController; target:self action:@selector(prevSong)]; } + if ([df objectForKey:@"ShowPlayer"] != nil) { + [[HotKeyCenter sharedCenter] addHotKey:@"ShowPlayer" + combo:[df keyComboForKey:@"ShowPlayer"] + target:self action:@selector(showPlayer)]; + } + if ([df objectForKey:@"TrackInfo"] != nil) { [[HotKeyCenter sharedCenter] addHotKey:@"TrackInfo" combo:[df keyComboForKey:@"TrackInfo"] @@ -540,7 +547,12 @@ static MainController *sharedController; [currentRemote begin]; [self setLatestSongIdentifier:@""]; [self timerUpdate]; - [NSThread detachNewThreadSelector:@selector(startTimerInNewThread) toTarget:self withObject:nil]; + refreshTimer = [[NSTimer scheduledTimerWithTimeInterval:0.5 + target:self + selector:@selector(timerUpdate) + userInfo:nil + repeats:YES] retain]; + //[NSThread detachNewThreadSelector:@selector(startTimerInNewThread) toTarget:self withObject:nil]; [self setupHotKeys]; playerRunningState = ITMTRemotePlayerRunning; }