mirror of https://github.com/buggins/dlangide.git
settings dialog
This commit is contained in:
parent
1dfe3d581d
commit
7c93323549
|
@ -633,10 +633,13 @@ class IDEFrame : AppFrame {
|
|||
}
|
||||
|
||||
void showPreferences() {
|
||||
//Log.d("settings before copy:\n", _settings.setting.toJSON(true));
|
||||
Setting s = _settings.copySettings();
|
||||
//Log.d("settings after copy:\n", s.toJSON(true));
|
||||
SettingsDialog dlg = new SettingsDialog(UIString("DlangIDE settings"d), window, s, createSettingsPages());
|
||||
dlg.onDialogResult = delegate(Dialog dlg, const Action result) {
|
||||
if (result.id == ACTION_APPLY.id) {
|
||||
//Log.d("settings after edit:\n", s.toJSON(true));
|
||||
_settings.applySettings(s);
|
||||
_settings.save();
|
||||
}
|
||||
|
|
|
@ -111,10 +111,10 @@ SettingsPage createSettingsPages() {
|
|||
SettingsPage res = new SettingsPage("", UIString(""d));
|
||||
SettingsPage ed = res.addChild("editors", UIString("Editors"d));
|
||||
SettingsPage texted = ed.addChild("editors/textEditor", UIString("Text Editors"d));
|
||||
texted.addNumberEdit("editors/textEditor/tabSize", UIString("Tab size"d), 1, 16, 4);
|
||||
texted.addCheckbox("editors/textEditor/useSpacesForTabs", UIString("Use spaces for tabs"d));
|
||||
texted.addCheckbox("editors/textEditor/smartIndents", UIString("Smart indents"d));
|
||||
texted.addCheckbox("editors/textEditor/smartIndentsAfterPaste", UIString("Smart indent after paste"d));
|
||||
//ed.setIntegerDef("tabSize", 4);
|
||||
SettingsPage ui = res.addChild("interface", UIString("Interface"d));
|
||||
//ui.setStringDef("theme", "theme_default");
|
||||
//ui.setStringDef("language", "en");
|
||||
|
|
Loading…
Reference in New Issue