diff options
author | Ricky Kresslein <rk@lakoliu.com> | 2023-06-03 15:48:46 +0200 |
---|---|---|
committer | Ricky Kresslein <rk@lakoliu.com> | 2023-06-03 15:48:46 +0200 |
commit | 3cbbabd4aa35342b36dce327794149f0c5704508 (patch) | |
tree | 3d128ef166b2aabfedffbc7a7ac7a26c3f854d10 /src/ui/preferences_window.rs | |
parent | 432362b9c3c028d7525fec0bdfbd3660355ea894 (diff) | |
download | Furtherance-3cbbabd4aa35342b36dce327794149f0c5704508.tar.zst |
#99: Inclusive total time
Diffstat (limited to 'src/ui/preferences_window.rs')
-rw-r--r-- | src/ui/preferences_window.rs | 10 |
1 files changed, 10 insertions, 0 deletions
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 @@ -73,6 +73,9 @@ mod imp { pub autosave_spin: TemplateChild<gtk::SpinButton>, #[template_child] + pub inclusive_total_switch: TemplateChild<gtk::Switch>, + + #[template_child] pub database_loc_row: TemplateChild<adw::ActionRow>, #[template_child] pub database_browse_btn: TemplateChild<gtk::Button>, @@ -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( |