sculpt: "Reattempt Install" option in popup dialog

Issue 
This commit is contained in:
Norman Feske 2023-04-19 17:29:42 +02:00 committed by Christian Helmuth
parent bb6a189589
commit 1c160d2366
2 changed files with 17 additions and 1 deletions
repos/gems/src/app/sculpt_manager/view

@ -249,6 +249,19 @@ void Popup_dialog::_gen_menu_elements(Xml_generator &xml, Xml_node const &depot_
_gen_info_label(xml, "pad3", "");
xml.node("label", [&] () {
xml.attribute("text", "installed but incomplete"); });
if (_nic_ready()) {
_gen_info_label(xml, "pad4", "");
gen_named_node(xml, "float", "install", [&] () {
xml.node("button", [&] () {
_install_item.gen_button_attr(xml, "install");
xml.node("label", [&] () {
xml.attribute("text", "Reattempt Install");
});
});
});
}
}
/*

@ -338,7 +338,10 @@ struct Sculpt::Popup_dialog : Dialog
reset();
}
if (!_blueprint_info.pkg_avail && _install_item.activated("install")) {
bool const pkg_need_install = !_blueprint_info.pkg_avail
|| _blueprint_info.incomplete();
if (pkg_need_install && _install_item.activated("install")) {
_construction_info.with_construction([&] (Component const &component) {
action.trigger_download(component.path, component.verify);
_install_item.reset();