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 From 366e9cee77c04d4a381f55d6ee8ce4c15e0d0c3b Mon Sep 17 00:00:00 2001 From: Gabriel Brand Date: Mon, 12 Feb 2024 20:17:48 +0100 Subject: Update access keys --- src/gtk/preferences_window.ui | 58 ++++++++++++++++++++++--------------------- src/ui/preferences_window.rs | 18 ++++++++------ 2 files changed, 40 insertions(+), 36 deletions(-) (limited to 'src/ui') diff --git a/src/gtk/preferences_window.ui b/src/gtk/preferences_window.ui index 08f9720..4649c9e 100644 --- a/src/gtk/preferences_window.ui +++ b/src/gtk/preferences_window.ui @@ -4,32 +4,32 @@ emblem-system-symbolic - General + _General + True Appearance True - _Dark theme - True + Dark Theme - + Idle True - Notify of idle - (GNOME only) + _Notify of Idle + (GNOME Only) True True - _Minutes to idle + _Minutes to Idle Number of minutes before the user is considered idle True @@ -48,7 +48,7 @@ - + Timer True @@ -59,8 +59,7 @@ True - Interval - Start time in minutes + _Start Time in Minutes True @@ -83,7 +82,7 @@ True - Autosave every X _minutes + Autosave Every _X Minutes True @@ -100,7 +99,7 @@ - Inclusive total time + In_clusive Total Time Today's total time includes the ongoing timer True @@ -112,27 +111,27 @@ view-list-symbolic - Tasks + _Tasks + True - + Task List True - _Delete confirmation + Delete _Confirmation True - Limit tasks shown - Only show X number of days in the saved tasks list + _Limit History Shown + Only show the specified number of days in the tasks list True True - _Days ago - Number of days to display in the list + _Number of Days True @@ -149,20 +148,20 @@ - Show daily sums + Show Daily S_ums True - _Show seconds + Show _Seconds Tasks list only. Seconds always show on timer True - Show tags + S_how Tags Tags are saved, just not shown True @@ -170,7 +169,7 @@ - + Task Input True @@ -186,14 +185,15 @@ drive-harddisk-symbolic - Data + _Data + True - + Reports True - Week starts on + _Week Starts On True @@ -208,13 +208,15 @@ - + Database True - Database location + Database _Location /location/ + True + database_browse_btn center diff --git a/src/ui/preferences_window.rs b/src/ui/preferences_window.rs index 7d8406b..90a28ff 100644 --- a/src/ui/preferences_window.rs +++ b/src/ui/preferences_window.rs @@ -33,20 +33,20 @@ mod imp { #[derive(Default, Debug, CompositeTemplate)] #[template(resource = "/com/lakoliu/Furtherance/gtk/preferences_window.ui")] pub struct FurPreferencesWindow { + // General Page + // Appearance Group #[template_child] pub appearance_group: TemplateChild, #[template_child] pub dark_theme_switch: TemplateChild, - #[template_child] - pub idle_group: TemplateChild, + // Idle Group #[template_child] pub notify_of_idle_expander: TemplateChild, #[template_child] pub notify_of_idle_spin: TemplateChild, - #[template_child] - pub timer_group: TemplateChild, + // Timer Group #[template_child] pub pomodoro_expander: TemplateChild, #[template_child] @@ -58,8 +58,8 @@ mod imp { #[template_child] pub inclusive_total_switch: TemplateChild, - #[template_child] - pub task_list_group: TemplateChild, + // Tasks Page + // Task List Group #[template_child] pub delete_confirmation_switch: TemplateChild, #[template_child] @@ -73,14 +73,16 @@ mod imp { #[template_child] pub show_tags_switch: TemplateChild, - #[template_child] - pub task_input_group: TemplateChild, + // Task Input Group #[template_child] pub autocomplete_switch: TemplateChild, + // Data Page + // Reports Group #[template_child] pub week_start_combo: TemplateChild, + // Database Group #[template_child] pub database_loc_row: TemplateChild, #[template_child] -- cgit 1.4.1