Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions resources/preferences_dialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,22 @@ All AUR users should be familiar with the build process.</property>
<property name="title" translatable="yes">Check for development packages updates</property>
</object>
</child>
<child>
<object class="AdwSpinRow" id="aur_update_delay_spinrow">
<property name="title" translatable="yes">Delay showing AUR updates (days)</property>
<property name="adjustment">
<object class="GtkAdjustment">
<property name="lower">0</property>
<property name="upper">365</property>
<property name="step-increment">1</property>
<property name="page-increment">7</property>
</object>
</property>
<property name="digits">0</property>
<property name="numeric">1</property>
<property name="snap-to-ticks">1</property>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="visible">1</property>
Expand Down
9 changes: 9 additions & 0 deletions src/preferences_dialog.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 ();
Expand Down Expand Up @@ -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 ();
Expand Down