about summary refs log tree commit diff
path: root/src/ui/preferences_window.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/preferences_window.rs')
-rwxr-xr-xsrc/ui/preferences_window.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/ui/preferences_window.rs b/src/ui/preferences_window.rs
index 6436026..d034a9f 100755
--- a/src/ui/preferences_window.rs
+++ b/src/ui/preferences_window.rs
@@ -64,6 +64,11 @@ mod imp {
         pub pomodoro_expander: TemplateChild<adw::ExpanderRow>,
         #[template_child]
         pub pomodoro_spin: TemplateChild<gtk::SpinButton>,
+
+        #[template_child]
+        pub autosave_expander: TemplateChild<adw::ExpanderRow>,
+        #[template_child]
+        pub autosave_spin: TemplateChild<gtk::SpinButton>,
     }
 
     #[glib::object_subclass]
@@ -194,6 +199,18 @@ impl FurPreferencesWindow {
             "value"
         );
 
+        settings_manager::bind_property(
+            "autosave",
+            &*imp.autosave_expander,
+            "enable-expansion"
+        );
+
+        settings_manager::bind_property(
+            "autosave-time",
+            &*imp.autosave_spin,
+            "value"
+        );
+
         imp.dark_theme_switch.connect_active_notify(move |_|{
             let app = FurtheranceApplication::default();
             app.update_light_dark();