1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-11-24 03:25:03 +03:00

Warn when stored shortcuts are not compatible

This commit is contained in:
Tae Won Ha 2020-01-29 18:15:24 +01:00
parent 1b9862742e
commit 3576b38f1f
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44

View File

@ -28,6 +28,17 @@ class ShortcutsPref: PrefPane,
)
super.init(frame: .zero)
if let version = self.shortcutsUserDefaults?.integer(forKey: "version"), version > 0 {
let alert = NSAlert()
alert.alertStyle = .warning
alert.messageText = "Incompatible Defaults for Shortcuts"
alert.informativeText = "The stored defaults for shortcuts are not compatible with "
+ "this version of VimR. You can delete the stored defaults "
+ "by executing 'defaults delete com.qvacua.VimR.menuitems' "
+ "in Terminal."
alert.runModal()
return
}
self.initShortcutUserDefaults()