mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-08 11:55:24 +00:00
sculpt: dim non-TCB when selecting a component
This commit is contained in:
parent
ef0a3f5be1
commit
bd09783438
@ -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)
|
||||
|
@ -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<Main> _runtime_config {
|
||||
_env, "config", "runtime", *this, &Main::_handle_runtime };
|
||||
|
@ -51,6 +51,8 @@ class Sculpt::Runtime_state : public Runtime_info
|
||||
|
||||
Allocator &_alloc;
|
||||
|
||||
Storage_target const &_storage_target;
|
||||
|
||||
struct Child : List_model<Child>::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; });
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user