From a22d9e38b2b3177e2992f7848ed60c5cdfa339e4 Mon Sep 17 00:00:00 2001 From: wandercone <137902980+wandercone@users.noreply.github.com> Date: Sun, 14 Jun 2026 07:54:23 -0500 Subject: [PATCH] feat: add AUR update delay setting --- resources/preferences_dialog.ui | 16 ++++++++++++++++ src/preferences_dialog.vala | 9 +++++++++ 2 files changed, 25 insertions(+) diff --git a/resources/preferences_dialog.ui b/resources/preferences_dialog.ui index 4d669feb..04625cf1 100644 --- a/resources/preferences_dialog.ui +++ b/resources/preferences_dialog.ui @@ -194,6 +194,22 @@ All AUR users should be familiar with the build process. Check for development packages updates + + + Delay showing AUR updates (days) + + + 0 + 365 + 1 + 7 + + + 0 + 1 + 1 + + 1 diff --git a/src/preferences_dialog.vala b/src/preferences_dialog.vala index 23a3d3ce..9fe84f95 100644 --- a/src/preferences_dialog.vala +++ b/src/preferences_dialog.vala @@ -75,6 +75,8 @@ namespace Pamac { [GtkChild] unowned Adw.SwitchRow check_aur_vcs_updates_button; [GtkChild] + unowned Adw.SpinRow aur_update_delay_spinrow; + [GtkChild] unowned Gtk.Button clean_build_files_button; [GtkChild] unowned Gtk.Label clean_build_files_label; @@ -263,6 +265,9 @@ namespace Pamac { config.bind_property ("check_aur_updates", check_aur_updates_button, "active", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL); config.bind_property ("check_aur_vcs_updates", check_aur_vcs_updates_button, "active", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL); config.bind_property ("check_aur_updates", check_aur_vcs_updates_button, "sensitive", BindingFlags.SYNC_CREATE); + aur_update_delay_spinrow.value = config.aur_update_delay_days; + config.bind_property ("check_aur_updates", aur_update_delay_spinrow, "sensitive", BindingFlags.SYNC_CREATE); + aur_update_delay_spinrow.notify["value"].connect (on_aur_update_delay_spinrow_changed); if (config.support_aur) { aur_build_dir_file_chooser.label = Path.get_basename (config.aur_build_dir); refresh_clean_build_files_button.begin (); @@ -363,6 +368,10 @@ namespace Pamac { refresh_clean_cache_button.begin (); } + void on_aur_update_delay_spinrow_changed () { + config.aur_update_delay_days = (uint64) aur_update_delay_spinrow.value; + } + [GtkCallback] void on_aur_build_dir_file_chooser_clicked () { var chooser = new Gtk.FileDialog ();