Skip to content

Instantly share code, notes, and snippets.

@bjhomer
Last active December 24, 2015 22:49
Show Gist options
  • Save bjhomer/6875232 to your computer and use it in GitHub Desktop.
Save bjhomer/6875232 to your computer and use it in GitHub Desktop.
- (BOOL)shouldShowMenuIcon
{
return [AgentManager sharedManager].shouldShowInMenuBar;
}
- (void)setShouldShowMenuIcon:(BOOL)enabled
{
AgentManager *manager = [AgentManager sharedManager];
manager.shouldLaunchAtStartup = enabled;
manager.shouldShowInMenuBar = enabled;
}
- (BOOL)shouldShowMenuIcon
{
return [[NSUserDefaults standardUserDefaults] boolForKey:kPrefAgentEnabledKey];
}
- (void)setShouldShowMenuIcon:(BOOL)enabled
{
[NSUserDefaults standardUserDefaults] setBool:enabled forKey:kPrefAgentEnabledKey];
[AgentManager refreshAgentStatus];;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment