From 663b216b70374372ba10059d768e328cefc409fb Mon Sep 17 00:00:00 2001 From: Tae Won Ha Date: Mon, 27 Jan 2020 18:34:00 +0100 Subject: [PATCH 1/7] Make it compile again --- Cartfile | 2 +- Cartfile.resolved | 2 +- VimR/VimR/ShortcutsPref.swift | 8 ++++---- VimR/VimR/ShortcutsTableSubviews.swift | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Cartfile b/Cartfile index ea7d6a20..4722a129 100644 --- a/Cartfile +++ b/Cartfile @@ -5,7 +5,7 @@ github "ReactiveX/RxSwift" == 5.0.1 github "a2/MessagePack.swift" == 3.0.1 github "qvacua/CocoaFontAwesome" "master" github "qvacua/CocoaMarkdown" "master" -github "qvacua/ShortcutRecorder" "temporary" +github "qvacua/ShortcutRecorder" "develop" github "qvacua/Sparkle" == 1.21.3-qvacua github "qvacua/swifter" "nonpublic" diff --git a/Cartfile.resolved b/Cartfile.resolved index a76ca67c..0f12eba1 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -7,7 +7,7 @@ github "elegantchaos/DictionaryCoding" "1.0.7" github "eonil/FSEvents" "0.1.5" github "qvacua/CocoaFontAwesome" "fc2a08babd676525ced68061b19ad8ff3dd1d0b3" github "qvacua/CocoaMarkdown" "c58166490a71ad4d8466f7e7b9faf7cb0917c42f" -github "qvacua/ShortcutRecorder" "71baf522a1e57b5f130055e33dcd800687f6ea80" +github "qvacua/ShortcutRecorder" "c1079078db2d8e3c02c58578714fc36c0dfe4f78" github "qvacua/Sparkle" "1.21.3-qvacua" github "qvacua/swifter" "1905655ceedec5b5768f2089ceccf31621f6230a" github "sindresorhus/github-markdown-css" "v3.0.1" diff --git a/VimR/VimR/ShortcutsPref.swift b/VimR/VimR/ShortcutsPref.swift index 7f6bab09..734d7d9e 100644 --- a/VimR/VimR/ShortcutsPref.swift +++ b/VimR/VimR/ShortcutsPref.swift @@ -11,7 +11,7 @@ import ShortcutRecorder class ShortcutsPref: PrefPane, UiComponent, NSOutlineViewDelegate, - SRRecorderControlDelegate { + RecorderControlDelegate { typealias StateType = AppState @@ -51,8 +51,8 @@ class ShortcutsPref: PrefPane, private let treeController = NSTreeController() private let shortcutItemsRoot = ShortcutItem(title: "root", isLeaf: false, item: nil) - private let keyEqTransformer = SRKeyEquivalentTransformer() - private let keyEqModTransformer = SRKeyEquivalentModifierMaskTransformer() + private let keyEqTransformer = KeyEquivalentTransformer() + private let keyEqModTransformer = KeyEquivalentModifierMaskTransformer() private let shortcutsUserDefaults = UserDefaults(suiteName: "com.qvacua.VimR.menuitems") private let shortcutsDefaultsController: NSUserDefaultsController @@ -307,7 +307,7 @@ extension ShortcutsPref { // MARK: - SRRecorderControlDelegate extension ShortcutsPref { - func shortcutRecorderDidEndRecording(_ sender: SRRecorderControl!) { + func shortcutRecorderDidEndRecording(_ sender: RecorderControl!) { self.treeController.rearrangeObjects() } } diff --git a/VimR/VimR/ShortcutsTableSubviews.swift b/VimR/VimR/ShortcutsTableSubviews.swift index 23ac7048..21a07b98 100644 --- a/VimR/VimR/ShortcutsTableSubviews.swift +++ b/VimR/VimR/ShortcutsTableSubviews.swift @@ -36,7 +36,7 @@ class ShortcutTableCell: NSTableCellView { } } - func setDelegateOfRecorder(_ delegate: SRRecorderControlDelegate) { + func setDelegateOfRecorder(_ delegate: RecorderControlDelegate) { self.shortcutRecorder.delegate = delegate } @@ -67,8 +67,8 @@ class ShortcutTableCell: NSTableCellView { recorder.allowsEscapeToCancelRecording = true recorder.allowsDeleteToClearShortcutAndEndRecording = true recorder.storesEmptyValueForNoShortcut = true - recorder.setAllowedModifierFlags( - [.command, .shift, .option, .control], + recorder.set( + allowedModifierFlags: [.command, .shift, .option, .control], requiredModifierFlags: [], allowsEmptyModifierFlags: false ) @@ -117,7 +117,7 @@ class ShortcutTableCell: NSTableCellView { textField.autoPinEdge(toSuperviewEdge: .top, withInset: 3) } - private let shortcutRecorder = SRRecorderControl(forAutoLayout: ()) + private let shortcutRecorder = RecorderControl(forAutoLayout: ()) private let _textField = NSTextField(forAutoLayout: ()) required init?(coder: NSCoder) { From 3576b38f1f403396925d14a6f3cd38c608bfa97b Mon Sep 17 00:00:00 2001 From: Tae Won Ha Date: Wed, 29 Jan 2020 18:15:24 +0100 Subject: [PATCH 2/7] Warn when stored shortcuts are not compatible --- VimR/VimR/ShortcutsPref.swift | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/VimR/VimR/ShortcutsPref.swift b/VimR/VimR/ShortcutsPref.swift index 7f6bab09..61a87b0e 100644 --- a/VimR/VimR/ShortcutsPref.swift +++ b/VimR/VimR/ShortcutsPref.swift @@ -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() From bc20ba9cadb67603da938cac89375edc35785a1a Mon Sep 17 00:00:00 2001 From: Tae Won Ha Date: Mon, 27 Jan 2020 19:50:19 +0100 Subject: [PATCH 3/7] Adapt to the newest version of ShortcutRecorder Use the upstream version of ShortcutRecorder --- Cartfile | 2 +- Cartfile.resolved | 2 +- VimR/VimR/DefaultShortcuts.swift | 36 ++++++++- VimR/VimR/FoundationCommons.swift | 6 ++ VimR/VimR/ShortcutItem.swift | 32 +++----- VimR/VimR/ShortcutsPref.swift | 104 ++++++++++++++++--------- VimR/VimR/ShortcutsTableSubviews.swift | 19 ++--- 7 files changed, 128 insertions(+), 73 deletions(-) diff --git a/Cartfile b/Cartfile index 4722a129..18879489 100644 --- a/Cartfile +++ b/Cartfile @@ -5,7 +5,7 @@ github "ReactiveX/RxSwift" == 5.0.1 github "a2/MessagePack.swift" == 3.0.1 github "qvacua/CocoaFontAwesome" "master" github "qvacua/CocoaMarkdown" "master" -github "qvacua/ShortcutRecorder" "develop" +github "Kentzo/ShortcutRecorder" == 3.1 github "qvacua/Sparkle" == 1.21.3-qvacua github "qvacua/swifter" "nonpublic" diff --git a/Cartfile.resolved b/Cartfile.resolved index 0f12eba1..d4caa5cc 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,4 +1,5 @@ github "IBM-Swift/BlueSocket" "1.0.52" +github "Kentzo/ShortcutRecorder" "3.1" github "PureLayout/PureLayout" "v3.1.5" github "Quick/Nimble" "v8.0.4" github "ReactiveX/RxSwift" "5.0.1" @@ -7,7 +8,6 @@ github "elegantchaos/DictionaryCoding" "1.0.7" github "eonil/FSEvents" "0.1.5" github "qvacua/CocoaFontAwesome" "fc2a08babd676525ced68061b19ad8ff3dd1d0b3" github "qvacua/CocoaMarkdown" "c58166490a71ad4d8466f7e7b9faf7cb0917c42f" -github "qvacua/ShortcutRecorder" "c1079078db2d8e3c02c58578714fc36c0dfe4f78" github "qvacua/Sparkle" "1.21.3-qvacua" github "qvacua/swifter" "1905655ceedec5b5768f2089ceccf31621f6230a" github "sindresorhus/github-markdown-css" "v3.0.1" diff --git a/VimR/VimR/DefaultShortcuts.swift b/VimR/VimR/DefaultShortcuts.swift index f71e2989..4338d459 100644 --- a/VimR/VimR/DefaultShortcuts.swift +++ b/VimR/VimR/DefaultShortcuts.swift @@ -6,7 +6,41 @@ import Foundation import ShortcutRecorder -let defaultShortcuts: [String: [String: Any]] = [ +let defaultShortcuts: [String: Shortcut?] = [ + "com.qvacua.vimr.menuitems.edit.copy": Shortcut(keyEquivalent: "⌘C"), + "com.qvacua.vimr.menuitems.edit.cut": Shortcut(keyEquivalent: "⌘X"), + "com.qvacua.vimr.menuitems.edit.delete": Shortcut(keyEquivalent: ""), + "com.qvacua.vimr.menuitems.edit.paste": Shortcut(keyEquivalent: "⌘V"), + "com.qvacua.vimr.menuitems.edit.redo": Shortcut(keyEquivalent: "⇧⌘Z"), + "com.qvacua.vimr.menuitems.edit.select-all": Shortcut(keyEquivalent: "⌘A"), + "com.qvacua.vimr.menuitems.edit.undo": Shortcut(keyEquivalent: "⌘Z"), + "com.qvacua.vimr.menuitems.file.close": Shortcut(keyEquivalent: "⌘W"), + "com.qvacua.vimr.menuitems.file.close-window": Shortcut(keyEquivalent: "⇧⌘W"), + "com.qvacua.vimr.menuitems.file.new": Shortcut(keyEquivalent: "⌘N"), + "com.qvacua.vimr.menuitems.file.new-tab": Shortcut(keyEquivalent: "⌘T"), + "com.qvacua.vimr.menuitems.file.open-in-new-window": Shortcut(keyEquivalent: "⌥⌘O"), + "com.qvacua.vimr.menuitems.file.open-quickly": Shortcut(keyEquivalent: "⇧⌘O"), + "com.qvacua.vimr.menuitems.file.open": Shortcut(keyEquivalent: "⌘O"), + "com.qvacua.vimr.menuitems.file.save-as": Shortcut(keyEquivalent: "⇧⌘S"), + "com.qvacua.vimr.menuitems.file.save": Shortcut(keyEquivalent: "⌘S"), + "com.qvacua.vimr.menuitems.help.vimr-help": Shortcut(keyEquivalent: ""), + "com.qvacua.vimr.menuitems.tools.focus-neovim-view": Shortcut(keyEquivalent: "⌘."), + "com.qvacua.vimr.menuitems.tools.toggle-all-tools": Shortcut(keyEquivalent: "⌘\\"), + "com.qvacua.vimr.menuitems.tools.toggle-file-browser": Shortcut(keyEquivalent: "⌘1"), + "com.qvacua.vimr.menuitems.tools.toggle-buffer-list": Shortcut(keyEquivalent: "⌘2"), + "com.qvacua.vimr.menuitems.tools.toggle-markdown-preview": Shortcut(keyEquivalent: "⌘3"), + "com.qvacua.vimr.menuitems.tools.toggle-html-preview": Shortcut(keyEquivalent: "⌘4"), + "com.qvacua.vimr.menuitems.tools.toggle-tool-buttons": Shortcut(keyEquivalent: "⇧⌘\\"), + "com.qvacua.vimr.menuitems.view.enter-full-screen": Shortcut(keyEquivalent: "⌃⌘F"), + "com.qvacua.vimr.menuitems.view.font.bigger": Shortcut(keyEquivalent: "⌘+"), + "com.qvacua.vimr.menuitems.view.font.reset-to-default-size": Shortcut(keyEquivalent: "⌘0"), + "com.qvacua.vimr.menuitems.view.font.smaller": Shortcut(keyEquivalent: "⌘-"), + "com.qvacua.vimr.menuitems.window.bring-all-to-front": Shortcut(keyEquivalent: ""), + "com.qvacua.vimr.menuitems.window.minimize": Shortcut(keyEquivalent: "⌘M"), + "com.qvacua.vimr.menuitems.window.zoom": Shortcut(keyEquivalent: ""), +] + +let legacyDefaultShortcuts: [String: [String: Any]] = [ "com.qvacua.vimr.menuitems.edit.copy": [ SRShortcutCharacters: "c", SRShortcutCharactersIgnoringModifiers: "c", diff --git a/VimR/VimR/FoundationCommons.swift b/VimR/VimR/FoundationCommons.swift index c50e6c5b..34189c93 100644 --- a/VimR/VimR/FoundationCommons.swift +++ b/VimR/VimR/FoundationCommons.swift @@ -81,4 +81,10 @@ extension URL { } } +extension ValueTransformer { + + static var keyedUnarchiveFromDataTransformer + = ValueTransformer(forName: .keyedUnarchiveFromDataTransformerName)! +} + private let log = OSLog(subsystem: Defs.loggerSubsystem, category: Defs.LoggerCategory.general) diff --git a/VimR/VimR/ShortcutItem.swift b/VimR/VimR/ShortcutItem.swift index 751ebf30..d483267a 100644 --- a/VimR/VimR/ShortcutItem.swift +++ b/VimR/VimR/ShortcutItem.swift @@ -7,41 +7,29 @@ import Cocoa class ShortcutItem: NSObject, Comparable { - static func <(lhs: ShortcutItem, rhs: ShortcutItem) -> Bool { - return lhs.title < rhs.title - } + static func <(lhs: ShortcutItem, rhs: ShortcutItem) -> Bool { lhs.title < rhs.title } @objc dynamic var title: String @objc dynamic var isLeaf: Bool - @objc dynamic var childrenCount: Int { - return self.children?.count ?? -1 - } + @objc dynamic var childrenCount: Int { self.children?.count ?? -1 } - var identifier: String? { - return self.item?.identifier?.rawValue - } + var identifier: String? { self.item?.identifier?.rawValue } - var isContainer: Bool { - return !self.isLeaf - } + var isContainer: Bool { !self.isLeaf } override var description: String { - return "" + "" } let item: NSMenuItem? @objc dynamic var children: [ShortcutItem]? - init( - title: String, - isLeaf: Bool, - item: NSMenuItem? - ) { + init(title: String, isLeaf: Bool, item: NSMenuItem?) { self.title = title self.isLeaf = isLeaf self.item = item diff --git a/VimR/VimR/ShortcutsPref.swift b/VimR/VimR/ShortcutsPref.swift index 734d7d9e..47301027 100644 --- a/VimR/VimR/ShortcutsPref.swift +++ b/VimR/VimR/ShortcutsPref.swift @@ -29,6 +29,7 @@ class ShortcutsPref: PrefPane, super.init(frame: .zero) + self.migrateDefaults() self.initShortcutUserDefaults() self.addViews() @@ -51,18 +52,43 @@ class ShortcutsPref: PrefPane, private let treeController = NSTreeController() private let shortcutItemsRoot = ShortcutItem(title: "root", isLeaf: false, item: nil) - private let keyEqTransformer = KeyEquivalentTransformer() - private let keyEqModTransformer = KeyEquivalentModifierMaskTransformer() + private let keyEqTransformer = DataToKeyEquivalentTransformer() + private let keyEqModTransformer = DataToKeyEquivalentModifierMaskTransformer() private let shortcutsUserDefaults = UserDefaults(suiteName: "com.qvacua.VimR.menuitems") private let shortcutsDefaultsController: NSUserDefaultsController + private func migrateDefaults() { + if (self.shortcutsUserDefaults?.integer(forKey: defaultsVersionKey) ?? 0) == defaultsVersion { + return + } + + legacyDefaultShortcuts.keys.forEach { id in + let shortcut: Shortcut? + if let dict = self.shortcutsUserDefaults?.value(forKey: id) as? [String: Any] { + shortcut = Shortcut(dictionary: dict) + } else { + shortcut = defaultShortcuts[id] ?? nil + } + + let data = ValueTransformer + .keyedUnarchiveFromDataTransformer + .reverseTransformedValue(shortcut) as? NSData + self.shortcutsUserDefaults?.set(data, forKey: id) + } + + self.shortcutsUserDefaults?.set(defaultsVersion, forKey: defaultsVersionKey) + } + private func initShortcutUserDefaults() { - defaultShortcuts.forEach { identifier, shortcutData in - if self.shortcutsUserDefaults?.value(forKey: identifier) == nil { - self.shortcutsUserDefaults?.set(shortcutData, forKey: identifier) + let transformer = ValueTransformer(forName: .keyedUnarchiveFromDataTransformerName)! + defaultShortcuts.forEach { id, shortcut in + if self.shortcutsUserDefaults?.value(forKey: id) == nil { + let shortcutData = transformer.reverseTransformedValue(shortcut) as? NSData + self.shortcutsUserDefaults?.set(shortcutData, forKey: id) } } + self.shortcutsUserDefaults?.set(defaultsVersion, forKey: defaultsVersionKey) } private func initOutlineViewBindings() { @@ -206,7 +232,7 @@ extension ShortcutsPref { guard response == .alertSecondButtonReturn else { return } self.traverseMenuItems { identifier, _ in self.shortcutsDefaultsController.setValue( - defaultShortcuts[identifier], + legacyDefaultShortcuts[identifier], forKeyPath: "values.\(identifier)" ) } @@ -260,10 +286,7 @@ extension ShortcutsPref { return cellView } - cellView.customized = !self.shortcutsAreEqual( - self.shortcutsDefaultsController.value(forKeyPath: "values.\(identifier)"), - defaultShortcuts[identifier] - ) + cellView.customized = !self.areShortcutsEqual(identifier) cellView.layoutViews() cellView.setDelegateOfRecorder(self) cellView.bindRecorder(toKeyPath: "values.\(identifier)", to: self.shortcutsDefaultsController) @@ -273,41 +296,50 @@ extension ShortcutsPref { func outlineView(_: NSOutlineView, heightOfRowByItem item: Any) -> CGFloat { 28 } - private func shortcutsAreEqual(_ lhs: Any?, _ rhs: Any?) -> Bool { - if lhs == nil && rhs == nil { return true } + private func areShortcutsEqual(_ identifier: String) -> Bool { + guard let dataFromDefaults = self.shortcutsDefaultsController.value( + forKeyPath: "values.\(identifier)" + ) as? NSData else { return true } - guard let lhsShortcut = lhs as? [String: Any], - let rhsShortcut = rhs as? [String: Any] else { return false } + guard let shortcutFromDefaults = ValueTransformer + .keyedUnarchiveFromDataTransformer + .transformedValue(dataFromDefaults) as? Shortcut else { return true } - if lhsShortcut.isEmpty && rhsShortcut.isEmpty { return true } + let defaultShortcut = defaultShortcuts[identifier] ?? nil - if lhsShortcut[SRShortcutCharacters] as? String - != rhsShortcut[SRShortcutCharacters] as? String { - return false - } - - if lhsShortcut[SRShortcutCharactersIgnoringModifiers] as? String - != rhsShortcut[SRShortcutCharactersIgnoringModifiers] as? String { - return false - } - - if lhsShortcut[SRShortcutKeyCode] as? Int != rhsShortcut[SRShortcutKeyCode] as? Int { - return false - } - - if lhsShortcut[SRShortcutModifierFlagsKey] as? Int - != rhsShortcut[SRShortcutModifierFlagsKey] as? Int { - return false - } - - return true + return shortcutFromDefaults.isEqual(to: defaultShortcut) == true } } // MARK: - SRRecorderControlDelegate extension ShortcutsPref { - func shortcutRecorderDidEndRecording(_ sender: RecorderControl!) { + func recorderControlDidEndRecording(_ sender: RecorderControl) { self.treeController.rearrangeObjects() } } + +private let defaultsVersionKey = "version" +private let defaultsVersion = 337 + +private class DataToKeyEquivalentTransformer: ValueTransformer { + + override func transformedValue(_ value: Any?) -> Any? { + guard let shortcut = ValueTransformer + .keyedUnarchiveFromDataTransformer + .transformedValue(value) as? Shortcut else { return "" } + + return KeyEquivalentTransformer.shared.transformedValue(shortcut) + } +} + +private class DataToKeyEquivalentModifierMaskTransformer: ValueTransformer { + + override func transformedValue(_ value: Any?) -> Any? { + guard let shortcut = ValueTransformer + .keyedUnarchiveFromDataTransformer + .transformedValue(value) as? Shortcut else { return NSNumber(value: 0) } + + return KeyEquivalentModifierMaskTransformer.shared.transformedValue(shortcut) + } +} diff --git a/VimR/VimR/ShortcutsTableSubviews.swift b/VimR/VimR/ShortcutsTableSubviews.swift index 21a07b98..4d2da30c 100644 --- a/VimR/VimR/ShortcutsTableSubviews.swift +++ b/VimR/VimR/ShortcutsTableSubviews.swift @@ -27,13 +27,8 @@ class ShortcutTableCell: NSTableCellView { var isDir = false var text: String { - get { - return self.textField!.stringValue - } - - set { - self.textField?.stringValue = newValue - } + get { self.textField!.stringValue } + set { self.textField?.stringValue = newValue } } func setDelegateOfRecorder(_ delegate: RecorderControlDelegate) { @@ -43,7 +38,10 @@ class ShortcutTableCell: NSTableCellView { func bindRecorder(toKeyPath keypath: String, to content: Any) { self.shortcutRecorder.unbind(.value) self.shortcutRecorder.bind( - .value, to: content, withKeyPath: keypath + .value, + to: content, + withKeyPath: keypath, + options: [.valueTransformer: ValueTransformer.keyedUnarchiveFromDataTransformer] ) } @@ -66,7 +64,6 @@ class ShortcutTableCell: NSTableCellView { let recorder = self.shortcutRecorder recorder.allowsEscapeToCancelRecording = true recorder.allowsDeleteToClearShortcutAndEndRecording = true - recorder.storesEmptyValueForNoShortcut = true recorder.set( allowedModifierFlags: [.command, .shift, .option, .control], requiredModifierFlags: [], @@ -120,8 +117,6 @@ class ShortcutTableCell: NSTableCellView { private let shortcutRecorder = RecorderControl(forAutoLayout: ()) private let _textField = NSTextField(forAutoLayout: ()) - required init?(coder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } + required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } } From 1cfda0fad4fccbf5ba1f2374d47dd524b9d0b2dd Mon Sep 17 00:00:00 2001 From: Tae Won Ha Date: Wed, 29 Jan 2020 18:43:45 +0100 Subject: [PATCH 4/7] Bump version: v0.31.0-337 --- NvimView/DrawerDev/Info.plist | 4 ++-- NvimView/DrawerPerf/Info.plist | 4 ++-- NvimView/MinimalNvimViewDemo/Info.plist | 4 ++-- NvimView/NvimView.xcodeproj/project.pbxproj | 8 ++++---- NvimView/NvimView/Info.plist | 4 ++-- NvimView/NvimViewTests/Info.plist | 4 ++-- VimR/VimR.xcodeproj/project.pbxproj | 4 ++-- VimR/VimR/Info.plist | 4 ++-- VimR/VimRTests/Info.plist | 4 ++-- 9 files changed, 20 insertions(+), 20 deletions(-) diff --git a/NvimView/DrawerDev/Info.plist b/NvimView/DrawerDev/Info.plist index 68f70e71..910adacf 100644 --- a/NvimView/DrawerDev/Info.plist +++ b/NvimView/DrawerDev/Info.plist @@ -17,9 +17,9 @@ CFBundlePackageType APPL CFBundleShortVersionString - SNAPSHOT-336 + 0.31.0 CFBundleVersion - 336 + 337 LSMinimumSystemVersion $(MACOSX_DEPLOYMENT_TARGET) NSHumanReadableCopyright diff --git a/NvimView/DrawerPerf/Info.plist b/NvimView/DrawerPerf/Info.plist index 91e7dc62..d29ebd9c 100644 --- a/NvimView/DrawerPerf/Info.plist +++ b/NvimView/DrawerPerf/Info.plist @@ -17,9 +17,9 @@ CFBundlePackageType APPL CFBundleShortVersionString - SNAPSHOT-336 + 0.31.0 CFBundleVersion - 336 + 337 LSMinimumSystemVersion $(MACOSX_DEPLOYMENT_TARGET) NSHumanReadableCopyright diff --git a/NvimView/MinimalNvimViewDemo/Info.plist b/NvimView/MinimalNvimViewDemo/Info.plist index 59351b11..93fa26ab 100644 --- a/NvimView/MinimalNvimViewDemo/Info.plist +++ b/NvimView/MinimalNvimViewDemo/Info.plist @@ -38,9 +38,9 @@ CFBundlePackageType APPL CFBundleShortVersionString - SNAPSHOT-336 + 0.31.0 CFBundleVersion - 336 + 337 LSMinimumSystemVersion $(MACOSX_DEPLOYMENT_TARGET) NSHumanReadableCopyright diff --git a/NvimView/NvimView.xcodeproj/project.pbxproj b/NvimView/NvimView.xcodeproj/project.pbxproj index ce1b1aa4..186d1938 100644 --- a/NvimView/NvimView.xcodeproj/project.pbxproj +++ b/NvimView/NvimView.xcodeproj/project.pbxproj @@ -1146,7 +1146,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 336; + CURRENT_PROJECT_VERSION = 337; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -1208,7 +1208,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 336; + CURRENT_PROJECT_VERSION = 337; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -1238,7 +1238,7 @@ COMBINE_HIDPI_IMAGES = YES; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 336; + DYLIB_CURRENT_VERSION = 337; DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../Carthage/Build/Mac"; FRAMEWORK_VERSION = A; @@ -1260,7 +1260,7 @@ COMBINE_HIDPI_IMAGES = YES; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 336; + DYLIB_CURRENT_VERSION = 337; DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../Carthage/Build/Mac"; FRAMEWORK_VERSION = A; diff --git a/NvimView/NvimView/Info.plist b/NvimView/NvimView/Info.plist index 71abf65c..8e5b5d62 100644 --- a/NvimView/NvimView/Info.plist +++ b/NvimView/NvimView/Info.plist @@ -15,9 +15,9 @@ CFBundlePackageType FMWK CFBundleShortVersionString - SNAPSHOT-336 + 0.31.0 CFBundleVersion - 336 + 337 NSHumanReadableCopyright Copyright © 2017 Tae Won Ha. All rights reserved. NSPrincipalClass diff --git a/NvimView/NvimViewTests/Info.plist b/NvimView/NvimViewTests/Info.plist index 4c625fba..a13b638b 100644 --- a/NvimView/NvimViewTests/Info.plist +++ b/NvimView/NvimViewTests/Info.plist @@ -15,8 +15,8 @@ CFBundlePackageType BNDL CFBundleShortVersionString - SNAPSHOT-336 + 0.31.0 CFBundleVersion - 336 + 337 diff --git a/VimR/VimR.xcodeproj/project.pbxproj b/VimR/VimR.xcodeproj/project.pbxproj index fc715ae8..abd7ca9f 100644 --- a/VimR/VimR.xcodeproj/project.pbxproj +++ b/VimR/VimR.xcodeproj/project.pbxproj @@ -1920,7 +1920,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 336; + CURRENT_PROJECT_VERSION = 337; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_HARDENED_RUNTIME = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -1981,7 +1981,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 336; + CURRENT_PROJECT_VERSION = 337; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_HARDENED_RUNTIME = YES; ENABLE_NS_ASSERTIONS = NO; diff --git a/VimR/VimR/Info.plist b/VimR/VimR/Info.plist index 889898fd..02fd2650 100644 --- a/VimR/VimR/Info.plist +++ b/VimR/VimR/Info.plist @@ -1224,7 +1224,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - SNAPSHOT-336 + 0.31.0 CFBundleSignature ???? CFBundleURLTypes @@ -1241,7 +1241,7 @@ CFBundleVersion - 336 + 337 LSApplicationCategoryType public.app-category.productivity LSMinimumSystemVersion diff --git a/VimR/VimRTests/Info.plist b/VimR/VimRTests/Info.plist index d2dd8f69..81cae280 100644 --- a/VimR/VimRTests/Info.plist +++ b/VimR/VimRTests/Info.plist @@ -15,10 +15,10 @@ CFBundlePackageType BNDL CFBundleShortVersionString - SNAPSHOT-336 + 0.31.0 CFBundleSignature ???? CFBundleVersion - 336 + 337 From 32f0acdf78e5f5e1495a2b5e25be76150fc19de7 Mon Sep 17 00:00:00 2001 From: Tae Won Ha Date: Wed, 29 Jan 2020 18:46:33 +0100 Subject: [PATCH 5/7] Bump appcast(s) to v0.31.0-337 --- appcast.xml | 33 +++++++++------------------------ appcast_snapshot.xml | 17 ++++++++--------- 2 files changed, 17 insertions(+), 33 deletions(-) diff --git a/appcast.xml b/appcast.xml index 844bd732..bf0f7909 100644 --- a/appcast.xml +++ b/appcast.xml @@ -7,37 +7,22 @@ Most recent changes with links to updates for VimR. en - v0.30.0-335 + v0.31.0-337 -
  • Improve Open Quickly -
  • -
  • GH-730: Add "Close Window" menu item, which closes all tabs (and the VimR window).
  • -
  • GH-768: Bugfix: coc.nvim does not work.
  • -
  • Bugfix: VimR hangs when there are windows in which nvim is waiting for user input.
  • -
  • Bugfix: Forward search in Markdown preview does not work.
  • -
  • Bugfix: "Open Quickly" result rows are not dark mode compatible.
  • -
  • Bugfix: Enter without selecting a result in the "Open Quickly" window results in a crash.
  • -
  • Dependencies updates:
      -
    • IBM-Swift/BlueSocket 1.0.52
    • -
    • elegantchaos/DictionaryCoding 1.0.7
    • -
    -
  • +
  • Improve handling of file system changes for the file browser
  • ]]>
    - https://github.com/qvacua/vimr/releases/tag/v0.30.0-335 + https://github.com/qvacua/vimr/releases/tag/v0.31.0-337 - 2020-01-24T23:40:24.018858 + 2020-01-29T18:46:32.955903 10.12.0 -
    diff --git a/appcast_snapshot.xml b/appcast_snapshot.xml index d93fc185..bf0f7909 100644 --- a/appcast_snapshot.xml +++ b/appcast_snapshot.xml @@ -7,23 +7,22 @@ Most recent changes with links to updates for VimR. en - SNAPSHOT-336 + v0.31.0-337 -
  • Note that SNAPSHOT builds are prone to be very unstable.
  • Improve handling of file system changes for the file browser
  • ]]>
    - https://github.com/qvacua/vimr/releases/tag/snapshot/336 + https://github.com/qvacua/vimr/releases/tag/v0.31.0-337 - 2020-01-26T22:17:08.186659 + 2020-01-29T18:46:32.955903 10.12.0 -
    From 90e6cf13b4c90dbc5d232e36ef9e8822953ffa20 Mon Sep 17 00:00:00 2001 From: Tae Won Ha Date: Wed, 29 Jan 2020 18:52:21 +0100 Subject: [PATCH 6/7] Adapt version check --- VimR/VimR/ShortcutsPref.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/VimR/VimR/ShortcutsPref.swift b/VimR/VimR/ShortcutsPref.swift index 52ddb4b6..ede82b52 100644 --- a/VimR/VimR/ShortcutsPref.swift +++ b/VimR/VimR/ShortcutsPref.swift @@ -28,7 +28,9 @@ class ShortcutsPref: PrefPane, ) super.init(frame: .zero) - if let version = self.shortcutsUserDefaults?.integer(forKey: "version"), version > 0 { + + if let version = self.shortcutsUserDefaults?.integer(forKey: "version"), + version > defaultsVersion { let alert = NSAlert() alert.alertStyle = .warning alert.messageText = "Incompatible Defaults for Shortcuts" From af0d57f801f243203450c30a2df9db15c1bc5b8c Mon Sep 17 00:00:00 2001 From: Tae Won Ha Date: Wed, 29 Jan 2020 18:55:56 +0100 Subject: [PATCH 7/7] Update release notes --- resources/release-notes.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/resources/release-notes.md b/resources/release-notes.md index 61b1473f..d1e1c0a3 100644 --- a/resources/release-notes.md +++ b/resources/release-notes.md @@ -1,5 +1,10 @@ # Next +* Dependencies updates: + - Kentzo/ShortcutRecorder 3.1 + +# 0.31.0-337 + * Improve handling of file system changes for the file browser # 0.30.0-335