PrefPackage // Patch the behavior of handling window titles.

This commit is contained in:
ShikiSuen 2022-04-10 13:08:03 +08:00
parent 54e236539f
commit 347f174d6c
1 changed files with 10 additions and 7 deletions

View File

@ -114,13 +114,16 @@ final class PreferencesTabViewController: NSViewController, PreferencesStyleCont
private func updateWindowTitle(tabIndex: Int) {
window.title = {
if preferencePanes.count > 1 {
return preferencePanes[tabIndex].preferencePaneTitle
} else {
let preferences = Localization[.preferences]
let appName = Bundle.main.appName
return "\(appName) \(preferences)"
}
// if preferencePanes.count > 1 {
// return preferencePanes[tabIndex].preferencePaneTitle
// } else {
// let preferences = Localization[.preferences]
// let appName = Bundle.main.appName
// return "\(appName) \(preferences)"
// }
var preferencesTitleName = NSLocalizedString("vChewing Preferences…", comment: "")
preferencesTitleName.removeLast()
return preferencesTitleName
}()
}