PrefWindow // Allow enabling / disabling external dictionary plists.

This commit is contained in:
ShikiSuen 2023-01-10 23:38:15 +08:00
parent 8b16674240
commit a210d215c2
6 changed files with 28 additions and 9 deletions

View File

@ -29,7 +29,6 @@ extension NSToolbarItem.Identifier {
// It should be set as "Preferences" which correspondes to the "Preference" pref pane
// of this build target.
class CtlPrefWindow: NSWindowController, NSWindowDelegate {
@IBOutlet var fontSizePopUpButton: NSPopUpButton!
@IBOutlet var uiLanguageButton: NSPopUpButton!
@IBOutlet var basicKeyboardLayoutButton: NSPopUpButton!
@IBOutlet var selectionKeyComboBox: NSComboBox!
@ -267,6 +266,10 @@ class CtlPrefWindow: NSWindowController, NSWindowDelegate {
}
}
@IBAction func toggledExternalFactoryPlistDataOnOff(_: NSButton) {
LMMgr.reloadFactoryDictionaryPlists()
}
@IBAction func resetSpecifiedUserDataFolder(_: Any) {
LMMgr.resetSpecifiedUserDataFolder()
}

View File

@ -19,7 +19,6 @@
<outlet property="cmbCandidateFontSize" destination="90" id="K27-YZ-Iki"/>
<outlet property="cmbPEDataTypeMenu" destination="Hdr-Qr-1qw" id="6Dv-pj-1EE"/>
<outlet property="cmbPEInputModeMenu" destination="y5f-AO-wKG" id="hW9-zZ-t8S"/>
<outlet property="fontSizePopUpButton" destination="90" id="108"/>
<outlet property="lblCurrentlySpecifiedUserDataFolder" destination="REC-r4-T7m" id="eEq-XN-mMq"/>
<outlet property="selectionKeyComboBox" destination="uHU-aL-du7" id="cEx-Ui-Phc"/>
<outlet property="tfdPETextEditor" destination="kSG-dz-P2N" id="aiA-EA-Isg"/>
@ -876,14 +875,14 @@
</view>
<userDefaultsController representsSharedInstance="YES" id="32"/>
<view id="Rnp-LM-RIF" userLabel="vwrDictionary">
<rect key="frame" x="0.0" y="0.0" width="445" height="284"/>
<rect key="frame" x="0.0" y="0.0" width="445" height="316"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<stackView distribution="fill" orientation="vertical" alignment="leading" spacing="6" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" translatesAutoresizingMaskIntoConstraints="NO" id="6xK-1z-A14">
<rect key="frame" x="20" y="34" width="407" height="230"/>
<rect key="frame" x="20" y="45" width="407" height="251"/>
<subviews>
<textField autoresizesSubviews="NO" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="FUV-qx-xkC">
<rect key="frame" x="-2" y="215" width="388" height="15"/>
<rect key="frame" x="-2" y="236" width="388" height="15"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Choose your desired user data folder path. Will be omitted if invalid." id="wN3-k3-b2a">
<font key="font" metaFont="cellTitle"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@ -891,7 +890,7 @@
</textFieldCell>
</textField>
<stackView distribution="fill" orientation="horizontal" alignment="bottom" spacing="0.0" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" translatesAutoresizingMaskIntoConstraints="NO" id="uUS-Ni-jFP">
<rect key="frame" x="0.0" y="189" width="407" height="20"/>
<rect key="frame" x="0.0" y="210" width="407" height="20"/>
<subviews>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" textCompletion="NO" translatesAutoresizingMaskIntoConstraints="NO" id="s7t-Kk-EPu">
<rect key="frame" x="0.0" y="0.0" width="347" height="19"/>
@ -950,7 +949,7 @@
</customSpacing>
</stackView>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="p7V-IN-OTr">
<rect key="frame" x="-1" y="167.5" width="336" height="16"/>
<rect key="frame" x="-1" y="188.5" width="336" height="16"/>
<buttonCell key="cell" type="check" title="Automatically reload user data files if changes detected" bezelStyle="regularSquare" imagePosition="left" controlSize="small" state="on" inset="2" id="f8i-69-zxm">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="cellTitle"/>
@ -959,6 +958,17 @@
<binding destination="32" name="value" keyPath="values.ShouldAutoReloadUserDataFiles" id="XTI-ol-DVN"/>
</connections>
</button>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="MJ6-U4-qyl">
<rect key="frame" x="-1" y="167.5" width="297" height="16"/>
<buttonCell key="cell" type="check" title="Read external factory dictionary plists if possible" bezelStyle="regularSquare" imagePosition="left" controlSize="small" state="on" inset="2" id="fEA-Bp-Ayn" userLabel="chkUseExternalFactoryDict">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="cellTitle"/>
</buttonCell>
<connections>
<action selector="toggledExternalFactoryPlistDataOnOff:" target="-2" id="TYX-1b-x0P"/>
<binding destination="32" name="value" keyPath="values.UseExternalFactoryDict" id="1Gp-Ax-mRK"/>
</connections>
</button>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ZQK-w3-FRb">
<rect key="frame" x="-1" y="146.5" width="274" height="16"/>
<buttonCell key="cell" type="check" title="Only load factory language models if needed" bezelStyle="regularSquare" imagePosition="left" controlSize="small" state="on" inset="2" id="chkOnlyLoadFactoryLangModelsIfNeeded" userLabel="chkOnlyLoadFactoryLangModelsIfNeeded">
@ -1055,6 +1065,7 @@
<integer value="1000"/>
<integer value="1000"/>
<integer value="1000"/>
<integer value="1000"/>
</visibilityPriorities>
<customSpacing>
<real value="3.4028234663852886e+38"/>
@ -1068,6 +1079,7 @@
<real value="3.4028234663852886e+38"/>
<real value="3.4028234663852886e+38"/>
<real value="3.4028234663852886e+38"/>
<real value="3.4028234663852886e+38"/>
</customSpacing>
</stackView>
</subviews>
@ -1075,7 +1087,7 @@
<constraint firstItem="6xK-1z-A14" firstAttribute="top" secondItem="Rnp-LM-RIF" secondAttribute="top" constant="20" symbolic="YES" id="W7P-xQ-mDE"/>
<constraint firstItem="6xK-1z-A14" firstAttribute="leading" secondItem="Rnp-LM-RIF" secondAttribute="leading" constant="20" symbolic="YES" id="zFW-2a-uC3"/>
</constraints>
<point key="canvasLocation" x="101.5" y="178"/>
<point key="canvasLocation" x="93.5" y="217"/>
</view>
<view id="ZEr-3U-K9a" userLabel="vwrCassette">
<rect key="frame" x="0.0" y="0.0" width="445" height="488"/>
@ -1755,7 +1767,7 @@
<rect key="frame" x="0.0" y="80" width="538" height="360"/>
<clipView key="contentView" drawsBackground="NO" id="x8s-wo-bxi">
<rect key="frame" x="0.0" y="0.0" width="538" height="360"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<textView wantsLayer="YES" importsGraphics="NO" richText="NO" verticallyResizable="YES" allowsUndo="YES" smartInsertDelete="YES" id="kSG-dz-P2N">
<rect key="frame" x="0.0" y="0.0" width="538" height="360"/>

View File

@ -61,6 +61,7 @@
"eia-1F-Do0.title" = "Auto-convert traditional Chinese glyphs to JIS Shinjitai characters";
"f2j-xD-4xK.title" = "Use ESC key to clear the entire input buffer";
"f8i-69-zxm.title" = "Automatically reload user data files if changes detected";
"fEA-Bp-Ayn.title" = "Read external factory dictionary plists if possible";
"FnD-oH-El5.title" = "Selection Keys:";
"fQ0-Yu-pJF.title" = "Enforce conversion in both input modes";
"FSG-lN-CJO.title" = "English";

View File

@ -61,6 +61,7 @@
"eia-1F-Do0.title" = "入力した繁体字を日文 JIS 新字体と自動変換";
"f2j-xD-4xK.title" = "ESC キーで入力緩衝列を消す";
"f8i-69-zxm.title" = "変更されたユーザー辞書データを自動的に再読込";
"fEA-Bp-Ayn.title" = "なるべく(内蔵辞書より)外部の公式辞書ファイルを利用";
"FnD-oH-El5.title" = "言選り用キー:";
"fQ0-Yu-pJF.title" = "カセットモードによる漢字出力の簡体繁体転換を常に行う";
"FSG-lN-CJO.title" = "英語";

View File

@ -61,6 +61,7 @@
"eia-1F-Do0.title" = "自动将繁体中文字转换为日本简化字JIS 新字体)";
"f2j-xD-4xK.title" = "敲 ESC 键以清空整个输入缓冲区";
"f8i-69-zxm.title" = "自动重新加载变更过的使用者资料内容";
"fEA-Bp-Ayn.title" = "尽量使用外置原厂辞典 plist 档案";
"FnD-oH-El5.title" = "选字键:";
"fQ0-Yu-pJF.title" = "依当前简繁模式强制转换";
"FSG-lN-CJO.title" = "英文";

View File

@ -61,6 +61,7 @@
"eia-1F-Do0.title" = "自動將繁體中文字轉換為日本簡化字JIS 新字體)";
"f2j-xD-4xK.title" = "敲 ESC 鍵以清空整個輸入緩衝區";
"f8i-69-zxm.title" = "自動重新載入變更過的使用者資料內容";
"fEA-Bp-Ayn.title" = "盡量使用外置原廠辭典 plist 檔案";
"FnD-oH-El5.title" = "選字鍵:";
"fQ0-Yu-pJF.title" = "依當前簡繁模式強制轉換";
"FSG-lN-CJO.title" = "英文";