mirror of
https://github.com/qvacua/vimr.git
synced 2024-11-28 02:54:31 +03:00
Merge branch 'master' into issue/275-cursor
This commit is contained in:
commit
3389d18743
@ -15,11 +15,11 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.9.0-SNAPSHOT-20160911.1535</string>
|
||||
<string>0.9.0-SNAPSHOT-20160914.2302</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>72</string>
|
||||
<string>74</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2016 Tae Won Ha. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
|
@ -15,10 +15,10 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.9.0-SNAPSHOT-20160911.1535</string>
|
||||
<string>0.9.0-SNAPSHOT-20160914.2302</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>72</string>
|
||||
<string>74</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
@ -1002,7 +1002,7 @@
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 72;
|
||||
DYLIB_CURRENT_VERSION = 74;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@ -1026,7 +1026,7 @@
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 72;
|
||||
DYLIB_CURRENT_VERSION = 74;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@ -1141,7 +1141,7 @@
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 72;
|
||||
CURRENT_PROJECT_VERSION = 74;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
@ -1188,7 +1188,7 @@
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 72;
|
||||
CURRENT_PROJECT_VERSION = 74;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
|
@ -48,7 +48,10 @@ extension NSTableView {
|
||||
static func standardTableView() -> NSTableView {
|
||||
let tableView = NSTableView(frame: CGRect.zero)
|
||||
|
||||
tableView.addTableColumn(NSTableColumn(identifier: "name"))
|
||||
let column = NSTableColumn(identifier: "name")
|
||||
column.editable = false
|
||||
|
||||
tableView.addTableColumn(column)
|
||||
tableView.rowSizeStyle = .Default
|
||||
tableView.sizeLastColumnToFit()
|
||||
tableView.allowsEmptySelection = false
|
||||
|
@ -22,7 +22,11 @@ class AppearancePrefPane: PrefPane, NSComboBoxDelegate, NSControlTextEditingDele
|
||||
return true
|
||||
}
|
||||
|
||||
private var data: AppearancePrefData
|
||||
private var data: AppearancePrefData {
|
||||
didSet {
|
||||
self.updateViews(newData: self.data)
|
||||
}
|
||||
}
|
||||
|
||||
private let fontManager = NSFontManager.sharedFontManager()
|
||||
|
||||
@ -62,7 +66,6 @@ class AppearancePrefPane: PrefPane, NSComboBoxDelegate, NSControlTextEditingDele
|
||||
.map { ($0 as! PrefData).appearance }
|
||||
.filter { [unowned self] data in data != self.data }
|
||||
.subscribeNext { [unowned self] data in
|
||||
self.updateViews(newData: data)
|
||||
self.data = data
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ func == (left: GeneralPrefData, right: GeneralPrefData) -> Bool {
|
||||
&& left.ignorePatterns == right.ignorePatterns
|
||||
}
|
||||
|
||||
class GeneralPrefPane: PrefPane {
|
||||
class GeneralPrefPane: PrefPane, NSTextFieldDelegate {
|
||||
|
||||
override var pinToContainer: Bool {
|
||||
return true
|
||||
@ -37,7 +37,6 @@ class GeneralPrefPane: PrefPane {
|
||||
super.init(source: source)
|
||||
|
||||
self.updateViews(newData: initialData)
|
||||
self.addReactions()
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
@ -60,6 +59,10 @@ class GeneralPrefPane: PrefPane {
|
||||
|
||||
let ignoreListTitle = self.titleTextField(title: "Files To Ignore:")
|
||||
let ignoreField = self.ignoreField
|
||||
NSNotificationCenter.defaultCenter()
|
||||
.addObserverForName(NSControlTextDidEndEditingNotification, object: ignoreField, queue: nil) { [unowned self] _ in
|
||||
self.ignorePatternsAction()
|
||||
}
|
||||
let ignoreInfo = self.infoTextField(text: "")
|
||||
ignoreInfo.attributedStringValue = self.ignoreInfoText()
|
||||
|
||||
@ -142,16 +145,8 @@ class GeneralPrefPane: PrefPane {
|
||||
}
|
||||
}
|
||||
|
||||
private func addReactions() {
|
||||
self.ignoreField.rx_text
|
||||
.skip(1) // To skip the event when the field gets created and is not yet initialized.
|
||||
.throttle(0.2, scheduler: MainScheduler.instance)
|
||||
.distinctUntilChanged()
|
||||
.flatMapLatest { Observable.just(PrefUtils.ignorePatterns(fromString: $0)) }
|
||||
.subscribeNext { [unowned self] patterns in
|
||||
self.ignorePatternsAction(patterns)
|
||||
}
|
||||
.addDisposableTo(self.disposeBag)
|
||||
override func windowWillClose() {
|
||||
self.ignorePatternsAction()
|
||||
}
|
||||
|
||||
private func set(data data: GeneralPrefData) {
|
||||
@ -237,7 +232,12 @@ extension GeneralPrefPane {
|
||||
)
|
||||
}
|
||||
|
||||
private func ignorePatternsAction(patterns: Set<FileItemIgnorePattern>) {
|
||||
private func ignorePatternsAction() {
|
||||
let patterns = PrefUtils.ignorePatterns(fromString: self.ignoreField.stringValue)
|
||||
if patterns == self.data.ignorePatterns {
|
||||
return
|
||||
}
|
||||
|
||||
self.set(data: GeneralPrefData(
|
||||
openNewWindowWhenLaunching: self.data.openNewWindowWhenLaunching,
|
||||
openNewWindowOnReactivation: self.data.openNewWindowOnReactivation,
|
||||
@ -253,3 +253,4 @@ extension GeneralPrefPane {
|
||||
alert.runModal()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.9.0-SNAPSHOT-20160911.1535</string>
|
||||
<string>0.9.0-SNAPSHOT-20160914.2302</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleURLTypes</key>
|
||||
@ -49,7 +49,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>72</string>
|
||||
<string>74</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
|
@ -55,6 +55,10 @@ class PrefPane: NSView, Component {
|
||||
func publish(event event: Any) {
|
||||
self.subject.onNext(event)
|
||||
}
|
||||
|
||||
func windowWillClose() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Control Utils
|
||||
|
@ -12,7 +12,7 @@ struct PrefData {
|
||||
var appearance: AppearancePrefData
|
||||
}
|
||||
|
||||
class PrefWindowComponent: WindowComponent, NSTableViewDataSource, NSTableViewDelegate {
|
||||
class PrefWindowComponent: WindowComponent, NSWindowDelegate, NSTableViewDataSource, NSTableViewDelegate {
|
||||
|
||||
private var data: PrefData
|
||||
|
||||
@ -48,6 +48,8 @@ class PrefWindowComponent: WindowComponent, NSTableViewDataSource, NSTableViewDe
|
||||
|
||||
super.init(source: source, nibName: "PrefWindow")
|
||||
|
||||
self.window.delegate = self
|
||||
|
||||
self.addReactions()
|
||||
}
|
||||
|
||||
@ -117,6 +119,10 @@ class PrefWindowComponent: WindowComponent, NSTableViewDataSource, NSTableViewDe
|
||||
.subscribeNext { [unowned self] action in self.publish(event: action) }
|
||||
.addDisposableTo(self.disposeBag)
|
||||
}
|
||||
|
||||
func windowWillClose(notification: NSNotification) {
|
||||
self.panes.forEach { $0.windowWillClose() }
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - NSTableViewDataSource
|
||||
|
@ -15,10 +15,10 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.9.0-SNAPSHOT-20160911.1535</string>
|
||||
<string>0.9.0-SNAPSHOT-20160914.2302</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>72</string>
|
||||
<string>74</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
2
neovim
2
neovim
@ -1 +1 @@
|
||||
Subproject commit 8af314133e2056683c95b88e8dca135ed23303fc
|
||||
Subproject commit 6ff44253457a9044c6b42304a032cbeac833fc43
|
Loading…
Reference in New Issue
Block a user