Hammerspoon / hammerspoon

Staggeringly powerful macOS desktop automation with Lua

Home Page:http://www.hammerspoon.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Delete Preferences modal is confusing

hofstee opened this issue · comments

I unknowingly opened Hammerspoon while trying to open Force Quit Applications, which led to the "Do you want to delete the preferences?" window popping up. The options presented are Continue and Delete Preferences, which both feel like they will delete the preferences.

How about renaming Continue to Cancel instead (which should also allow pressing Esc to get out of this unwanted situation)? Maybe also potentially marking the Delete Preferences button with hasDestructiveAction since I notice the minimum macOS version is 11.0 now.

NSAlert *alert = [[NSAlert alloc] init];
[alert addButtonWithTitle:@"Continue"];
[alert addButtonWithTitle:@"Delete Preferences"];
[alert setMessageText:@"Do you want to delete the preferences?"];
[alert setInformativeText:@"Deleting the preferences will reset all Hammerspoon settings (including everything that uses hs.settings) to their defaults."];
[alert setAlertStyle:NSAlertStyleWarning];

modal dialog