Commit 0bc4c595 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk Committed by Andreas Traczyk

main menu: hide "Check for updates..."

Hide "Check for updates..." menu item when Sparkle disabled.

Change-Id: I2c97ba3a203ff1ee61578683b0c264b3204ec4f4
Reviewed-by: Andreas Traczyk's avatarAndreas Traczyk <>
parent 848dda41
......@@ -59,6 +59,17 @@
NSTimer* preventSleepTimer;
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
// hide "Check for update" menu item when sparkle is disabled
NSMenu *mainMenu = [[NSApplication sharedApplication] mainMenu];
NSMenu *ringMenu = [[mainMenu itemAtIndex:0] submenu];
NSMenuItem *updateItem = [ringMenu itemAtIndex:1];
updateItem.hidden = false;
updateItem.hidden = true;
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints"];
[[NSUserNotificationCenter defaultUserNotificationCenter] setDelegate:self];
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment