From 3cbbabd4aa35342b36dce327794149f0c5704508 Mon Sep 17 00:00:00 2001 From: Ricky Kresslein Date: Sat, 3 Jun 2023 15:48:46 +0200 Subject: #99: Inclusive total time --- src/ui/preferences_window.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/ui/preferences_window.rs') diff --git a/src/ui/preferences_window.rs b/src/ui/preferences_window.rs index c7f6344..bd135de 100644 --- a/src/ui/preferences_window.rs +++ b/src/ui/preferences_window.rs @@ -72,6 +72,9 @@ mod imp { #[template_child] pub autosave_spin: TemplateChild, + #[template_child] + pub inclusive_total_switch: TemplateChild, + #[template_child] pub database_loc_row: TemplateChild, #[template_child] @@ -181,6 +184,8 @@ impl FurPreferencesWindow { settings_manager::bind_property("autosave-time", &*imp.autosave_spin, "value"); + settings_manager::bind_property("inclusive-total", &*imp.inclusive_total_switch, "active"); + imp.dark_theme_switch.connect_active_notify(move |_| { let app = FurtheranceApplication::default(); app.update_light_dark(); @@ -224,6 +229,11 @@ impl FurPreferencesWindow { window.refresh_timer(); }); + imp.inclusive_total_switch.connect_active_notify(move |_| { + let window = FurtheranceWindow::default(); + window.reset_history_box(); + }); + imp.database_browse_btn.connect_clicked(clone!(@weak self as this => move |_| { let window = FurtheranceApplication::default().active_window().unwrap(); let dialog = gtk::FileChooserDialog::new( -- cgit 1.4.1