From 46eb175b178115bddc9af650f898a70508f705ea Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 25 Jan 2023 11:32:45 +0100 Subject: [PATCH] sculpt_manager: detailed storage progress messages This patch replaces the generic "In progress..." message by slightly more concrete information about the type of operation. This is useful to distinguish the two steps during the expansion of a partition. --- .../sculpt_manager/view/partition_dialog.cc | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/repos/gems/src/app/sculpt_manager/view/partition_dialog.cc b/repos/gems/src/app/sculpt_manager/view/partition_dialog.cc index c5491adf42..4e9dc4598a 100644 --- a/repos/gems/src/app/sculpt_manager/view/partition_dialog.cc +++ b/repos/gems/src/app/sculpt_manager/view/partition_dialog.cc @@ -72,7 +72,7 @@ void Partition_dialog::gen_operations(Xml_generator &xml, xml.attribute("text", "Default"); }); }); if (partition.relabel_in_progress()) - xml.node("label", [&] () { xml.attribute("text", "In progress..."); }); + xml.node("label", [&] () { xml.attribute("text", "Relabeling in progress..."); }); } if (!target_in_use && !partition.format_in_progress && partition.checkable() @@ -88,7 +88,7 @@ void Partition_dialog::gen_operations(Xml_generator &xml, xml.node("label", [&] () { xml.attribute("text", "Check"); }); }); if (partition.check_in_progress) - xml.node("label", [&] () { xml.attribute("text", "In progress..."); }); + xml.node("label", [&] () { xml.attribute("text", "Check in progress..."); }); } } @@ -110,10 +110,6 @@ void Partition_dialog::gen_operations(Xml_generator &xml, && partition.expandable() && !_operation_item.selected("format"); - bool const progress_msg_visible = - (_operation_item.selected("format") && partition.format_in_progress) - || (_operation_item.selected("expand") && partition.expand_in_progress()); - bool const confirm_visible = (_operation_item.selected("format") && !partition.format_in_progress) || (_operation_item.selected("expand") && !partition.expand_in_progress()); @@ -146,8 +142,14 @@ void Partition_dialog::gen_operations(Xml_generator &xml, }); } - if (progress_msg_visible) - xml.node("label", [&] () { xml.attribute("text", "In progress..."); }); + if (partition.format_in_progress) + xml.node("label", [&] () { xml.attribute("text", "Formatting in progress..."); }); + + if (partition.gpt_expand_in_progress) + xml.node("label", [&] () { xml.attribute("text", "Expanding partition..."); }); + + if (partition.fs_resize_in_progress) + xml.node("label", [&] () { xml.attribute("text", "Resizing file system..."); }); if (confirm_visible) { xml.node("button", [&] () {