diff --git a/repos/gems/src/app/sculpt_manager/graph.h b/repos/gems/src/app/sculpt_manager/graph.h index 302001ec02..eb114926ea 100644 --- a/repos/gems/src/app/sculpt_manager/graph.h +++ b/repos/gems/src/app/sculpt_manager/graph.h @@ -125,6 +125,8 @@ struct Sculpt::Graph typedef Runtime_config::Component Component; + bool const any_selected = _runtime_state.selected().valid(); + _runtime_config.for_each_component([&] (Component const &component) { Start_name const name = component.name; @@ -141,19 +143,31 @@ struct Sculpt::Graph Runtime_state::Info const info = _runtime_state.info(name); + bool const unimportant = any_selected && !info.tcb; + gen_named_node(xml, "frame", name, [&] () { + if (unimportant) + xml.attribute("style", "unimportant"); + Start_name primary_dep = component.primary_dependency; if (primary_dep == "default_fs_rw") primary_dep = _sculpt_partition.fs(); - if (primary_dep.valid()) + if (primary_dep.valid()) { xml.attribute("dep", primary_dep); + if (unimportant) + xml.attribute("dep_visible", false); + } xml.node("vbox", [&] () { gen_named_node(xml, "button", name, [&] () { + + if (unimportant) + xml.attribute("style", "unimportant"); + _node_button_item.gen_button_attr(xml, name); if (info.selected) diff --git a/repos/gems/src/app/sculpt_manager/main.cc b/repos/gems/src/app/sculpt_manager/main.cc index 63e0ee0627..c494285b9c 100644 --- a/repos/gems/src/app/sculpt_manager/main.cc +++ b/repos/gems/src/app/sculpt_manager/main.cc @@ -397,7 +397,7 @@ struct Sculpt::Main : Input_event_handler, Attached_rom_dataspace _runtime_state_rom { _env, "report -> runtime/state" }; - Runtime_state _runtime_state { _heap }; + Runtime_state _runtime_state { _heap, _storage._sculpt_partition }; Managed_config
_runtime_config { _env, "config", "runtime", *this, &Main::_handle_runtime }; diff --git a/repos/gems/src/app/sculpt_manager/model/runtime_state.h b/repos/gems/src/app/sculpt_manager/model/runtime_state.h index 4a01989da8..0fa978f3d8 100644 --- a/repos/gems/src/app/sculpt_manager/model/runtime_state.h +++ b/repos/gems/src/app/sculpt_manager/model/runtime_state.h @@ -51,6 +51,8 @@ class Sculpt::Runtime_state : public Runtime_info Allocator &_alloc; + Storage_target const &_storage_target; + struct Child : List_model::Element { Start_name const name; @@ -194,7 +196,8 @@ class Sculpt::Runtime_state : public Runtime_info public: - Runtime_state(Allocator &alloc) : _alloc(alloc) { } + Runtime_state(Allocator &alloc, Storage_target const &storage_target) + : _alloc(alloc), _storage_target(storage_target) { } ~Runtime_state() { reset_abandoned_and_launched_children(); } @@ -301,11 +304,16 @@ class Sculpt::Runtime_state : public Runtime_info break; /* tag all dependencies as part of the TCB */ - config.for_each_dependency(name_of_updated, [&] (Start_name const &dep) { + config.for_each_dependency(name_of_updated, [&] (Start_name dep) { + + if (dep == "default_fs_rw") + dep = _storage_target.fs(); + if (!blacklisted_from_graph(dep)) _children.for_each([&] (Child &child) { if (child.name == dep) - child.info.tcb = true; }); }); + child.info.tcb = true; }); + }); } }