git.ithinksw.org
/
MenuTunes.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bb84d84
)
Fixing two memory leaks and some inefficiency in iTunesRemote
author
Alexander Strange
<astrange@ithinksw.com>
Sat, 22 Feb 2003 05:27:14 +0000
(
05:27
+0000)
committer
Alexander Strange
<astrange@ithinksw.com>
Sat, 22 Feb 2003 05:27:14 +0000
(
05:27
+0000)
iTunesRemote.m
patch
|
blob
|
history
diff --git
a/iTunesRemote.m
b/iTunesRemote.m
index
5bab47e
..
23e6094
100755
(executable)
--- a/
iTunesRemote.m
+++ b/
iTunesRemote.m
@@
-52,9
+52,9
@@
- (BOOL)isAppRunning
{
NSArray *apps = [[NSWorkspace sharedWorkspace] launchedApplications];
- (BOOL)isAppRunning
{
NSArray *apps = [[NSWorkspace sharedWorkspace] launchedApplications];
- int i;
+ int i
,count = [apps count]
;
- for (i = 0; i <
[apps count]
; i++) {
+ for (i = 0; i <
count
; i++) {
if ([[[apps objectAtIndex:i] objectForKey:@"NSApplicationName"]
isEqualToString:@"iTunes"]) {
return YES;
if ([[[apps objectAtIndex:i] objectForKey:@"NSApplicationName"]
isEqualToString:@"iTunes"]) {
return YES;
@@
-91,7
+91,7
@@
[presets addObject:[self runScriptAndReturnResult:[NSString stringWithFormat:@"get name of playlist %i", i]]];
}
[presets addObject:[self runScriptAndReturnResult:[NSString stringWithFormat:@"get name of playlist %i", i]]];
}
- return [
NSArray arrayWithArray:presets
];
+ return [
presets autorelease
];
}
- (int)numberOfSongsInPlaylistAtIndex:(int)index
}
- (int)numberOfSongsInPlaylistAtIndex:(int)index
@@
-197,7
+197,7
@@
[presets addObject:[self runScriptAndReturnResult:[NSString stringWithFormat:@"get name of EQ preset %i", i]]];
}
[presets addObject:[self runScriptAndReturnResult:[NSString stringWithFormat:@"get name of EQ preset %i", i]]];
}
- return [
NSArray arrayWithArray:presets
];
+ return [
presets autorelease
];
}
- (int)currentEQPresetIndex
}
- (int)currentEQPresetIndex