From 7c065014f4b23c0eb50b3662bc5cb14f0a8df746 Mon Sep 17 00:00:00 2001 From: Gabriel Brand Date: Sun, 11 Feb 2024 19:00:41 +0100 Subject: Port to libadwaita 1.4 widgets --- src/ui/preferences_window.rs | 43 ++++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 23 deletions(-) (limited to 'src/ui') diff --git a/src/ui/preferences_window.rs b/src/ui/preferences_window.rs index d3de8de..7d8406b 100644 --- a/src/ui/preferences_window.rs +++ b/src/ui/preferences_window.rs @@ -36,49 +36,47 @@ mod imp { #[template_child] pub appearance_group: TemplateChild, #[template_child] - pub dark_theme_switch: TemplateChild, + pub dark_theme_switch: TemplateChild, #[template_child] pub idle_group: TemplateChild, #[template_child] pub notify_of_idle_expander: TemplateChild, #[template_child] - pub notify_of_idle_spin: TemplateChild, + pub notify_of_idle_spin: TemplateChild, #[template_child] - pub task_list_group: TemplateChild, - #[template_child] - pub limit_tasks_expander: TemplateChild, + pub timer_group: TemplateChild, #[template_child] - pub limit_days_spin: TemplateChild, + pub pomodoro_expander: TemplateChild, #[template_child] - pub delete_confirmation_switch: TemplateChild, + pub pomodoro_spin: TemplateChild, #[template_child] - pub show_seconds_switch: TemplateChild, + pub autosave_expander: TemplateChild, #[template_child] - pub show_daily_sums_switch: TemplateChild, + pub autosave_spin: TemplateChild, #[template_child] - pub show_tags_switch: TemplateChild, + pub inclusive_total_switch: TemplateChild, #[template_child] - pub task_input_group: TemplateChild, + pub task_list_group: TemplateChild, #[template_child] - pub autocomplete_switch: TemplateChild, - + pub delete_confirmation_switch: TemplateChild, #[template_child] - pub timer_group: TemplateChild, + pub limit_tasks_expander: TemplateChild, #[template_child] - pub pomodoro_expander: TemplateChild, + pub limit_days_spin: TemplateChild, #[template_child] - pub pomodoro_spin: TemplateChild, - + pub show_daily_sums_switch: TemplateChild, #[template_child] - pub autosave_expander: TemplateChild, + pub show_seconds_switch: TemplateChild, #[template_child] - pub autosave_spin: TemplateChild, + pub show_tags_switch: TemplateChild, #[template_child] - pub inclusive_total_switch: TemplateChild, + pub task_input_group: TemplateChild, + #[template_child] + pub autocomplete_switch: TemplateChild, #[template_child] pub week_start_combo: TemplateChild, @@ -209,7 +207,7 @@ impl FurPreferencesWindow { window.reset_history_box(); }); - imp.limit_days_spin.connect_value_changed(move |_| { + imp.limit_days_spin.connect_value_notify(move |_| { let window = FurtheranceWindow::default(); window.reset_history_box(); }); @@ -240,7 +238,7 @@ impl FurPreferencesWindow { window.refresh_timer(); }); - imp.pomodoro_spin.connect_value_changed(move |new_val| { + imp.pomodoro_spin.connect_value_notify(move |new_val| { settings_manager::set_int("pomodoro-time", new_val.value() as i32); let window = FurtheranceWindow::default(); window.refresh_timer(); @@ -299,4 +297,3 @@ impl FurPreferencesWindow { })); } } - -- cgit 1.4.1