Add one-click Update All with batch progress dialog

This commit is contained in:
2026-02-27 23:55:04 +02:00
parent 325cbdd87f
commit 84e33d06c8
4 changed files with 301 additions and 0 deletions

View File

@@ -269,6 +269,22 @@ fn build_updates_summary_group(db: &Rc<Database>) -> adw::PreferencesGroup {
updates_row.add_suffix(&updates_arrow);
group.add(&updates_row);
if with_updates > 0 {
let update_all_row = adw::ActionRow::builder()
.title("Update All")
.subtitle(&format!("Apply {} available updates", with_updates))
.activatable(true)
.build();
update_all_row.set_action_name(Some("win.update-all"));
let update_badge = widgets::status_badge("Go", "suggested");
update_badge.set_valign(gtk::Align::Center);
update_all_row.add_suffix(&update_badge);
let arrow = gtk::Image::from_icon_name("go-next-symbolic");
arrow.set_valign(gtk::Align::Center);
update_all_row.add_suffix(&arrow);
group.add(&update_all_row);
}
// Last checked timestamp
let settings = gio::Settings::new(APP_ID);
let last_check = settings.string("last-update-check");