FSEventStreamHelper // Update path when necessary.
This commit is contained in:
parent
06d41f9216
commit
8eae5ecfe1
|
@ -47,7 +47,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, ctlNonModalAlertWindowDelega
|
||||||
private var ctlAboutWindowInstance: ctlAboutWindow? // New About Window
|
private var ctlAboutWindowInstance: ctlAboutWindow? // New About Window
|
||||||
private var checkTask: URLSessionTask?
|
private var checkTask: URLSessionTask?
|
||||||
private var updateNextStepURL: URL?
|
private var updateNextStepURL: URL?
|
||||||
private var fsStreamHelper = FSEventStreamHelper(
|
public var fsStreamHelper = FSEventStreamHelper(
|
||||||
path: mgrLangModel.dataFolderPath(isDefaultFolder: false),
|
path: mgrLangModel.dataFolderPath(isDefaultFolder: false),
|
||||||
queue: DispatchQueue(label: "vChewing User Phrases")
|
queue: DispatchQueue(label: "vChewing User Phrases")
|
||||||
)
|
)
|
||||||
|
@ -76,6 +76,10 @@ class AppDelegate: NSObject, NSApplicationDelegate, ctlNonModalAlertWindowDelega
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func updateStreamHelperPath() {
|
||||||
|
fsStreamHelper.path = mgrPrefs.userDataFolderSpecified
|
||||||
|
}
|
||||||
|
|
||||||
func showPreferences() {
|
func showPreferences() {
|
||||||
if ctlPrefWindowInstance == nil {
|
if ctlPrefWindowInstance == nil {
|
||||||
ctlPrefWindowInstance = ctlPrefWindow.init(windowNibName: "frmPrefWindow")
|
ctlPrefWindowInstance = ctlPrefWindow.init(windowNibName: "frmPrefWindow")
|
||||||
|
|
|
@ -37,7 +37,7 @@ public class FSEventStreamHelper: NSObject {
|
||||||
var id: FSEventStreamEventId
|
var id: FSEventStreamEventId
|
||||||
}
|
}
|
||||||
|
|
||||||
public let path: String
|
public var path: String
|
||||||
public let dispatchQueue: DispatchQueue
|
public let dispatchQueue: DispatchQueue
|
||||||
public weak var delegate: FSEventStreamHelperDelegate?
|
public weak var delegate: FSEventStreamHelperDelegate?
|
||||||
|
|
||||||
|
|
|
@ -79,6 +79,7 @@ struct suiPrefPaneDictionary: View {
|
||||||
mgrPrefs.userDataFolderSpecified = newPath
|
mgrPrefs.userDataFolderSpecified = newPath
|
||||||
tbxUserDataPathSpecified = mgrPrefs.userDataFolderSpecified
|
tbxUserDataPathSpecified = mgrPrefs.userDataFolderSpecified
|
||||||
IME.initLangModels(userOnly: true)
|
IME.initLangModels(userOnly: true)
|
||||||
|
(NSApplication.shared.delegate as! AppDelegate).updateStreamHelperPath()
|
||||||
} else {
|
} else {
|
||||||
clsSFX.beep()
|
clsSFX.beep()
|
||||||
if !bolPreviousFolderValidity {
|
if !bolPreviousFolderValidity {
|
||||||
|
|
|
@ -276,6 +276,7 @@ class ctlPrefWindow: NSWindowController {
|
||||||
if mgrLangModel.checkIfSpecifiedUserDataFolderValid(newPath) {
|
if mgrLangModel.checkIfSpecifiedUserDataFolderValid(newPath) {
|
||||||
mgrPrefs.userDataFolderSpecified = newPath
|
mgrPrefs.userDataFolderSpecified = newPath
|
||||||
IME.initLangModels(userOnly: true)
|
IME.initLangModels(userOnly: true)
|
||||||
|
(NSApplication.shared.delegate as! AppDelegate).updateStreamHelperPath()
|
||||||
} else {
|
} else {
|
||||||
clsSFX.beep()
|
clsSFX.beep()
|
||||||
if !bolPreviousFolderValidity {
|
if !bolPreviousFolderValidity {
|
||||||
|
|
Loading…
Reference in New Issue