|
@@ -115,14 +115,14 @@ class KMPreferenceDisplayController: NSViewController {
|
|
|
comboBox?.delegate = self
|
|
|
}
|
|
|
|
|
|
- for radio in [self.putAwayRadio, self.rememberLastSelectionRadio,
|
|
|
+ for radio in [self.putAwayRadio, self.rememberLastSelectionRadio, self.showOutlineCheck,
|
|
|
self.autoExpandRadio, self.manualExpandRadio,
|
|
|
self.autoDisplayRadio, self.alwaysShowRadio, self.neverShowRadio] {
|
|
|
radio?.target = self
|
|
|
radio?.action = #selector(radioAction)
|
|
|
}
|
|
|
|
|
|
- for check in [self.showOutlineCheck, self.hightlightedFormsLabel,self.highlightedLinksCheck] {
|
|
|
+ for check in [self.hightlightedFormsLabel,self.highlightedLinksCheck] {
|
|
|
check?.target = self
|
|
|
check?.action = #selector(checkAction)
|
|
|
}
|
|
@@ -197,18 +197,15 @@ class KMPreferenceDisplayController: NSViewController {
|
|
|
self.zoomScaleComboBox.stringValue = self.viewZoomScaleTypes[value2.rawValue]
|
|
|
}
|
|
|
|
|
|
- if (KMPreferenceManager.shared.leftSideDisplayType == .closeWhenOpenFile) {
|
|
|
+ let leftSideDisplayType = KMPreferenceManager.shared.leftSideDisplayType
|
|
|
+ if (leftSideDisplayType == .closeWhenOpenFile) {
|
|
|
self.selectLeftSideRadio(self.putAwayRadio)
|
|
|
- } else {
|
|
|
+ } else if (leftSideDisplayType == .openAppSaveLastSelect) {
|
|
|
self.selectLeftSideRadio(self.rememberLastSelectionRadio)
|
|
|
+ } else if (leftSideDisplayType == .showOutlineIfHas) {
|
|
|
+ self.selectLeftSideRadio(self.showOutlineCheck)
|
|
|
}
|
|
|
|
|
|
-// if (KMPreferenceManager.shared.showOutlineList) {
|
|
|
-// self.showOutlineCheck.state = .on
|
|
|
-// } else {
|
|
|
-// self.showOutlineCheck.state = .off
|
|
|
-// }
|
|
|
-
|
|
|
if (KMPreferenceManager.shared.propertyPanelExpandType == .auto) {
|
|
|
self.selectDisplayRadio(self.autoExpandRadio)
|
|
|
} else {
|
|
@@ -251,6 +248,10 @@ class KMPreferenceDisplayController: NSViewController {
|
|
|
self.selectLeftSideRadio(sender)
|
|
|
|
|
|
KMPreferenceManager.shared.leftSideDisplayType = .openAppSaveLastSelect
|
|
|
+ } else if (self.showOutlineCheck.isEqual(sender)) {
|
|
|
+ self.selectLeftSideRadio(sender)
|
|
|
+
|
|
|
+ KMPreferenceManager.shared.leftSideDisplayType = .showOutlineIfHas
|
|
|
} else if (self.autoExpandRadio.isEqual(sender)) {
|
|
|
self.selectDisplayRadio(sender)
|
|
|
|
|
@@ -275,11 +276,7 @@ class KMPreferenceDisplayController: NSViewController {
|
|
|
}
|
|
|
|
|
|
@objc private func checkAction(sender: NSButton) {
|
|
|
- if (self.showOutlineCheck.isEqual(sender)) {
|
|
|
- self.selectLeftSideRadio(sender)
|
|
|
-
|
|
|
- KMPreferenceManager.shared.showOutlineList = sender.state == .on
|
|
|
- } else if (self.hightlightedFormsLabel.isEqual(sender)) {
|
|
|
+ if (self.hightlightedFormsLabel.isEqual(sender)) {
|
|
|
KMPreferenceManager.shared.highlightForms = sender.state == .on
|
|
|
} else if (self.highlightedLinksCheck.isEqual(sender)) {
|
|
|
let _ = KMPreferenceManager.shared.setData(data: sender.state == .on, forKey: KMHighlightLinksKey)
|