1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-12-25 23:02:35 +03:00

Merge remote-tracking branch 'origin/develop' into update-neovim

This commit is contained in:
Tae Won Ha 2019-03-08 10:32:46 +01:00
commit 2a5e39c2d3
17 changed files with 214 additions and 152 deletions

View File

@ -6,7 +6,7 @@ github "a2/MessagePack.swift" "3.0.0"
github "elegantchaos/DictionaryCoding" "1.0.6" github "elegantchaos/DictionaryCoding" "1.0.6"
github "eonil/FileSystemEvents" "1.0.0" github "eonil/FileSystemEvents" "1.0.0"
github "httpswift/swifter" "1.4.5" github "httpswift/swifter" "1.4.5"
github "qvacua/CocoaFontAwesome" "c4d9ac161c43a7d22ae711d112ca6c6d90c86b52" github "qvacua/CocoaFontAwesome" "fc2a08babd676525ced68061b19ad8ff3dd1d0b3"
github "qvacua/CocoaMarkdown" "c58166490a71ad4d8466f7e7b9faf7cb0917c42f" github "qvacua/CocoaMarkdown" "c58166490a71ad4d8466f7e7b9faf7cb0917c42f"
github "qvacua/RxMessagePort" "v0.0.6" github "qvacua/RxMessagePort" "v0.0.6"
github "qvacua/RxMsgpackRpc" "v0.0.8" github "qvacua/RxMsgpackRpc" "v0.0.8"

View File

@ -17,9 +17,9 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>0.26.0</string> <string>0.26.1</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>303</string> <string>304</string>
<key>LSMinimumSystemVersion</key> <key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string> <string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSHumanReadableCopyright</key> <key>NSHumanReadableCopyright</key>

View File

@ -803,7 +803,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 303; CURRENT_PROJECT_VERSION = 304;
DEBUG_INFORMATION_FORMAT = dwarf; DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES; ENABLE_TESTABILITY = YES;
@ -865,7 +865,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 303; CURRENT_PROJECT_VERSION = 304;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO; ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_STRICT_OBJC_MSGSEND = YES;
@ -894,7 +894,7 @@
COMBINE_HIDPI_IMAGES = YES; COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES; DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 303; DYLIB_CURRENT_VERSION = 304;
DYLIB_INSTALL_NAME_BASE = "@rpath"; DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../Carthage/Build/Mac"; FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../Carthage/Build/Mac";
FRAMEWORK_VERSION = A; FRAMEWORK_VERSION = A;
@ -916,7 +916,7 @@
COMBINE_HIDPI_IMAGES = YES; COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES; DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 303; DYLIB_CURRENT_VERSION = 304;
DYLIB_INSTALL_NAME_BASE = "@rpath"; DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../Carthage/Build/Mac"; FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../Carthage/Build/Mac";
FRAMEWORK_VERSION = A; FRAMEWORK_VERSION = A;

View File

@ -15,9 +15,9 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>FMWK</string> <string>FMWK</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>0.26.0</string> <string>0.26.1</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>303</string> <string>304</string>
<key>NSHumanReadableCopyright</key> <key>NSHumanReadableCopyright</key>
<string>Copyright © 2017 Tae Won Ha. All rights reserved.</string> <string>Copyright © 2017 Tae Won Ha. All rights reserved.</string>
<key>NSPrincipalClass</key> <key>NSPrincipalClass</key>

View File

@ -15,8 +15,8 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>BNDL</string> <string>BNDL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>0.26.0</string> <string>0.26.1</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>303</string> <string>304</string>
</dict> </dict>
</plist> </plist>

View File

