From b16d881808b925cde8c2f11cfce7ade17bb14896 Mon Sep 17 00:00:00 2001 From: Bi11 Date: Tue, 10 Jan 2017 18:44:48 +0800 Subject: [PATCH] Fix default button on touch bar --- Sparkle/SUAutomaticUpdateAlert.m | 2 +- Sparkle/SUUpdateAlert.m | 2 +- Sparkle/SUUpdatePermissionPrompt.m | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Sparkle/SUAutomaticUpdateAlert.m b/Sparkle/SUAutomaticUpdateAlert.m index aae589c4..571b9dfb 100644 --- a/Sparkle/SUAutomaticUpdateAlert.m +++ b/Sparkle/SUAutomaticUpdateAlert.m @@ -113,7 +113,7 @@ [self.touchBarProvider addButtonWithButton:self.skipButton]; [self.touchBarProvider addSpace]; [self.touchBarProvider addButtonWithButton:self.laterButton]; - [self.touchBarProvider addButtonWithButton:self.installButton]; + [self.touchBarProvider addButtonWithButton:self.installButton].keyEquivalent = @"\r"; [self.touchBarProvider addSpace]; [self.touchBarProvider addSpace]; return self.touchBarProvider.touchBar; diff --git a/Sparkle/SUUpdateAlert.m b/Sparkle/SUUpdateAlert.m index 188f7c4e..acc2bb40 100644 --- a/Sparkle/SUUpdateAlert.m +++ b/Sparkle/SUUpdateAlert.m @@ -330,7 +330,7 @@ [self.touchBarProvider addButtonWithButton:self.skipButton]; [self.touchBarProvider addSpace]; [self.touchBarProvider addButtonWithButton:self.laterButton]; - [self.touchBarProvider addButtonWithButton:self.installButton]; + [self.touchBarProvider addButtonWithButton:self.installButton].keyEquivalent = @"\r"; [self.touchBarProvider addSpace]; [self.touchBarProvider addSpace]; return self.touchBarProvider.touchBar; diff --git a/Sparkle/SUUpdatePermissionPrompt.m b/Sparkle/SUUpdatePermissionPrompt.m index 7e3ab730..5e7822aa 100644 --- a/Sparkle/SUUpdatePermissionPrompt.m +++ b/Sparkle/SUUpdatePermissionPrompt.m @@ -171,7 +171,7 @@ { self.touchBarProvider = [[SUTouchBarProvider alloc] initWithIdentifier:self.className]; [self.touchBarProvider addButtonWithButton:self.cancelButton]; - [self.touchBarProvider addButtonWithButton:self.checkButton]; + [self.touchBarProvider addButtonWithButton:self.checkButton].keyEquivalent = @"\r"; return self.touchBarProvider.touchBar; }