aboutsummaryrefslogtreecommitdiff
path: root/src/preferences
diff options
context:
space:
mode:
Diffstat (limited to 'src/preferences')
-rw-r--r--src/preferences/EditorPrefs.hpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/preferences/EditorPrefs.hpp b/src/preferences/EditorPrefs.hpp
index 9a8ca0d..4287410 100644
--- a/src/preferences/EditorPrefs.hpp
+++ b/src/preferences/EditorPrefs.hpp
@@ -17,15 +17,25 @@ public:
}
virtual bool TransferDataToWindow() {
+ CONFIG_OPEN(config);
+ row_size->SetValue(config->Read("editor/row_size", 50));
+ col_size->SetValue(config->Read("editor/col_size", 100));
+ show_move_icons->SetValue(config->Read("editor/show_move_icons", true));
+ CONFIG_CLOSE(config);
return true;
}
void ApplyPreferences() {
-
+ CONFIG_OPEN(config);
+ config->Write("editor/row_size", row_size->GetValue());
+ config->Write("editor/col_size", col_size->GetValue());
+ config->Write("editor/show_move_icons", show_move_icons->GetValue());
+ CONFIG_CLOSE(config);
}
virtual bool TransferDataFromWindow() {
-
+ ApplyPreferences();
+ MAINWIN->ApplyPreferences();
return (true);
}
};