diff options
author | Ricky Kresslein <rk@lakoliu.com> | 2022-05-20 12:26:53 +0300 |
---|---|---|
committer | Ricky Kresslein <rk@lakoliu.com> | 2022-05-20 12:26:53 +0300 |
commit | 3942e6cab7a0883220d78068dc47ddf81760a90e (patch) | |
tree | d8ea83980739befb888ca827d6a9952fc4e9d478 /src/ui/preferences_window.rs | |
parent | 1dd125d02f5d66643e39fe2da636d036ed733904 (diff) | |
download | Furtherance-3942e6cab7a0883220d78068dc47ddf81760a90e.tar.zst |
Autosave (Issue #45)
Diffstat (limited to 'src/ui/preferences_window.rs')
-rwxr-xr-x | src/ui/preferences_window.rs | 17 |
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(); |