Skip to content

Commit 2494a47

Browse files
authored
Improve layout and wording of the NSUserDefaults resetting startup key combo. Closes #3612 (#3657)
1 parent 51d33b2 commit 2494a47

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Hammerspoon/MJAppDelegate.m

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,15 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
137137
if (CGEventSourceKeyState(kCGEventSourceStateCombinedSessionState,0x3A) && CGEventSourceKeyState(kCGEventSourceStateCombinedSessionState,0x37)) {
138138

139139
NSAlert *alert = [[NSAlert alloc] init];
140-
[alert addButtonWithTitle:@"Continue"];
141-
[alert addButtonWithTitle:@"Delete Preferences"];
140+
NSButton *deleteButton = [alert addButtonWithTitle:@"Delete Preferences"];
141+
deleteButton.hasDestructiveAction = YES;
142+
143+
[alert addButtonWithTitle:@"Cancel"];
142144
[alert setMessageText:@"Do you want to delete the preferences?"];
143-
[alert setInformativeText:@"Deleting the preferences will reset all Hammerspoon settings (including everything that uses hs.settings) to their defaults."];
145+
[alert setInformativeText:@"Deleting the preferences will reset all Hammerspoon settings (including everything that uses hs.settings) to their defaults. This does not remove anything in ~/.hammerspoon/"];
144146
[alert setAlertStyle:NSAlertStyleWarning];
145147

146-
if ([alert runModal] == NSAlertSecondButtonReturn) {
148+
if ([alert runModal] == NSAlertFirstButtonReturn) {
147149

148150
// Reset Preferences:
149151
NSDictionary * allObjects;

0 commit comments

Comments
 (0)