Skip to content

Commit

Permalink
Open the preferences when reopening the app. This makes it easier to …
Browse files Browse the repository at this point in the history
…access the preferences when the status item is hidden.
  • Loading branch information
ksuther committed Dec 11, 2013
1 parent a38281c commit d8cef53
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Spotify Notifications/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,16 @@ - (void)applicationDidFinishLaunching:(NSNotification *)notification{

}

- (BOOL)applicationShouldHandleReopen:(NSApplication *)sender hasVisibleWindows:(BOOL)flag{
if (!flag) {
// This makes it so you can open the preferences by reopning the app
// This way you can get to the preferences even when the status item is hidden
[self showPrefences:nil];
}

return YES;
}

- (IBAction)showSource:(id)sender{
[[NSWorkspace sharedWorkspace] openURL: [NSURL URLWithString:@"http://github.com/citruspi/Spotify-Notifications"]];
}
Expand Down

0 comments on commit d8cef53

Please sign in to comment.