@ -7,7 +7,6 @@
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
1929B0244BD7111E168726CF /* DefaultShortcuts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B93256AF7F9137223E36 /* DefaultShortcuts.swift */; };
1929B04CE8ECBD75CBBB0991 /* StringCommonsTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B5D45C9792BBE76B8AFF /* StringCommonsTest.swift */; }; 1929B04CE8ECBD75CBBB0991 /* StringCommonsTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B5D45C9792BBE76B8AFF /* StringCommonsTest.swift */; };
1929B05B9D664052EC2D23EF /* FileOutlineView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BCE3E156C06EDF1F2806 /* FileOutlineView.swift */; }; 1929B05B9D664052EC2D23EF /* FileOutlineView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BCE3E156C06EDF1F2806 /* FileOutlineView.swift */; };
1929B08C6230B9C5AB72DAF1 /* Pref128ToCurrentConverter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B5046239709E33516F5C /* Pref128ToCurrentConverter.swift */; }; 1929B08C6230B9C5AB72DAF1 /* Pref128ToCurrentConverter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B5046239709E33516F5C /* Pref128ToCurrentConverter.swift */; };
@ -27,7 +26,6 @@
1929B3AC66EFE35D68C020E3 /* PreviewToolReducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BFB0F294F3714D5E095F /* PreviewToolReducer.swift */; }; 1929B3AC66EFE35D68C020E3 /* PreviewToolReducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BFB0F294F3714D5E095F /* PreviewToolReducer.swift */; };
1929B3F5743967125F357C9F /* Matcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BEEB33113B0E33C3830F /* Matcher.swift */; }; 1929B3F5743967125F357C9F /* Matcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BEEB33113B0E33C3830F /* Matcher.swift */; };
1929B462CD4935AFF6D69457 /* FileItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B7CB4863F80230C32D3C /* FileItem.swift */; }; 1929B462CD4935AFF6D69457 /* FileItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B7CB4863F80230C32D3C /* FileItem.swift */; };
1929B489A51FD5B13888A00C /* RpcEvents.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BBF0944940845485A512 /* RpcEvents.swift */; };
1929B4B00D7BB191A9A6532D /* HtmlPreviewToolReducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BE5AEA3D0980860EED50 /* HtmlPreviewToolReducer.swift */; }; 1929B4B00D7BB191A9A6532D /* HtmlPreviewToolReducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BE5AEA3D0980860EED50 /* HtmlPreviewToolReducer.swift */; };
1929B4B70926DE113E6BF990 /* PreviewReducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BE37AA2843779CAFA76F /* PreviewReducer.swift */; }; 1929B4B70926DE113E6BF990 /* PreviewReducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BE37AA2843779CAFA76F /* PreviewReducer.swift */; };
1929B4E54E2F13A7F5F2B682 /* BufferListReducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B67A10E6BB2986B2416E /* BufferListReducer.swift */; }; 1929B4E54E2F13A7F5F2B682 /* BufferListReducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B67A10E6BB2986B2416E /* BufferListReducer.swift */; };
@ -70,17 +68,14 @@
1929BB67CAAD4F6CBD38DF0A /* RxRedux.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B66A5E2D00EA143AFD86 /* RxRedux.swift */; }; 1929BB67CAAD4F6CBD38DF0A /* RxRedux.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B66A5E2D00EA143AFD86 /* RxRedux.swift */; };
1929BB85B2D30E548A32663D /* ShortcutsPref.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B0E9B2F018D3E31D4B0B /* ShortcutsPref.swift */; }; 1929BB85B2D30E548A32663D /* ShortcutsPref.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B0E9B2F018D3E31D4B0B /* ShortcutsPref.swift */; };
1929BBE28654E4307AF1E2FD /* Theme.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BC2F05E9A5C0DB039739 /* Theme.swift */; }; 1929BBE28654E4307AF1E2FD /* Theme.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BC2F05E9A5C0DB039739 /* Theme.swift */; };
1929BC682EA78BF50D1E0890 /* ShortcutsTableSubviews.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B07F0085B7AE10413346 /* ShortcutsTableSubviews.swift */; };
1929BCC7908DD899999B70BE /* AppearancePrefReducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BED01F5D94BFCA4CF80F /* AppearancePrefReducer.swift */; }; 1929BCC7908DD899999B70BE /* AppearancePrefReducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BED01F5D94BFCA4CF80F /* AppearancePrefReducer.swift */; };
1929BCC9D3604933DFF07E2E /* FileBrowser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BA5C7099CDEB04B76BA4 /* FileBrowser.swift */; }; 1929BCC9D3604933DFF07E2E /* FileBrowser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BA5C7099CDEB04B76BA4 /* FileBrowser.swift */; };
1929BCF7F7B9CC5499A3F506 /* AdvancedPrefReducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B7039C5689CE45F53888 /* AdvancedPrefReducer.swift */; }; 1929BCF7F7B9CC5499A3F506 /* AdvancedPrefReducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B7039C5689CE45F53888 /* AdvancedPrefReducer.swift */; };
1929BD2F41D93ADFF43C1C98 /* NetUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 1929B02440BC99C42F9EBD45 /* NetUtils.m */; }; 1929BD2F41D93ADFF43C1C98 /* NetUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 1929B02440BC99C42F9EBD45 /* NetUtils.m */; };
1929BD3878A3A47B8D685CD2 /* AppDelegateReducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B7A68B7109CEFAF105E8 /* AppDelegateReducer.swift */; }; 1929BD3878A3A47B8D685CD2 /* AppDelegateReducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B7A68B7109CEFAF105E8 /* AppDelegateReducer.swift */; };
1929BD3F9E609BFADB27584B /* Scorer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B9D510177918080BE39B /* Scorer.swift */; }; 1929BD3F9E609BFADB27584B /* Scorer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B9D510177918080BE39B /* Scorer.swift */; };
1929BDC69A5F9D1661423488 /* ShortcutItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BF230875DED6CD7AB3EB /* ShortcutItem.swift */; };
1929BDFDBDA7180D02ACB37E /* RxSwiftCommonsTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B6C215ACCBE12672A8D7 /* RxSwiftCommonsTest.swift */; }; 1929BDFDBDA7180D02ACB37E /* RxSwiftCommonsTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B6C215ACCBE12672A8D7 /* RxSwiftCommonsTest.swift */; };
1929BE0DAEE9664C5BCFA211 /* States.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BB6608B4F0E037CA0F4C /* States.swift */; }; 1929BE0DAEE9664C5BCFA211 /* States.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BB6608B4F0E037CA0F4C /* States.swift */; };
1929BE0EB11D6BBC46D448D2 /* RpcAppearanceEpic.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B230EE8F1428980988F0 /* RpcAppearanceEpic.swift */; };
1929BE0F64A6CE5BCE2A5092 /* MainWindow+Delegates.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B714EB137AE448CE8ABD /* MainWindow+Delegates.swift */; }; 1929BE0F64A6CE5BCE2A5092 /* MainWindow+Delegates.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B714EB137AE448CE8ABD /* MainWindow+Delegates.swift */; };
1929BE2F3E0182CC51F2763A /* ThemedTableSubviews.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BD2CA8DD198A6BCDBCB7 /* ThemedTableSubviews.swift */; }; 1929BE2F3E0182CC51F2763A /* ThemedTableSubviews.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BD2CA8DD198A6BCDBCB7 /* ThemedTableSubviews.swift */; };
1929BEAE0592096BC1191B67 /* PrefPane.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B07A4A9209C88380E015 /* PrefPane.swift */; }; 1929BEAE0592096BC1191B67 /* PrefPane.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B07A4A9209C88380E015 /* PrefPane.swift */; };
@ -1235,11 +1230,6 @@
1929B8E90A1378E494D481E7 /* PrefUtilsTest.swift in Sources */, 1929B8E90A1378E494D481E7 /* PrefUtilsTest.swift in Sources */,
1929B20CE35B43BB1CE023BA /* Theme.swift in Sources */, 1929B20CE35B43BB1CE023BA /* Theme.swift in Sources */,
1929B9318D32146D58BB38EC /* AppKitCommons.swift in Sources */, 1929B9318D32146D58BB38EC /* AppKitCommons.swift in Sources */,
1929BC682EA78BF50D1E0890 /* ShortcutsTableSubviews.swift in Sources */,
1929B0244BD7111E168726CF /* DefaultShortcuts.swift in Sources */,
1929BDC69A5F9D1661423488 /* ShortcutItem.swift in Sources */,
1929B489A51FD5B13888A00C /* RpcEvents.swift in Sources */,
1929BE0EB11D6BBC46D448D2 /* RpcAppearanceEpic.swift in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -1334,7 +1324,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 303; CURRENT_PROJECT_VERSION = 304;
DEBUG_INFORMATION_FORMAT = dwarf; DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES; ENABLE_TESTABILITY = YES;
@ -1392,7 +1382,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 303; CURRENT_PROJECT_VERSION = 304;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO; ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_STRICT_OBJC_MSGSEND = YES;

View File

@ -63,25 +63,6 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
self.useSnapshot = initialAppState.useSnapshotUpdate self.useSnapshot = initialAppState.useSnapshotUpdate
super.init() super.init()
NSUserNotificationCenter.default.delegate = self
// FIXME: GH-611: https://github.com/qvacua/vimr/issues/611
// Check whether FontAwesome can be loaded. If not, show a warning.
// We don't know yet why this happens to some users.
DispatchQueue.main.async {
guard NSFont.fontAwesome(ofSize: 13) == nil else {
return
}
let notification = NSUserNotification()
notification.title = "FontAwesome could not be loaded."
notification.subtitle = "Unfortunately we don't know yet what is causing this."
notification.informativeText = """
We use the FontAwesome font for icons in the tools, e.g. the file browser. Those icons are now shown as ?.
You can track the progress on this issue at GitHub issue 611.
"""
NSUserNotificationCenter.default.deliver(notification)
}
} }
override func awakeFromNib() { override func awakeFromNib() {

View File

@ -106,15 +106,18 @@ extension FileBrowser {
} }
override func repaint(with theme: Workspace.Theme) { override func repaint(with theme: Workspace.Theme) {
self.goToParentButton.image = NSImage.fontAwesomeIcon(name: .levelUp, self.goToParentButton.image = NSImage.fontAwesomeIcon(name: .levelUpAlt,
style: .solid,
textColor: theme.toolbarForeground, textColor: theme.toolbarForeground,
dimension: InnerToolBar.iconDimension) dimension: InnerToolBar.iconDimension)
self.scrollToSourceButton.image = NSImage.fontAwesomeIcon(name: .bullseye, self.scrollToSourceButton.image = NSImage.fontAwesomeIcon(name: .bullseye,
style: .solid,
textColor: theme.toolbarForeground, textColor: theme.toolbarForeground,
dimension: InnerToolBar.iconDimension) dimension: InnerToolBar.iconDimension)
self.refreshButton.image = NSImage.fontAwesomeIcon(name: .refresh, self.refreshButton.image = NSImage.fontAwesomeIcon(name: .sync,
style: .solid,
textColor: theme.toolbarForeground, textColor: theme.toolbarForeground,
dimension: InnerToolBar.iconDimension) dimension: InnerToolBar.iconDimension)
} }
@ -129,17 +132,17 @@ extension FileBrowser {
private func addViews() { private func addViews() {
let goToParent = self.goToParentButton let goToParent = self.goToParentButton
InnerToolBar.configureToStandardIconButton(button: goToParent, iconName: .levelUp) InnerToolBar.configureToStandardIconButton(button: goToParent, iconName: .levelUpAlt, style: .solid)
goToParent.toolTip = "Set parent as working directory" goToParent.toolTip = "Set parent as working directory"
goToParent.action = #selector(FileBrowser.goToParentAction) goToParent.action = #selector(FileBrowser.goToParentAction)
let scrollToSource = self.scrollToSourceButton let scrollToSource = self.scrollToSourceButton
InnerToolBar.configureToStandardIconButton(button: scrollToSource, iconName: .bullseye) InnerToolBar.configureToStandardIconButton(button: scrollToSource, iconName: .bullseye, style: .solid)
scrollToSource.toolTip = "Navigate to the current buffer" scrollToSource.toolTip = "Navigate to the current buffer"
scrollToSource.action = #selector(FileBrowser.scrollToSourceAction) scrollToSource.action = #selector(FileBrowser.scrollToSourceAction)
let refresh = self.refreshButton let refresh = self.refreshButton
InnerToolBar.configureToStandardIconButton(button: refresh, iconName: .refresh) InnerToolBar.configureToStandardIconButton(button: refresh, iconName: .sync, style: .solid)
refresh.toolTip = "Refresh" refresh.toolTip = "Refresh"
refresh.action = #selector(FileBrowser.refreshAction) refresh.action = #selector(FileBrowser.refreshAction)
@ -148,11 +151,22 @@ extension FileBrowser {
self.addSubview(refresh) self.addSubview(refresh)
refresh.autoPinEdge(toSuperviewEdge: .top) refresh.autoPinEdge(toSuperviewEdge: .top)
refresh.autoPinEdge(toSuperviewEdge: .right) refresh.autoPinEdge(toSuperviewEdge: .right,
withInset: InnerToolBar.itemPadding)
goToParent.autoPinEdge(toSuperviewEdge: .top) goToParent.autoPinEdge(toSuperviewEdge: .top)
goToParent.autoPinEdge(.right, to: .left, of: refresh) goToParent.autoPinEdge(
.right,
to: .left,
of: refresh,
withOffset: -InnerToolBar.itemPadding
)
scrollToSource.autoPinEdge(toSuperviewEdge: .top) scrollToSource.autoPinEdge(toSuperviewEdge: .top)
scrollToSource.autoPinEdge(.right, to: .left, of: goToParent) scrollToSource.autoPinEdge(
.right,
to: .left,
of: goToParent,
withOffset: -InnerToolBar.itemPadding
)
} }
required init?(coder: NSCoder) { required init?(coder: NSCoder) {
@ -181,9 +195,7 @@ extension FileBrowser {
return return
} }
#if NOPE
self.fileView.select(url) self.fileView.select(url)
#endif
} }
@objc func refreshAction(_ sender: Any?) { @objc func refreshAction(_ sender: Any?) {

View File

@ -34,11 +34,13 @@ class FileOutlineView: NSOutlineView,
self.isShowHidden = state.fileBrowserShowHidden self.isShowHidden = state.fileBrowserShowHidden
self.triangleClosed = NSImage.fontAwesomeIcon( self.triangleClosed = NSImage.fontAwesomeIcon(
name: .caretRight, name: .caretRight,
style: .solid,
textColor: self.theme.directoryForeground, textColor: self.theme.directoryForeground,
dimension: triangleImageSize dimension: triangleImageSize
) )
self.triangleOpen = NSImage.fontAwesomeIcon( self.triangleOpen = NSImage.fontAwesomeIcon(
name: .caretDown, name: .caretDown,
style: .solid,
textColor: self.theme.directoryForeground, textColor: self.theme.directoryForeground,
dimension: triangleImageSize dimension: triangleImageSize
) )
@ -123,6 +125,50 @@ class FileOutlineView: NSOutlineView,
return result return result
} }
private func select(treeNode: NSTreeNode) {
let targetRow = self.row(forItem: treeNode)
self.selectRowIndexes(IndexSet(integer: targetRow), byExtendingSelection: false)
self.scrollRowToVisible(targetRow)
}
func select(_ url: URL) {
guard let childrenOfRoot = self.treeController.arrangedObjects.children
else { return }
var stack = [NSTreeNode]()
// NSTreeController.arrangedObjects has no Node.
for childOfRoot in childrenOfRoot {
guard let node = childOfRoot.node else { continue }
stdoutLog.debug(node)
if node.url == url {
self.select(treeNode: childOfRoot)
return
}
if node.url.isParent(of: url) {
self.expandItem(childOfRoot)
stack.append(contentsOf: childOfRoot.children ?? [])
break
}
}
while let item = stack.popLast() {
self.expandItem(item)
guard let node = item.node else { continue }
if node.url == url {
self.select(treeNode: item)
return
}
if node.url.isParent(of: url) {
stack.append(contentsOf: item.children ?? [])
}
}
}
required init?(coder: NSCoder) { required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented") fatalError("init(coder:) has not been implemented")
} }
@ -279,11 +325,13 @@ class FileOutlineView: NSOutlineView,
self.backgroundColor = self.theme.background self.backgroundColor = self.theme.background
self.triangleClosed = NSImage.fontAwesomeIcon( self.triangleClosed = NSImage.fontAwesomeIcon(
name: .caretRight, name: .caretRight,
style: .solid,
textColor: self.theme.directoryForeground, textColor: self.theme.directoryForeground,
dimension: triangleImageSize dimension: triangleImageSize
) )
self.triangleOpen = NSImage.fontAwesomeIcon( self.triangleOpen = NSImage.fontAwesomeIcon(
name: .caretDown, name: .caretDown,
style: .solid,
textColor: self.theme.directoryForeground, textColor: self.theme.directoryForeground,
dimension: triangleImageSize dimension: triangleImageSize
) )

View File

@ -154,14 +154,15 @@ extension HtmlPreviewTool {
private func addViews() { private func addViews() {
let selectHtmlFile = self.selectHtmlFile let selectHtmlFile = self.selectHtmlFile
InnerToolBar.configureToStandardIconButton(button: selectHtmlFile, iconName: .fileCodeO) InnerToolBar.configureToStandardIconButton(button: selectHtmlFile, iconName: .fileCode, style: .regular)
selectHtmlFile.toolTip = "Select the HTML file" selectHtmlFile.toolTip = "Select the HTML file"
selectHtmlFile.action = #selector(HtmlPreviewTool.selectHtmlFile) selectHtmlFile.action = #selector(HtmlPreviewTool.selectHtmlFile)
self.addSubview(selectHtmlFile) self.addSubview(selectHtmlFile)
selectHtmlFile.autoPinEdge(toSuperviewEdge: .top) selectHtmlFile.autoPinEdge(toSuperviewEdge: .top)
selectHtmlFile.autoPinEdge(toSuperviewEdge: .right) selectHtmlFile.autoPinEdge(toSuperviewEdge: .right,
withInset: InnerToolBar.itemPadding)
} }
required init?(coder: NSCoder) { required init?(coder: NSCoder) {

View File

@ -1224,7 +1224,7 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>0.26.0</string> <string>0.26.1</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleURLTypes</key> <key>CFBundleURLTypes</key>
@ -1241,7 +1241,7 @@
</dict> </dict>
</array> </array>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>303</string> <string>304</string>
<key>LSApplicationCategoryType</key> <key>LSApplicationCategoryType</key>
<string>public.app-category.productivity</string> <string>public.app-category.productivity</string>
<key>LSMinimumSystemVersion</key> <key>LSMinimumSystemVersion</key>

View File

@ -21,33 +21,23 @@ class CustomToolBar: NSView {
*/ */
class InnerToolBar: NSView, NSUserInterfaceValidations { class InnerToolBar: NSView, NSUserInterfaceValidations {
private static let separatorThickness = CGFloat(1)
private static let height = InnerToolBar.iconDimension + 2 + 2 + InnerToolBar.separatorThickness
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
private let titleField = NSTextField(forAutoLayout: ())
private let closeButton = NSButton(forAutoLayout: ())
private let cogButton = NSPopUpButton(forAutoLayout: ())
private let locToSelector: [WorkspaceBarLocation: Selector] = [
.top: #selector(InnerToolBar.moveToTopAction(_:)),
.right: #selector(InnerToolBar.moveToRightAction(_:)),
.bottom: #selector(InnerToolBar.moveToBottomAction(_:)),
.left: #selector(InnerToolBar.moveToLeftAction(_:)),
]
// MARK: - API // MARK: - API
static let toolbarHeight = InnerToolBar.iconDimension static let toolbarHeight = InnerToolBar.iconDimension
static let iconDimension = CGFloat(19) static let iconDimension = CGFloat(18)
static let itemPadding = CGFloat(4)
static func configureToStandardIconButton(button: NSButton, static func configureToStandardIconButton(
iconName: CocoaFontAwesome.FontAwesome, button: NSButton,
color: NSColor = Workspace.Theme.default.toolbarForeground) { iconName: FontAwesome,
style: FontAwesomeStyle,
let icon = NSImage.fontAwesomeIcon(name: iconName, textColor: color, dimension: InnerToolBar.iconDimension) color: NSColor = Workspace.Theme.default.toolbarForeground
) {
let icon = NSImage.fontAwesomeIcon(
name: iconName,
style: .solid,
textColor: color,
dimension: InnerToolBar.iconDimension
)
button.imagePosition = .imageOnly button.imagePosition = .imageOnly
button.image = icon button.image = icon
@ -112,12 +102,18 @@ class InnerToolBar: NSView, NSUserInterfaceValidations {
self.layer!.backgroundColor = self.theme.toolbarBackground.cgColor self.layer!.backgroundColor = self.theme.toolbarBackground.cgColor
self.titleField.textColor = self.theme.toolbarForeground self.titleField.textColor = self.theme.toolbarForeground
self.cogButton.menu?.item(at: 0)?.image = NSImage.fontAwesomeIcon(name: .cog, self.cogButton.image = NSImage.fontAwesomeIcon(
textColor: self.theme.toolbarForeground, name: .cog,
dimension: InnerToolBar.iconDimension) style: .solid,
self.closeButton.image = NSImage.fontAwesomeIcon(name: .timesCircle, textColor: self.theme.toolbarForeground,
textColor: self.theme.toolbarForeground, dimension: InnerToolBar.iconDimension
dimension: InnerToolBar.iconDimension) )
self.closeButton.image = NSImage.fontAwesomeIcon(
name: .timesCircle,
style: .regular,
textColor: self.theme.toolbarForeground,
dimension: InnerToolBar.iconDimension
)
self.customToolbar?.repaint(with: self.theme) self.customToolbar?.repaint(with: self.theme)
@ -138,6 +134,25 @@ class InnerToolBar: NSView, NSUserInterfaceValidations {
} }
} }
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
private static let separatorThickness = CGFloat(1)
private static let height = InnerToolBar.iconDimension + 2 + 2 + InnerToolBar.separatorThickness
private let titleField = NSTextField(forAutoLayout: ())
private let closeButton = NSButton(forAutoLayout: ())
private let cogButton = NSButton(forAutoLayout: ())
private let cogMenu = NSMenu()
private let locToSelector: [WorkspaceBarLocation: Selector] = [
.top: #selector(InnerToolBar.moveToTopAction(_:)),
.right: #selector(InnerToolBar.moveToRightAction(_:)),
.bottom: #selector(InnerToolBar.moveToBottomAction(_:)),
.left: #selector(InnerToolBar.moveToLeftAction(_:)),
]
private func removeCustomUiElements() { private func removeCustomUiElements() {
self.customToolbar?.removeFromSuperview() self.customToolbar?.removeFromSuperview()
[self.titleField, self.closeButton, self.cogButton].forEach { $0.removeFromSuperview() } [self.titleField, self.closeButton, self.cogButton].forEach { $0.removeFromSuperview() }
@ -155,27 +170,23 @@ class InnerToolBar: NSView, NSUserInterfaceValidations {
title.isSelectable = false title.isSelectable = false
title.controlSize = .small title.controlSize = .small
InnerToolBar.configureToStandardIconButton(button: close, InnerToolBar.configureToStandardIconButton(
iconName: .timesCircle, button: close,
color: self.theme.toolbarForeground) iconName: .timesCircle,
style: .regular,
color: self.theme.toolbarForeground
)
close.target = self close.target = self
close.action = #selector(InnerToolBar.closeAction) close.action = #selector(InnerToolBar.closeAction)
let cogIcon = NSImage.fontAwesomeIcon(name: .cog, InnerToolBar.configureToStandardIconButton(
textColor: self.theme.toolbarForeground, button: cog,
dimension: InnerToolBar.iconDimension) iconName: .cog,
cog.configureForAutoLayout() style: .solid,
cog.imagePosition = .imageOnly color: self.theme.toolbarForeground
cog.pullsDown = true )
cog.isBordered = false cog.action = #selector(InnerToolBar.cogAction)
cog.target = self
let cogCell = cog.cell as? NSPopUpButtonCell
cogCell?.arrowPosition = .noArrow
let cogMenu = NSMenu()
let cogMenuItem = NSMenuItem(title: "Cog", action: nil, keyEquivalent: "")
cogMenuItem.image = cogIcon
let moveToMenu = NSMenu() let moveToMenu = NSMenu()
let topMenuItem = NSMenuItem(title: "Top", let topMenuItem = NSMenuItem(title: "Top",
@ -207,8 +218,6 @@ class InnerToolBar: NSView, NSUserInterfaceValidations {
) )
moveToMenuItem.submenu = moveToMenu moveToMenuItem.submenu = moveToMenu
cogMenu.addItem(cogMenuItem)
if self.customMenuItems?.isEmpty == false { if self.customMenuItems?.isEmpty == false {
self.customMenuItems?.forEach(cogMenu.addItem) self.customMenuItems?.forEach(cogMenu.addItem)
cogMenu.addItem(NSMenuItem.separator()) cogMenu.addItem(NSMenuItem.separator())
@ -216,8 +225,6 @@ class InnerToolBar: NSView, NSUserInterfaceValidations {
cogMenu.addItem(moveToMenuItem) cogMenu.addItem(moveToMenuItem)
cog.menu = cogMenu
if let customToolbar = self.customToolbar { if let customToolbar = self.customToolbar {
customToolbar.configureForAutoLayout() customToolbar.configureForAutoLayout()
self.addSubview(customToolbar) self.addSubview(customToolbar)
@ -232,14 +239,32 @@ class InnerToolBar: NSView, NSUserInterfaceValidations {
close.autoPinEdge(toSuperviewEdge: .top, withInset: 2) close.autoPinEdge(toSuperviewEdge: .top, withInset: 2)
close.autoPinEdge(toSuperviewEdge: .right, withInset: 2) close.autoPinEdge(toSuperviewEdge: .right, withInset: 2)
cog.autoPinEdge(.right, to: .left, of: close, withOffset: 5) cog.autoPinEdge(
cog.autoPinEdge(toSuperviewEdge: .top, withInset: -1) .right,
to: .left,
of: close,
withOffset: -InnerToolBar.itemPadding
)
cog.autoPinEdge(.top, to: .top, of: close)
if let customToolbar = self.customToolbar { if let customToolbar = self.customToolbar {
customToolbar.autoPinEdge(toSuperviewEdge: .top, withInset: 2) customToolbar.autoPinEdge(toSuperviewEdge: .top, withInset: 2)
customToolbar.autoPinEdge(.right, to: .left, of: cog, withOffset: 5 - InnerToolBar.separatorThickness) customToolbar.autoPinEdge(
customToolbar.autoPinEdge(toSuperviewEdge: .bottom, withInset: 2 + InnerToolBar.separatorThickness) .right,
customToolbar.autoPinEdge(.left, to: .right, of: title, withOffset: 2) to: .left,
of: cog,
withOffset: -InnerToolBar.itemPadding - InnerToolBar.separatorThickness
)
customToolbar.autoPinEdge(
toSuperviewEdge: .bottom,
withInset: 2 + InnerToolBar.separatorThickness
)
customToolbar.autoPinEdge(
.left,
to: .right,
of: title,
withOffset: -InnerToolBar.itemPadding
)
} }
} }
@ -251,7 +276,10 @@ class InnerToolBar: NSView, NSUserInterfaceValidations {
private func innerSeparatorRect() -> CGRect { private func innerSeparatorRect() -> CGRect {
let cogBounds = self.cogButton.frame let cogBounds = self.cogButton.frame
let bounds = self.bounds let bounds = self.bounds
return CGRect(x: cogBounds.minX + 6, y: bounds.minY + 4, width: 1, height: bounds.height - 4 - 4) return CGRect(x: cogBounds.minX - InnerToolBar.itemPadding,
y: bounds.minY + 4,
width: 1,
height: bounds.height - 4 - 4)
} }
} }
@ -262,6 +290,12 @@ extension InnerToolBar {
self.tool?.toggle() self.tool?.toggle()
} }
@objc func cogAction(_ sender: NSButton) {
guard let event = NSApp.currentEvent else { return }
NSMenu.popUpContextMenu(self.cogMenu, with: event, for: sender)
}
@objc func moveToTopAction(_ sender: Any?) { @objc func moveToTopAction(_ sender: Any?) {
self.move(to: .top) self.move(to: .top)
} }

View File

@ -25,12 +25,6 @@ fileprivate class DummyToken: Comparable {
class ArrayCommonsTest: XCTestCase { class ArrayCommonsTest: XCTestCase {
func testConcurrentChunkMap() {
let array = Array(0...1000)
let result = array.concurrentChunkMap(100, queue: .global(qos: .userInitiated)) { "\($0)" }
expect(Set(result)).to(equal(Set(array.map { "\($0)" })))
}
func testTuplesToDict() { func testTuplesToDict() {
let tuples = [ let tuples = [
(1, "1"), (1, "1"),

View File

@ -15,10 +15,10 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>BNDL</string> <string>BNDL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>0.26.0</string> <string>0.26.1</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>303</string> <string>304</string>
</dict> </dict>
</plist> </plist>

View File

@ -7,28 +7,26 @@
<description>Most recent changes with links to updates for VimR.</description> <description>Most recent changes with links to updates for VimR.</description>
<language>en</language> <language>en</language>
<item> <item>
<title>v0.26.0-303</title> <title>v0.26.1-304</title>
<description><![CDATA[ <description><![CDATA[
<ul> <ul>
<li>Minimum macOS requirement is now 10.12 Sierra.</li> <li>Fix broken "Navigate to the current buffer" of the file browser</li>
<li>Optional parallel computation of glyphs. This may result in faster rendering depending on the situation.</li> <li>Dependencies updates:<ul>
<li>GH-314: You can customize the key shortcut for all menu items in the <em>Shortcut</em> preferences pane.</li> <li>Use FontAwesome 5 (thanks for the PR, @chriszielinski!)</li>
<li>GH-501: Add key shortcuts to toggle the Buffer List, Markdown Preview, and HTML Preview tools.</li> </ul>
<li>GH-649: Add commands that can control some of GUI elements.</li> </li>
<li>GH-506: Set font, size and linespacing via <code>~/.config/nvim/ginit.vim</code>.</li>
<li>Draw the disclosure triangle in appropriate color of the current color scheme (and improve handling of changes of <code>cwd</code> in the file browser).</li>
</ul> </ul>
]]></description> ]]></description>
<releaseNotesLink> <releaseNotesLink>
https://github.com/qvacua/vimr/releases/tag/v0.26.0-303 https://github.com/qvacua/vimr/releases/tag/v0.26.1-304
</releaseNotesLink> </releaseNotesLink>
<pubDate>2019-03-06T16:41:54.852561</pubDate> <pubDate>2019-03-08T10:19:56.833987</pubDate>
<minimumSystemVersion>10.10.0</minimumSystemVersion> <minimumSystemVersion>10.10.0</minimumSystemVersion>
<enclosure url="https://github.com/qvacua/vimr/releases/download/v0.26.0-303/VimR-v0.26.0-303.tar.bz2" <enclosure url="https://github.com/qvacua/vimr/releases/download/v0.26.1-304/VimR-v0.26.1-304.tar.bz2"
sparkle:version="303" sparkle:version="304"
sparkle:shortVersionString="0.26.0" sparkle:shortVersionString="0.26.1"
sparkle:dsaSignature="MCwCFHaP11nsWF1cpjdrkDzT+lgmYkzIAhQn7eyPAKIRr3ej1ZOpBwub3NXYRw==" sparkle:dsaSignature="MC0CFD+wxEcpX1oSqMBdwq6pa3bspqs0AhUAyrwVnPz99VB13tbzXvNd5NjNqJI="
length="15025572" length="15266980"
type="application/octet-stream"/> type="application/octet-stream"/>
</item> </item>
</channel> </channel>

View File

@ -7,28 +7,26 @@
<description>Most recent changes with links to updates for VimR.</description> <description>Most recent changes with links to updates for VimR.</description>
<language>en</language> <language>en</language>
<item> <item>
<title>v0.26.0-303</title> <title>v0.26.1-304</title>
<description><![CDATA[ <description><![CDATA[
<ul> <ul>
<li>Minimum macOS requirement is now 10.12 Sierra.</li> <li>Fix broken "Navigate to the current buffer" of the file browser</li>
<li>Optional parallel computation of glyphs. This may result in faster rendering depending on the situation.</li> <li>Dependencies updates:<ul>
<li>GH-314: You can customize the key shortcut for all menu items in the <em>Shortcut</em> preferences pane.</li> <li>Use FontAwesome 5 (thanks for the PR, @chriszielinski!)</li>
<li>GH-501: Add key shortcuts to toggle the Buffer List, Markdown Preview, and HTML Preview tools.</li> </ul>
<li>GH-649: Add commands that can control some of GUI elements.</li> </li>
<li>GH-506: Set font, size and linespacing via <code>~/.config/nvim/ginit.vim</code>.</li>
<li>Draw the disclosure triangle in appropriate color of the current color scheme (and improve handling of changes of <code>cwd</code> in the file browser).</li>
</ul> </ul>
]]></description> ]]></description>
<releaseNotesLink> <releaseNotesLink>
https://github.com/qvacua/vimr/releases/tag/v0.26.0-303 https://github.com/qvacua/vimr/releases/tag/v0.26.1-304
</releaseNotesLink> </releaseNotesLink>
<pubDate>2019-03-06T16:41:54.852561</pubDate> <pubDate>2019-03-08T10:19:56.833987</pubDate>
<minimumSystemVersion>10.10.0</minimumSystemVersion> <minimumSystemVersion>10.10.0</minimumSystemVersion>
<enclosure url="https://github.com/qvacua/vimr/releases/download/v0.26.0-303/VimR-v0.26.0-303.tar.bz2" <enclosure url="https://github.com/qvacua/vimr/releases/download/v0.26.1-304/VimR-v0.26.1-304.tar.bz2"
sparkle:version="303" sparkle:version="304"
sparkle:shortVersionString="0.26.0" sparkle:shortVersionString="0.26.1"
sparkle:dsaSignature="MCwCFHaP11nsWF1cpjdrkDzT+lgmYkzIAhQn7eyPAKIRr3ej1ZOpBwub3NXYRw==" sparkle:dsaSignature="MC0CFD+wxEcpX1oSqMBdwq6pa3bspqs0AhUAyrwVnPz99VB13tbzXvNd5NjNqJI="
length="15025572" length="15266980"
type="application/octet-stream"/> type="application/octet-stream"/>
</item> </item>
</channel> </channel>

View File

@ -2,6 +2,12 @@
* ... * ...
# 0.26.1-???
* Fix broken "Navigate to the current buffer" of the file browser
* Dependencies updates:
- Use FontAwesome 5 (thanks for the PR, @chriszielinski!)
# 0.26.0-303 # 0.26.0-303
* Minimum macOS requirement is now 10.12 Sierra. * Minimum macOS requirement is now 10.12 Sierra.