diff options
author | Jeremy Huddleston Sequoia <jeremyhu@apple.com> | 2021-02-18 23:16:15 -0800 |
---|---|---|
committer | Jeremy Huddleston Sequoia <jeremyhu@apple.com> | 2021-02-18 23:16:32 -0800 |
commit | a3ddcdd56c246e2226c7cdf372c2a1294eb6d888 (patch) | |
tree | 40465b1a503a3bac9c83d19a3f6cf5c1025da5ee | |
parent | 279bcbd9cf9e557a6789d6e4cede8e8799c3788e (diff) |
xquartz: Fix build with sparkle enabled
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-rw-r--r-- | hw/xquartz/X11Controller.m | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m index b5aeda647..3efda5083 100644 --- a/hw/xquartz/X11Controller.m +++ b/hw/xquartz/X11Controller.m @@ -312,29 +312,27 @@ extern char *bundle_id_prefix; #ifdef XQUARTZ_SPARKLE - (void) setup_sparkle { - if (check_for_updates_item) + if (self.check_for_updates_item) return; // already did it... NSMenu *menu = [self.x11_about_item menu]; - check_for_updates_item = - [menu insertItemWithTitle:NSLocalizedString( - @"Check for X11 Updates...", - @"Check for X11 Updates...") - action:@selector ( - checkForUpdates:) - keyEquivalent:@"" - atIndex:1]; + NSMenuItem * const check_for_updates_item = + [menu insertItemWithTitle:NSLocalizedString(@"Check for X11 Updates...", @"Check for X11 Updates...") + action:@selector(checkForUpdates:) + keyEquivalent:@"" + atIndex:1]; [check_for_updates_item setTarget:[SUUpdater sharedUpdater]]; [check_for_updates_item setEnabled:YES]; + self.check_for_updates_item = check_for_updates_item; + // Set X11Controller as the delegate for the updater. [[SUUpdater sharedUpdater] setDelegate:self]; } // Sent immediately before installing the specified update. -- (void)updater:(SUUpdater *)updater willInstallUpdate:(SUAppcastItem *) - update +- (void)updater:(SUUpdater *)updater willInstallUpdate:(SUAppcastItem *)update { //self.can_quit = YES; } |