git.ithinksw.org
/
MenuTunes.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Hotkeys set in the prefs will now properly update immediately.
[MenuTunes.git]
/
MainController.m
diff --git
a/MainController.m
b/MainController.m
index
e0230ff
..
906dca5
100755
(executable)
--- a/
MainController.m
+++ b/
MainController.m
@@
-10,11
+10,7
@@
#import "StatusWindowController.h"
#import "StatusItemHack.h"
#import "StatusWindowController.h"
#import "StatusItemHack.h"
-@interface NSImage (WeeAdditions)
-- (NSImage *)imageScaledSmoothlyToSize:(NSSize)scaledSize;
-@end
-
-@implementation NSImage (WeeAdditions)
+@implementation NSImage (SmoothAdditions)
- (NSImage *)imageScaledSmoothlyToSize:(NSSize)scaledSize
{
- (NSImage *)imageScaledSmoothlyToSize:(NSSize)scaledSize
{
@@
-264,7
+260,7
@@
static MainController *sharedController;
[self setupHotKeys];
if (![refreshTimer isValid]) {
[refreshTimer release];
[self setupHotKeys];
if (![refreshTimer isValid]) {
[refreshTimer release];
- refreshTimer = [[NSTimer scheduledTimerWithTimeInterval:
0.5
+ refreshTimer = [[NSTimer scheduledTimerWithTimeInterval:
([networkController isConnectedToServer] ? 10.0 : 0.5)
target:self
selector:@selector(timerUpdate)
userInfo:nil
target:self
selector:@selector(timerUpdate)
userInfo:nil
@@
-352,7
+348,7
@@
static MainController *sharedController;
while ( (nextScript = [scriptsEnum nextObject]) ) {
NSDictionary *error;
NSAppleScript *currentScript = [[NSAppleScript alloc] initWithContentsOfURL:[NSURL fileURLWithPath:[[NSHomeDirectory() stringByAppendingPathComponent:@"Library/Application Support/MenuTunes/Scripts"] stringByAppendingPathComponent:nextScript]] error:&error];
while ( (nextScript = [scriptsEnum nextObject]) ) {
NSDictionary *error;
NSAppleScript *currentScript = [[NSAppleScript alloc] initWithContentsOfURL:[NSURL fileURLWithPath:[[NSHomeDirectory() stringByAppendingPathComponent:@"Library/Application Support/MenuTunes/Scripts"] stringByAppendingPathComponent:nextScript]] error:&error];
-
NS
Log(@"Running script: %@", nextScript);
+
ITDebug
Log(@"Running script: %@", nextScript);
if (!currentScript || ![currentScript executeAndReturnError:nil]) {
ITDebugLog(@"Error running script %@.", nextScript);
}
if (!currentScript || ![currentScript executeAndReturnError:nil]) {
ITDebugLog(@"Error running script %@.", nextScript);
}
@@
-588,6
+584,11
@@
static MainController *sharedController;
//
//
//
//
+- (MenuController *)menuController
+{
+ return menuController;
+}
+
- (void)closePreferences
{
ITDebugLog(@"Preferences closed.");
- (void)closePreferences
{
ITDebugLog(@"Preferences closed.");
@@
-627,7
+628,7
@@
static MainController *sharedController;
ITHotKey *hotKey;
ITDebugLog(@"Setting up hot keys.");
ITHotKey *hotKey;
ITDebugLog(@"Setting up hot keys.");
- if (playerRunningState == ITMTRemotePlayerNotRunning) {
+ if (playerRunningState == ITMTRemotePlayerNotRunning
&& ![[NetworkController sharedController] isConnectedToServer]
) {
return;
}
return;
}
@@
-759,6
+760,7
@@
static MainController *sharedController;
NSString *title = nil;
NSString *album = nil;
NSString *artist = nil;
NSString *title = nil;
NSString *album = nil;
NSString *artist = nil;
+ NSString *composer = nil;
NSString *time = nil;
NSString *track = nil;
NSImage *art = nil;
NSString *time = nil;
NSString *track = nil;
NSImage *art = nil;
@@
-791,6
+793,14
@@
static MainController *sharedController;
NS_ENDHANDLER
}
NS_ENDHANDLER
}
+ if ( [df boolForKey:@"showComposer"] ) {
+ NS_DURING
+ composer = [[self currentRemote] currentSongComposer];
+ NS_HANDLER
+ [self networkError:localException];
+ NS_ENDHANDLER
+ }
+
if ( [df boolForKey:@"showTime"] ) {
NS_DURING
time = [NSString stringWithFormat:@"%@: %@ / %@",
if ( [df boolForKey:@"showTime"] ) {
NS_DURING
time = [NSString stringWithFormat:@"%@: %@ / %@",
@@
-853,6
+863,7
@@
static MainController *sharedController;
title:title
album:album
artist:artist
title:title
album:album
artist:artist
+ composer:composer
time:time
track:track
rating:rating
time:time
track:track
rating:rating