Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add [EyeTunes quit] method to match [EyeTunes launch]

  • Loading branch information...
commit ef9000679b9187e5e1a783b73055599874956468 1 parent ffc4462
Chris Lee clee authored k7d committed

Showing 2 changed files with 7 additions and 0 deletions. Show diff stats Hide diff stats

  1. +3 0  ETEyeTunes.h
  2. +4 0 ETEyeTunes.m
3  ETEyeTunes.h
@@ -50,6 +50,9 @@
50 50 //Launch the iTunes app, if iTunes it already running the window will take focus
51 51 + (void)launch;
52 52
  53 +//Quit the iTunes app, if it's running
  54 ++ (void)quit;
  55 +
53 56 //Check if the iTunes app is running
54 57 + (BOOL)isRunning;
55 58
4 ETEyeTunes.m
@@ -62,6 +62,10 @@ + (void)launch{
62 62 [[NSWorkspace sharedWorkspace] launchApplication:@"iTunes"];
63 63 }
64 64
  65 ++ (void)quit{
  66 + [[NSRunningApplication runningApplicationsWithBundleIdentifier:@"com.apple.iTunes"] makeObjectsPerformSelector:@selector(terminate)];
  67 +}
  68 +
65 69 + (BOOL)isRunning{
66 70 //TODO: It is strongly suggested that you use the NSWorkspace runningApplications method and the NSRunningApplication class to retrieve this information in applications targeted for Mac OS X v10.6 and later.
67 71 NSInteger i;

0 comments on commit ef90006

Please sign in to comment.
Something went wrong with that request. Please try again.