@@ -18,6 +18,8 @@ const languagePreferenceKey = "language"
1818const autoSavePdfKey = "auto-save-pdf"
1919const autoSaveLocationKey = "auto-save-location"
2020
21+ const runInBackgroundKey = "run-in-background"
22+
2123const lastUsedDirectoryKey = "last-used-directory"
2224
2325const smartboxModeKey = "smartbox-mode"
@@ -56,6 +58,10 @@ func showSetupBox() func() {
5658 autoSaveLocationEntry .SetText (autoSaveLocation )
5759 autoSaveLocationEntry .SetPlaceHolder (t ("preference.placeholder.directoryPath" ))
5860
61+ runInBackground := preferences .BoolWithFallback (runInBackgroundKey , false )
62+ runInBackgroundCheck := widget .NewCheck ("" , func (b bool ) {})
63+ runInBackgroundCheck .SetChecked (runInBackground )
64+
5965 mupPkcsEntry := widget .NewEntry ()
6066 mupPkcsEntry .SetText (preferences .String (mupPkcsPathKey ))
6167 mupPkcsEntry .SetPlaceHolder (t ("preference.placeholder.modulePath" ))
@@ -115,6 +121,8 @@ func showSetupBox() func() {
115121 {Text : t ("preference.language" ), Widget : languageSelect },
116122 {Text : t ("preference.autoSave" ), Widget : autoSavePdfSelect },
117123 {Text : t ("preference.autoSaveLocation" ), Widget : autoSaveLocationEntry },
124+ {Text : t ("preference.runInBackground" ), Widget : runInBackgroundCheck },
125+ {Text : "" , Widget : & widgets.Spacer {}},
118126 {Text : t ("preference.smartboxMode" ), Widget : smartboxModeCheck },
119127 {Text : "MUP" , Widget : mupPkcsEntry },
120128 {Text : "PKS" , Widget : pksPkcsEntry },
@@ -129,6 +137,7 @@ func showSetupBox() func() {
129137 preferences .SetInt (languagePreferenceKey , languageSelect .SelectedIndex ())
130138 preferences .SetInt (autoSavePdfKey , autoSavePdfSelect .SelectedIndex ())
131139 preferences .SetString (autoSaveLocationKey , autoSaveLocationEntry .Text )
140+ preferences .SetBool (runInBackgroundKey , runInBackgroundCheck .Checked )
132141 preferences .SetBool (smartboxModeKey , smartboxModeCheck .Checked )
133142 preferences .SetString (mupPkcsPathKey , mupPkcsEntry .Text )
134143 preferences .SetString (pksPkcsPathKey , pksPkcsEntry .Text )
0 commit comments