From 3942e6cab7a0883220d78068dc47ddf81760a90e Mon Sep 17 00:00:00 2001 From: Ricky Kresslein Date: Fri, 20 May 2022 12:26:53 +0300 Subject: Autosave (Issue #45) --- src/ui/preferences_window.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/ui/preferences_window.rs') 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, #[template_child] pub pomodoro_spin: TemplateChild, + + #[template_child] + pub autosave_expander: TemplateChild, + #[template_child] + pub autosave_spin: TemplateChild, } #[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(); -- cgit 1.4.1