{
IBClasses = (
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
- {CLASS = KeyBroadcaster; LANGUAGE = ObjC; SUPERCLASS = NSButton; },
+ {CLASS = ITKeyBroadcaster; LANGUAGE = ObjC; SUPERCLASS = NSButton; },
{
ACTIONS = {
cancelHotKey = id;
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
- <string>4 45 356 240 0 0 1152 746 </string>
+ <string>3 45 356 240 0 0 1024 746 </string>
<key>IBFramework Version</key>
<string>291.0</string>
<key>IBGroupedObjects</key>
<key>IBOpenObjects</key>
<array>
<integer>6</integer>
+ <integer>115</integer>
</array>
<key>IBSystem Version</key>
<string>6L60</string>
#import "MainController.h"
#import "MenuController.h"
#import "PreferencesController.h"
-#import "HotKeyCenter.h"
+#import <ITKit/ITHotKeyCenter.h>
#import "StatusWindowController.h"
#import "StatusItemHack.h"
- (void)clearHotKeys
{
- [[HotKeyCenter sharedCenter] removeHotKey:@"PlayPause"];
- [[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"];
- [[HotKeyCenter sharedCenter] removeHotKey:@"IncrementVolume"];
- [[HotKeyCenter sharedCenter] removeHotKey:@"DecrementVolume"];
- [[HotKeyCenter sharedCenter] removeHotKey:@"IncrementRating"];
- [[HotKeyCenter sharedCenter] removeHotKey:@"DecrementRating"];
+ [[ITHotKeyCenter sharedCenter] removeHotKey:@"PlayPause"];
+ [[ITHotKeyCenter sharedCenter] removeHotKey:@"NextTrack"];
+ [[ITHotKeyCenter sharedCenter] removeHotKey:@"PrevTrack"];
+ [[ITHotKeyCenter sharedCenter] removeHotKey:@"TrackInfo"];
+ [[ITHotKeyCenter sharedCenter] removeHotKey:@"ShowPlayer"];
+ [[ITHotKeyCenter sharedCenter] removeHotKey:@"UpcomingSongs"];
+ [[ITHotKeyCenter sharedCenter] removeHotKey:@"ToggleLoop"];
+ [[ITHotKeyCenter sharedCenter] removeHotKey:@"ToggleShuffle"];
+ [[ITHotKeyCenter sharedCenter] removeHotKey:@"IncrementVolume"];
+ [[ITHotKeyCenter sharedCenter] removeHotKey:@"DecrementVolume"];
+ [[ITHotKeyCenter sharedCenter] removeHotKey:@"IncrementRating"];
+ [[ITHotKeyCenter sharedCenter] removeHotKey:@"DecrementRating"];
}
- (void)setupHotKeys
{
if ([df objectForKey:@"PlayPause"] != nil) {
- [[HotKeyCenter sharedCenter] addHotKey:@"PlayPause"
- combo:[df keyComboForKey:@"PlayPause"]
+ [[ITHotKeyCenter sharedCenter] addHotKey:@"PlayPause"
+ combo:[ITKeyCombo keyComboWithPlistRepresentation:[df objectForKey:@"PlayPause"]]
target:self action:@selector(playPause)];
}
if ([df objectForKey:@"NextTrack"] != nil) {
- [[HotKeyCenter sharedCenter] addHotKey:@"NextTrack"
- combo:[df keyComboForKey:@"NextTrack"]
+ [[ITHotKeyCenter sharedCenter] addHotKey:@"NextTrack"
+ combo:[ITKeyCombo keyComboWithPlistRepresentation:[df objectForKey:@"NextTrack"]]
target:self action:@selector(nextSong)];
}
if ([df objectForKey:@"PrevTrack"] != nil) {
- [[HotKeyCenter sharedCenter] addHotKey:@"PrevTrack"
- combo:[df keyComboForKey:@"PrevTrack"]
+ [[ITHotKeyCenter sharedCenter] addHotKey:@"PrevTrack"
+ combo:[ITKeyCombo keyComboWithPlistRepresentation:[df objectForKey:@"PrevTrack"]]
target:self action:@selector(prevSong)];
}
if ([df objectForKey:@"ShowPlayer"] != nil) {
- [[HotKeyCenter sharedCenter] addHotKey:@"ShowPlayer"
- combo:[df keyComboForKey:@"ShowPlayer"]
+ [[ITHotKeyCenter sharedCenter] addHotKey:@"ShowPlayer"
+ combo:[ITKeyCombo keyComboWithPlistRepresentation:[df objectForKey:@"ShowPlayer"]]
target:self action:@selector(showPlayer)];
}
if ([df objectForKey:@"TrackInfo"] != nil) {
- [[HotKeyCenter sharedCenter] addHotKey:@"TrackInfo"
- combo:[df keyComboForKey:@"TrackInfo"]
+ [[ITHotKeyCenter sharedCenter] addHotKey:@"TrackInfo"
+ combo:[ITKeyCombo keyComboWithPlistRepresentation:[df objectForKey:@"TrackInfo"]]
target:self action:@selector(showCurrentTrackInfo)];
}
if ([df objectForKey:@"UpcomingSongs"] != nil) {
- [[HotKeyCenter sharedCenter] addHotKey:@"UpcomingSongs"
- combo:[df keyComboForKey:@"UpcomingSongs"]
+ [[ITHotKeyCenter sharedCenter] addHotKey:@"UpcomingSongs"
+ combo:[ITKeyCombo keyComboWithPlistRepresentation:[df objectForKey:@"UpcomingSongs"]]
target:self action:@selector(showUpcomingSongs)];
}
if ([df objectForKey:@"ToggleLoop"] != nil) {
- [[HotKeyCenter sharedCenter] addHotKey:@"ToggleLoop"
- combo:[df keyComboForKey:@"ToggleLoop"]
+ [[ITHotKeyCenter sharedCenter] addHotKey:@"ToggleLoop"
+ combo:[ITKeyCombo keyComboWithPlistRepresentation:[df objectForKey:@"ToggleLoop"]]
target:self action:@selector(toggleLoop)];
}
if ([df objectForKey:@"ToggleShuffle"] != nil) {
- [[HotKeyCenter sharedCenter] addHotKey:@"ToggleShuffle"
- combo:[df keyComboForKey:@"ToggleShuffle"]
+ [[ITHotKeyCenter sharedCenter] addHotKey:@"ToggleShuffle"
+ combo:[ITKeyCombo keyComboWithPlistRepresentation:[df objectForKey:@"ToggleShuffle"]]
target:self action:@selector(toggleShuffle)];
}
if ([df objectForKey:@"IncrementVolume"] != nil) {
- [[HotKeyCenter sharedCenter] addHotKey:@"IncrementVolume"
- combo:[df keyComboForKey:@"IncrementVolume"]
+ [[ITHotKeyCenter sharedCenter] addHotKey:@"IncrementVolume"
+ combo:[ITKeyCombo keyComboWithPlistRepresentation:[df objectForKey:@"IncrementVolume"]]
target:self action:@selector(incrementVolume)];
}
if ([df objectForKey:@"DecrementVolume"] != nil) {
- [[HotKeyCenter sharedCenter] addHotKey:@"DecrementVolume"
- combo:[df keyComboForKey:@"DecrementVolume"]
+ [[ITHotKeyCenter sharedCenter] addHotKey:@"DecrementVolume"
+ combo:[ITKeyCombo keyComboWithPlistRepresentation:[df objectForKey:@"DecrementVolume"]]
target:self action:@selector(decrementVolume)];
}
if ([df objectForKey:@"IncrementRating"] != nil) {
- [[HotKeyCenter sharedCenter] addHotKey:@"IncrementRating"
- combo:[df keyComboForKey:@"IncrementRating"]
+ [[ITHotKeyCenter sharedCenter] addHotKey:@"IncrementRating"
+ combo:[ITKeyCombo keyComboWithPlistRepresentation:[df objectForKey:@"IncrementRating"]]
target:self action:@selector(incrementRating)];
}
if ([df objectForKey:@"DecrementRating"] != nil) {
- [[HotKeyCenter sharedCenter] addHotKey:@"DecrementRating"
- combo:[df keyComboForKey:@"DecrementRating"]
+ [[ITHotKeyCenter sharedCenter] addHotKey:@"DecrementRating"
+ combo:[ITKeyCombo keyComboWithPlistRepresentation:[df objectForKey:@"DecrementRating"]]
target:self action:@selector(decrementRating)];
}
}
#import "MenuController.h"
#import "MainController.h"
-#import "HotKeyCenter.h"
-#import "KeyCombo.h"
+#import <ITKit/ITHotKeyCenter.h>
+#import <ITKit/ITKeyCombo.h>
@interface MenuController (SubmenuMethods)
- (NSMenu *)ratingMenu;
NSString *nextObject;
NSMenuItem *tempItem;
NSEnumerator *itemEnum;
- KeyCombo *keyCombo;
+ ITKeyCombo *keyCombo;
//Get the information
_currentPlaylist = [currentRemote currentPlaylistIndex];
[tempItem setTag:MTMenuPlayPauseItem];
[tempItem setTarget:self];
- if ( (keyCombo = [[HotKeyCenter sharedCenter] keyComboForName:@"PlayPause"]) ) {
+ /*if ( (keyCombo = [[ITHotKeyCenter sharedCenter] keyComboForName:@"PlayPause"]) ) {
[self setKeyEquivalentForCode:[keyCombo keyCode]
andModifiers:[keyCombo modifiers]
onItem:tempItem];
- }
+ }*/ // FIX ME!
switch ([currentRemote playerPlayingState]) {
case ITMTRemotePlayerPlaying:
action:@selector(performMainMenuAction:)
keyEquivalent:@""];
- if ( (keyCombo = [[HotKeyCenter sharedCenter] keyComboForName:@"NextTrack"]) ) {
+ /*if ( (keyCombo = [[ITHotKeyCenter sharedCenter] keyComboForName:@"NextTrack"]) ) {
[self setKeyEquivalentForCode:[keyCombo keyCode]
andModifiers:[keyCombo modifiers]
onItem:tempItem];
- }
+ }*/ // FIX ME!
if (_currentPlaylist) {
[tempItem setTag:MTMenuNextTrackItem];
action:@selector(performMainMenuAction:)
keyEquivalent:@""];
- if ( (keyCombo = [[HotKeyCenter sharedCenter] keyComboForName:@"PrevTrack"]) ) {
+ /*if ( (keyCombo = [[ITHotKeyCenter sharedCenter] keyComboForName:@"PrevTrack"]) ) {
[self setKeyEquivalentForCode:[keyCombo keyCode]
andModifiers:[keyCombo modifiers]
onItem:tempItem];
- }
+ }*/ // FIX ME!
if (_currentPlaylist) {
[tempItem setTag:MTMenuPreviousTrackItem];
action:@selector(performMainMenuAction:)
keyEquivalent:@""];
- if ( (keyCombo = [[HotKeyCenter sharedCenter] keyComboForName:@"ShowPlayer"]) ) {
+ /*if ( (keyCombo = [[ITHotKeyCenter sharedCenter] keyComboForName:@"ShowPlayer"]) ) {
[self setKeyEquivalentForCode:[keyCombo keyCode]
andModifiers:[keyCombo modifiers]
onItem:tempItem];
- }
+ }*/ // FIX ME!
[tempItem setTarget:self];
[tempItem setTag:MTMenuShowPlayerItem];
* Original Author : Kent Sutherland <ksuther@ithinksw.com>
* Responsibility : Kent Sutherland <ksuther@ithinksw.com>
*
- * Copyright (c) 2002 The iThink Group.
+ * Copyright (c) 2002 iThink Software.
* All Rights Reserved
*
*/
#import "MenuTunes.h"
-#import "HotKeyCenter.h"
+#import <ITKit/ITHotKeyCenter.h>
@implementation MenuTunes
- (void)sendEvent:(NSEvent *)event
{
- [[HotKeyCenter sharedCenter] sendEvent:event];
+ [[ITHotKeyCenter sharedCenter] sendEvent:event];
[super sendEvent:event];
}
for (i = 0; i < [myMenu count]; i++) {
NSString *item = [myMenu objectAtIndex:i];
if ([item isEqualToString:@"Play/Pause"]) {
- KeyCombo *tempCombo = [[NSUserDefaults standardUserDefaults] keyComboForKey:@"PlayPause"];
+ ITKeyCombo *tempCombo = [[NSUserDefaults standardUserDefaults] keyComboForKey:@"PlayPause"];
playPauseItem = [menu addItemWithTitle:@"Play"
action:@selector(playPause:)
keyEquivalent:@""];
[tempCombo release];
}
} else if ([item isEqualToString:@"Next Track"]) {
- KeyCombo *tempCombo = [[NSUserDefaults standardUserDefaults] keyComboForKey:@"NextTrack"];
+ ITKeyCombo *tempCombo = [[NSUserDefaults standardUserDefaults] keyComboForKey:@"NextTrack"];
NSMenuItem *nextTrack = [menu addItemWithTitle:@"Next Track"
action:@selector(nextSong:)
keyEquivalent:@""];
[tempCombo release];
}
} else if ([item isEqualToString:@"Previous Track"]) {
- KeyCombo *tempCombo = [[NSUserDefaults standardUserDefaults] keyComboForKey:@"PrevTrack"];
+ ITKeyCombo *tempCombo = [[NSUserDefaults standardUserDefaults] keyComboForKey:@"PrevTrack"];
NSMenuItem *prevTrack = [menu addItemWithTitle:@"Previous Track"
action:@selector(prevSong:)
keyEquivalent:@""];
- (void)clearHotKeys
{
- [[HotKeyCenter sharedCenter] removeHotKey:@"PlayPause"];
- [[HotKeyCenter sharedCenter] removeHotKey:@"NextTrack"];
- [[HotKeyCenter sharedCenter] removeHotKey:@"PrevTrack"];
- [[HotKeyCenter sharedCenter] removeHotKey:@"ToggleVisualizer"];
- [[HotKeyCenter sharedCenter] removeHotKey:@"TrackInfo"];
- [[HotKeyCenter sharedCenter] removeHotKey:@"UpcomingSongs"];
- [[HotKeyCenter sharedCenter] removeHotKey:@"ToggleLoop"];
- [[HotKeyCenter sharedCenter] removeHotKey:@"ToggleShuffle"];
- [[HotKeyCenter sharedCenter] removeHotKey:@"IncrementVolume"];
- [[HotKeyCenter sharedCenter] removeHotKey:@"DecrementVolume"];
- [[HotKeyCenter sharedCenter] removeHotKey:@"IncrementRating"];
- [[HotKeyCenter sharedCenter] removeHotKey:@"DecrementRating"];
+ [[ITHotKeyCenter sharedCenter] removeHotKey:@"PlayPause"];
+ [[ITHotKeyCenter sharedCenter] removeHotKey:@"NextTrack"];
+ [[ITHotKeyCenter sharedCenter] removeHotKey:@"PrevTrack"];
+ [[ITHotKeyCenter sharedCenter] removeHotKey:@"ToggleVisualizer"];
+ [[ITHotKeyCenter sharedCenter] removeHotKey:@"TrackInfo"];
+ [[ITHotKeyCenter sharedCenter] removeHotKey:@"UpcomingSongs"];
+ [[ITHotKeyCenter sharedCenter] removeHotKey:@"ToggleLoop"];
+ [[ITHotKeyCenter sharedCenter] removeHotKey:@"ToggleShuffle"];
+ [[ITHotKeyCenter sharedCenter] removeHotKey:@"IncrementVolume"];
+ [[ITHotKeyCenter sharedCenter] removeHotKey:@"DecrementVolume"];
+ [[ITHotKeyCenter sharedCenter] removeHotKey:@"IncrementRating"];
+ [[ITHotKeyCenter sharedCenter] removeHotKey:@"DecrementRating"];
}
- (void)setupHotKeys
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
if ([defaults objectForKey:@"PlayPause"] != nil) {
- [[HotKeyCenter sharedCenter] addHotKey:@"PlayPause"
+ [[ITHotKeyCenter sharedCenter] addHotKey:@"PlayPause"
combo:[defaults keyComboForKey:@"PlayPause"]
target:self action:@selector(playPause:)];
}
if ([defaults objectForKey:@"NextTrack"] != nil) {
- [[HotKeyCenter sharedCenter] addHotKey:@"NextTrack"
+ [[ITHotKeyCenter sharedCenter] addHotKey:@"NextTrack"
combo:[defaults keyComboForKey:@"NextTrack"]
target:self action:@selector(nextSong:)];
}
if ([defaults objectForKey:@"PrevTrack"] != nil) {
- [[HotKeyCenter sharedCenter] addHotKey:@"PrevTrack"
+ [[ITHotKeyCenter sharedCenter] addHotKey:@"PrevTrack"
combo:[defaults keyComboForKey:@"PrevTrack"]
target:self action:@selector(prevSong:)];
}
if ([defaults objectForKey:@"ToggleVisualizer"] != nil) {
- [[HotKeyCenter sharedCenter] addHotKey:@"ToggleVisualizer"
+ [[ITHotKeyCenter sharedCenter] addHotKey:@"ToggleVisualizer"
combo:[defaults keyComboForKey:@"ToggleVisualizer"]
target:self action:@selector(toggleVisualizer)];
}
if ([defaults objectForKey:@"TrackInfo"] != nil) {
- [[HotKeyCenter sharedCenter] addHotKey:@"TrackInfo"
+ [[ITHotKeyCenter sharedCenter] addHotKey:@"TrackInfo"
combo:[defaults keyComboForKey:@"TrackInfo"]
target:self action:@selector(showCurrentTrackInfoStatusWindow)];
}
if ([defaults objectForKey:@"UpcomingSongs"] != nil) {
- [[HotKeyCenter sharedCenter] addHotKey:@"UpcomingSongs"
+ [[ITHotKeyCenter sharedCenter] addHotKey:@"UpcomingSongs"
combo:[defaults keyComboForKey:@"UpcomingSongs"]
target:self action:@selector(showUpcomingSongsStatusWindow)];
}
if ([defaults objectForKey:@"ToggleLoop"] != nil) {
- [[HotKeyCenter sharedCenter] addHotKey:@"ToggleLoop"
+ [[ITHotKeyCenter sharedCenter] addHotKey:@"ToggleLoop"
combo:[defaults keyComboForKey:@"ToggleLoop"]
target:self action:@selector(showToggleLoopStatusWindow)];
}
if ([defaults objectForKey:@"ToggleShuffle"] != nil) {
- [[HotKeyCenter sharedCenter] addHotKey:@"ToggleShuffle"
+ [[ITHotKeyCenter sharedCenter] addHotKey:@"ToggleShuffle"
combo:[defaults keyComboForKey:@"ToggleShuffle"]
target:self action:@selector(showToggleShuffleStatusWindow)];
}
if ([defaults objectForKey:@"IncrementVolume"] != nil) {
- [[HotKeyCenter sharedCenter] addHotKey:@"IncrementVolume"
+ [[ITHotKeyCenter sharedCenter] addHotKey:@"IncrementVolume"
combo:[defaults keyComboForKey:@"IncrementVolume"]
target:self action:@selector(showVolumeIncrementStatusWindow)];
}
if ([defaults objectForKey:@"DecrementVolume"] != nil) {
- [[HotKeyCenter sharedCenter] addHotKey:@"DecrementVolume"
+ [[ITHotKeyCenter sharedCenter] addHotKey:@"DecrementVolume"
combo:[defaults keyComboForKey:@"DecrementVolume"]
target:self action:@selector(showVolumeDecrementStatusWindow)];
}
if ([defaults objectForKey:@"IncrementRating"] != nil) {
- [[HotKeyCenter sharedCenter] addHotKey:@"IncrementRating"
+ [[ITHotKeyCenter sharedCenter] addHotKey:@"IncrementRating"
combo:[defaults keyComboForKey:@"IncrementRating"]
target:self action:@selector(showRatingIncrementStatusWindow)];
}
if ([defaults objectForKey:@"DecrementRating"] != nil) {
- [[HotKeyCenter sharedCenter] addHotKey:@"DecrementRating"
+ [[ITHotKeyCenter sharedCenter] addHotKey:@"DecrementRating"
combo:[defaults keyComboForKey:@"DecrementRating"]
target:self action:@selector(showRatingDecrementStatusWindow)];
}
#import <Cocoa/Cocoa.h>
-@class MainController, KeyCombo;
+@class MainController, ITKeyCombo;
@interface PreferencesController : NSObject
{
NSMutableArray *myItems;
NSArray *submenuItems;
- KeyCombo *combo;
+ ITKeyCombo *combo;
NSString *currentHotKey;
NSMutableDictionary *hotKeysDictionary;
}
- (IBAction)okHotKey:(id)sender;
- (void)setCurrentHotKey:(NSString *)key;
-- (void)setKeyCombo:(KeyCombo *)newCombo;
+- (void)setKeyCombo:(ITKeyCombo *)newCombo;
@end
#import "PreferencesController.h"
#import "MainController.h"
-#import "HotKeyCenter.h"
+#import <ITKit/ITHotKeyCenter.h>
#import <ITKit/ITWindowPositioning.h>
#define SENDER_STATE (([sender state] == NSOnState) ? YES : NO)
- (IBAction)clearHotKey:(id)sender
{
- [self setKeyCombo:[KeyCombo clearKeyCombo]];
+ [self setKeyCombo:[ITKeyCombo clearKeyCombo]];
}
- (IBAction)okHotKey:(id)sender
{
- NSString *string = [combo userDisplayRep];
+ NSString *string = [combo description];
NSEnumerator *enumerator = [hotKeysDictionary keyEnumerator];
NSString *enumKey;
while ( (enumKey = [enumerator nextObject]) ) {
if (![enumKey isEqualToString:currentHotKey]) {
- if (![combo isEqual:[KeyCombo clearKeyCombo]] &&
+ if (![combo isEqual:[ITKeyCombo clearKeyCombo]] &&
[combo isEqual:[hotKeysDictionary objectForKey:enumKey]]) {
[window setLevel:NSNormalWindowLevel];
if ( NSRunAlertPanel(NSLocalizedString(@"duplicateCombo", @"Duplicate Key Combo") , NSLocalizedString(@"duplicateCombo_msg", @"The specified key combo is already in use..."), NSLocalizedString(@"replace", @"Replace"), NSLocalizedString(@"cancel", @"Cancel"), nil) ) {
- [hotKeysDictionary setObject:[KeyCombo clearKeyCombo] forKey:currentHotKey];
+ [hotKeysDictionary setObject:[ITKeyCombo clearKeyCombo] forKey:currentHotKey];
if ([enumKey isEqualToString:@"PlayPause"]) {
[playPauseButton setTitle:@""];
} else if ([enumKey isEqualToString:@"NextTrack"]) {
} else if ([enumKey isEqualToString:@"ToggleLoop"]) {
[toggleLoopButton setTitle:@""];
}
- [df setKeyCombo:[KeyCombo clearKeyCombo] forKey:enumKey];
+ [df setObject:[[ITKeyCombo clearKeyCombo] plistRepresentation] forKey:enumKey];
} else {
return;
}
}
[hotKeysDictionary setObject:combo forKey:currentHotKey];
- [df setKeyCombo:combo forKey:currentHotKey];
+ [df setObject:[combo plistRepresentation] forKey:currentHotKey];
if ([currentHotKey isEqualToString:@"PlayPause"]) {
[playPauseButton setTitle:string];
- //[[HotKeyCenter sharedCenter] addHotKey:@"PlayPause" combo:combo target:[MainController sharedController] action:@selector(playPause)];
+ //[[ITHotKeyCenter sharedCenter] addHotKey:@"PlayPause" combo:combo target:[MainController sharedController] action:@selector(playPause)];
} else if ([currentHotKey isEqualToString:@"NextTrack"]) {
[nextTrackButton setTitle:string];
- //[[HotKeyCenter sharedCenter] addHotKey:@"NextTrack" combo:combo target:[MainController sharedController] action:@selector(nextSong)];
+ //[[ITHotKeyCenter sharedCenter] addHotKey:@"NextTrack" combo:combo target:[MainController sharedController] action:@selector(nextSong)];
} else if ([currentHotKey isEqualToString:@"PrevTrack"]) {
[previousTrackButton setTitle:string];
- //[[HotKeyCenter sharedCenter] addHotKey:@"PrevTrack" combo:combo target:[MainController sharedController] action:@selector(prevSong)];
+ //[[ITHotKeyCenter sharedCenter] addHotKey:@"PrevTrack" combo:combo target:[MainController sharedController] action:@selector(prevSong)];
} else if ([currentHotKey isEqualToString:@"ShowPlayer"]) {
[showPlayerButton setTitle:string];
- //[[HotKeyCenter sharedCenter] addHotKey:@"ShowPlayer" combo:combo target:[MainController sharedController] action:@selector(showPlayer)];
+ //[[ITHotKeyCenter sharedCenter] addHotKey:@"ShowPlayer" combo:combo target:[MainController sharedController] action:@selector(showPlayer)];
} else if ([currentHotKey isEqualToString:@"TrackInfo"]) {
[trackInfoButton setTitle:string];
- //[[HotKeyCenter sharedCenter] addHotKey:@"TrackInfo" combo:combo target:[MainController sharedController] action:@selector(showCurrentTrackInfo)];
+ //[[ITHotKeyCenter sharedCenter] addHotKey:@"TrackInfo" combo:combo target:[MainController sharedController] action:@selector(showCurrentTrackInfo)];
} else if ([currentHotKey isEqualToString:@"UpcomingSongs"]) {
[upcomingSongsButton setTitle:string];
- //[[HotKeyCenter sharedCenter] addHotKey:@"UpcomingSongs" combo:combo target:[MainController sharedController] action:@selector(showUpcomingSongs)];
+ //[[ITHotKeyCenter sharedCenter] addHotKey:@"UpcomingSongs" combo:combo target:[MainController sharedController] action:@selector(showUpcomingSongs)];
} else if ([currentHotKey isEqualToString:@"IncrementVolume"]) {
[volumeIncrementButton setTitle:string];
- //[[HotKeyCenter sharedCenter] addHotKey:@"IncrementVolume" combo:combo target:[MainController sharedController] action:@selector(incrementVolume)];
+ //[[ITHotKeyCenter sharedCenter] addHotKey:@"IncrementVolume" combo:combo target:[MainController sharedController] action:@selector(incrementVolume)];
} else if ([currentHotKey isEqualToString:@"DecrementVolume"]) {
[volumeDecrementButton setTitle:string];
- //[[HotKeyCenter sharedCenter] addHotKey:@"DecrementVolume" combo:combo target:[MainController sharedController] action:@selector(decrementVolume)];
+ //[[ITHotKeyCenter sharedCenter] addHotKey:@"DecrementVolume" combo:combo target:[MainController sharedController] action:@selector(decrementVolume)];
} else if ([currentHotKey isEqualToString:@"IncrementRating"]) {
[ratingIncrementButton setTitle:string];
- //[[HotKeyCenter sharedCenter] addHotKey:@"IncrementRating" combo:combo target:[MainController sharedController] action:@selector(incrementRating)];
+ //[[ITHotKeyCenter sharedCenter] addHotKey:@"IncrementRating" combo:combo target:[MainController sharedController] action:@selector(incrementRating)];
} else if ([currentHotKey isEqualToString:@"DecrementRating"]) {
[ratingDecrementButton setTitle:string];
- //[[HotKeyCenter sharedCenter] addHotKey:@"DecrementRating" combo:combo target:[MainController sharedController] action:@selector(decrementRating)];
+ //[[ITHotKeyCenter sharedCenter] addHotKey:@"DecrementRating" combo:combo target:[MainController sharedController] action:@selector(decrementRating)];
} else if ([currentHotKey isEqualToString:@"ToggleShuffle"]) {
[toggleShuffleButton setTitle:string];
- //[[HotKeyCenter sharedCenter] addHotKey:@"ToggleShuffle" combo:combo target:[MainController sharedController] action:@selector(toggleShuffle)];
+ //[[ITHotKeyCenter sharedCenter] addHotKey:@"ToggleShuffle" combo:combo target:[MainController sharedController] action:@selector(toggleShuffle)];
} else if ([currentHotKey isEqualToString:@"ToggleLoop"]) {
[toggleLoopButton setTitle:string];
- //[[HotKeyCenter sharedCenter] addHotKey:@"ToggleLoop" combo:combo target:[MainController sharedController] action:@selector(toggleLoop)];
+ //[[ITHotKeyCenter sharedCenter] addHotKey:@"ToggleLoop" combo:combo target:[MainController sharedController] action:@selector(toggleLoop)];
}
[controller setupHotKeys];
[self cancelHotKey:sender];
NSDictionary *info = [note userInfo];
short keyCode;
long modifiers;
- KeyCombo *newCombo;
+ ITKeyCombo *newCombo;
keyCode = [[info objectForKey:@"KeyCode"] shortValue];
modifiers = [[info objectForKey:@"Modifiers"] longValue];
- newCombo = [[KeyCombo alloc] initWithKeyCode:keyCode andModifiers:modifiers];
+ newCombo = [[ITKeyCombo alloc] initWithKeyCode:keyCode modifiers:modifiers];
[self setKeyCombo:newCombo];
}
-- (void)setKeyCombo:(KeyCombo *)newCombo
+- (void)setKeyCombo:(ITKeyCombo *)newCombo
{
NSString *string;
[combo release];
combo = [newCombo copy];
- string = [combo userDisplayRep];
+ string = [combo description];
if (string == nil) {
string = @"";
}
// Fill in hot key buttons
if ([df objectForKey:@"PlayPause"]) {
- anItem = [df keyComboForKey:@"PlayPause"];
+ anItem = [ITKeyCombo keyComboWithPlistRepresentation:[df objectForKey:@"PlayPause"]];
[hotKeysDictionary setObject:anItem forKey:@"PlayPause"];
- [playPauseButton setTitle:[anItem userDisplayRep]];
+ [playPauseButton setTitle:[anItem description]];
} else {
- [hotKeysDictionary setObject:[KeyCombo keyCombo] forKey:@"PlayPause"];
+ [hotKeysDictionary setObject:[ITKeyCombo clearKeyCombo] forKey:@"PlayPause"];
}
if ([df objectForKey:@"NextTrack"]) {
- anItem = [df keyComboForKey:@"NextTrack"];
+ anItem = [ITKeyCombo keyComboWithPlistRepresentation:[df objectForKey:@"NextTrack"]];
[hotKeysDictionary setObject:anItem forKey:@"NextTrack"];
- [nextTrackButton setTitle:[anItem userDisplayRep]];
+ [nextTrackButton setTitle:[anItem description]];
} else {
- [hotKeysDictionary setObject:[KeyCombo keyCombo] forKey:@"NextTrack"];
+ [hotKeysDictionary setObject:[ITKeyCombo clearKeyCombo] forKey:@"NextTrack"];
}
if ([df objectForKey:@"PrevTrack"]) {
- anItem = [df keyComboForKey:@"PrevTrack"];
+ anItem = [ITKeyCombo keyComboWithPlistRepresentation:[df objectForKey:@"PrevTrack"]];
[hotKeysDictionary setObject:anItem forKey:@"PrevTrack"];
- [previousTrackButton setTitle:[anItem userDisplayRep]];
+ [previousTrackButton setTitle:[anItem description]];
} else {
- [hotKeysDictionary setObject:[KeyCombo keyCombo] forKey:@"PrevTrack"];
+ [hotKeysDictionary setObject:[ITKeyCombo clearKeyCombo] forKey:@"PrevTrack"];
}
if ([df objectForKey:@"ShowPlayer"]) {
- anItem = [df keyComboForKey:@"ShowPlayer"];
+ anItem = [ITKeyCombo keyComboWithPlistRepresentation:[df objectForKey:@"ShowPlayer"]];
[hotKeysDictionary setObject:anItem forKey:@"ShowPlayer"];
- [showPlayerButton setTitle:[anItem userDisplayRep]];
+ [showPlayerButton setTitle:[anItem description]];
} else {
- [hotKeysDictionary setObject:[KeyCombo keyCombo] forKey:@"ShowPlayer"];
+ [hotKeysDictionary setObject:[ITKeyCombo clearKeyCombo] forKey:@"ShowPlayer"];
}
if ([df objectForKey:@"TrackInfo"]) {
- anItem = [df keyComboForKey:@"TrackInfo"];
+ anItem = [ITKeyCombo keyComboWithPlistRepresentation:[df objectForKey:@"TrackInfo"]];
[hotKeysDictionary setObject:anItem forKey:@"TrackInfo"];
- [trackInfoButton setTitle:[anItem userDisplayRep]];
+ [trackInfoButton setTitle:[anItem description]];
} else {
- [hotKeysDictionary setObject:[KeyCombo keyCombo] forKey:@"TrackInfo"];
+ [hotKeysDictionary setObject:[ITKeyCombo clearKeyCombo] forKey:@"TrackInfo"];
}
if ([df objectForKey:@"UpcomingSongs"]) {
- anItem = [df keyComboForKey:@"UpcomingSongs"];
+ anItem = [ITKeyCombo keyComboWithPlistRepresentation:[df objectForKey:@"UpcomingSongs"]];
[hotKeysDictionary setObject:anItem forKey:@"UpcomingSongs"];
- [upcomingSongsButton setTitle:[anItem userDisplayRep]];
+ [upcomingSongsButton setTitle:[anItem description]];
} else {
- [hotKeysDictionary setObject:[KeyCombo keyCombo] forKey:@"UpcomingSongs"];
+ [hotKeysDictionary setObject:[ITKeyCombo clearKeyCombo] forKey:@"UpcomingSongs"];
}
if ([df objectForKey:@"IncrementVolume"]) {
- anItem = [df keyComboForKey:@"IncrementVolume"];
+ anItem = [ITKeyCombo keyComboWithPlistRepresentation:[df objectForKey:@"IncrementVolume"]];
[hotKeysDictionary setObject:anItem forKey:@"IncrementVolume"];
- [volumeIncrementButton setTitle:[anItem userDisplayRep]];
+ [volumeIncrementButton setTitle:[anItem description]];
} else {
- [hotKeysDictionary setObject:[KeyCombo keyCombo] forKey:@"IncrementVolume"];
+ [hotKeysDictionary setObject:[ITKeyCombo clearKeyCombo] forKey:@"IncrementVolume"];
}
if ([df objectForKey:@"DecrementVolume"]) {
- anItem = [df keyComboForKey:@"DecrementVolume"];
+ anItem = [ITKeyCombo keyComboWithPlistRepresentation:[df objectForKey:@"DecrementVolume"]];
[hotKeysDictionary setObject:anItem forKey:@"DecrementVolume"];
- [volumeDecrementButton setTitle:[anItem userDisplayRep]];
+ [volumeDecrementButton setTitle:[anItem description]];
} else {
- [hotKeysDictionary setObject:[KeyCombo keyCombo] forKey:@"DecrementVolume"];
+ [hotKeysDictionary setObject:[ITKeyCombo clearKeyCombo] forKey:@"DecrementVolume"];
}
if ([df objectForKey:@"IncrementRating"]) {
- anItem = [df keyComboForKey:@"IncrementRating"];
+ anItem = [ITKeyCombo keyComboWithPlistRepresentation:[df objectForKey:@"IncrementRating"]];
[hotKeysDictionary setObject:anItem forKey:@"IncrementRating"];
- [ratingIncrementButton setTitle:[anItem userDisplayRep]];
+ [ratingIncrementButton setTitle:[anItem description]];
} else {
- [hotKeysDictionary setObject:[KeyCombo keyCombo] forKey:@"IncrementRating"];
+ [hotKeysDictionary setObject:[ITKeyCombo clearKeyCombo] forKey:@"IncrementRating"];
}
if ([df objectForKey:@"DecrementRating"]) {
- anItem = [df keyComboForKey:@"DecrementRating"];
+ anItem = [ITKeyCombo keyComboWithPlistRepresentation:[df objectForKey:@"DecrementRating"]];
[hotKeysDictionary setObject:anItem forKey:@"DecrementRating"];
- [ratingDecrementButton setTitle:[anItem userDisplayRep]];
+ [ratingDecrementButton setTitle:[anItem description]];
} else {
- [hotKeysDictionary setObject:[KeyCombo keyCombo] forKey:@"DecrementRating"];
+ [hotKeysDictionary setObject:[ITKeyCombo clearKeyCombo] forKey:@"DecrementRating"];
}
if ([df objectForKey:@"ToggleLoop"]) {
- anItem = [df keyComboForKey:@"ToggleLoop"];
+ anItem = [ITKeyCombo keyComboWithPlistRepresentation:[df objectForKey:@"ToggleLoop"]];
[hotKeysDictionary setObject:anItem forKey:@"ToggleLoop"];
- [toggleLoopButton setTitle:[anItem userDisplayRep]];
+ [toggleLoopButton setTitle:[anItem description]];
} else {
- [hotKeysDictionary setObject:[KeyCombo keyCombo] forKey:@"ToggleLoop"];
+ [hotKeysDictionary setObject:[ITKeyCombo clearKeyCombo] forKey:@"ToggleLoop"];
}
if ([df objectForKey:@"ToggleShuffle"]) {
- anItem = [df keyComboForKey:@"ToggleShuffle"];
+ anItem = [ITKeyCombo keyComboWithPlistRepresentation:[df objectForKey:@"ToggleShuffle"]];
[hotKeysDictionary setObject:anItem forKey:@"ToggleShuffle"];
- [toggleShuffleButton setTitle:[anItem userDisplayRep]];
+ [toggleShuffleButton setTitle:[anItem description]];
} else {
- [hotKeysDictionary setObject:[KeyCombo keyCombo] forKey:@"ToggleShuffle"];
+ [hotKeysDictionary setObject:[ITKeyCombo clearKeyCombo] forKey:@"ToggleShuffle"];
}
// Check current track info buttons
Owner: Kent Sutherland\
Status: Analyze\
Issue: Menu - Rebuild speed is abyssmal. It needs to take less than half a second. (Note [Joe] I believe something (not sure what) I did tonight fixed this.. double check for me, though, as I wasn't the one who reported this bug)\
-\
- Priority: SHOWSTOPPER\
- Owner: Kent Sutherland\
- Status: Analyze\
- Issue: HotKeys - FKeys (F1 - F15) must be made to work without a modifier key. (Note [Joe] It is my opinion that this is NOT a ShowStopper... we need to release, and this isn't required functionality. I'd much rather have MT out without this, making SOME money, while we prepare an update which fixes this)\
-\
+ \
Priority: SHOWSTOPPER\
Owner: Joseph Spiros\
Status: Build\
Owner: Kent Sutherland\
Status: Closed\
Issue: Preferences (Menu) - Show Player - Needs to show the player name (Show iTunes).\
+\
+ Priority: SHOWSTOPPER\
+ Owner: Kent Sutherland\
+ Status: Closed by Joseph Spiros\
+ Issue: HotKeys - FKeys (F1 - F15) must be made to work without a modifier key.\
\
Priority: SHOWSTOPPER\
Status: Closed\