diff options
author | Ricky Kresslein <rk@lakoliu.com> | 2022-03-05 17:43:08 +0100 |
---|---|---|
committer | Ricky Kresslein <rk@lakoliu.com> | 2022-03-05 17:43:08 +0100 |
commit | e2bbca53121f51c76bdfa54f0d239c8db5ca59be (patch) | |
tree | 2e7837a89f781093ba30cd9f810050b17f8cc11a /src/ui/preferences_window.rs | |
parent | 0f05a52d429c41b538fa3b362cad3a54db04e5cd (diff) | |
download | Furtherance-e2bbca53121f51c76bdfa54f0d239c8db5ca59be.tar.zst |
- Added 'delete confirmation' setting
- Added 'show seconds' setting
Diffstat (limited to 'src/ui/preferences_window.rs')
-rwxr-xr-x | src/ui/preferences_window.rs | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/ui/preferences_window.rs b/src/ui/preferences_window.rs index 644ca22..12e8c30 100755 --- a/src/ui/preferences_window.rs +++ b/src/ui/preferences_window.rs @@ -48,6 +48,10 @@ mod imp { pub limit_tasks_expander: TemplateChild<adw::ExpanderRow>, #[template_child] pub limit_days_spin: TemplateChild<gtk::SpinButton>, + #[template_child] + pub delete_confirmation_switch: TemplateChild<gtk::Switch>, + #[template_child] + pub show_seconds_switch: TemplateChild<gtk::Switch>, } #[glib::object_subclass] @@ -113,7 +117,8 @@ impl FurPreferencesWindow { settings_manager::bind_property( "dark-mode", &*imp.dark_theme_switch, - "active"); + "active" + ); settings_manager::bind_property( "notify-of-idle", @@ -139,6 +144,18 @@ impl FurPreferencesWindow { "value", ); + settings_manager::bind_property( + "delete-confirmation", + &*imp.delete_confirmation_switch, + "active" + ); + + settings_manager::bind_property( + "show-seconds", + &*imp.show_seconds_switch, + "active" + ); + imp.limit_tasks_expander.connect_enable_expansion_notify(move |_|{ let window = FurtheranceWindow::default(); window.reset_history_box(); @@ -148,6 +165,11 @@ impl FurPreferencesWindow { let window = FurtheranceWindow::default(); window.reset_history_box(); }); + + imp.show_seconds_switch.connect_active_notify(move |_|{ + let window = FurtheranceWindow::default(); + window.reset_history_box(); + }); } } |