Skip to content

Commit

Permalink
Update description and hook up refresh button
Browse files Browse the repository at this point in the history
  • Loading branch information
leolost2605 committed Jan 22, 2024
1 parent 3006e87 commit 13740fe
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/Views/OperatingSystemView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,18 @@ public class About.OperatingSystemView : Gtk.Box {
});
}
});

error_button.clicked.connect (() => {
if (update_proxy != null) {
update_proxy.check_for_updates.begin (true, (obj, res) => {
try {
update_proxy.check_for_updates.end (res);
} catch (Error e) {
critical ("Failed to force refresh: %s", e.message);
}
});
}
});
}

private async void get_upstream_release () {
Expand Down Expand Up @@ -420,8 +432,8 @@ public class About.OperatingSystemView : Gtk.Box {
break;
case ERROR:
updates_image.icon_name = "dialog-error";
updates_title.label = _("Error");
updates_description.label = _("An error occured while trying to update the system");
updates_title.label = _("Failed to download updates");
updates_description.label = _("Manually refreshing updates may resolve the issue.");
check_button.sensitive = false;
break;
}
Expand Down

0 comments on commit 13740fe

Please sign in to comment.