diff --git a/repos/gems/recipes/src/sculpt_manager/content.mk b/repos/gems/recipes/src/sculpt_manager/content.mk
index ba423e8632..05c275782b 100644
--- a/repos/gems/recipes/src/sculpt_manager/content.mk
+++ b/repos/gems/recipes/src/sculpt_manager/content.mk
@@ -2,7 +2,7 @@ SRC_DIR := src/app/sculpt_manager
include $(GENODE_DIR)/repos/base/recipes/src/content.inc
-MIRROR_FROM_REP_DIR := include/depot src/app/depot_deploy
+MIRROR_FROM_REP_DIR := include/depot src/app/depot_deploy include/dialog
content: $(MIRROR_FROM_REP_DIR)
diff --git a/repos/gems/sculpt/leitzentrale/default b/repos/gems/sculpt/leitzentrale/default
index 9cc73ec70f..45bbd1607a 100644
--- a/repos/gems/sculpt/leitzentrale/default
+++ b/repos/gems/sculpt/leitzentrale/default
@@ -95,7 +95,6 @@
-
@@ -119,10 +118,9 @@
-
-
+
-
+
-
+
@@ -259,7 +257,6 @@
-
diff --git a/repos/gems/src/app/sculpt_manager/deploy.cc b/repos/gems/src/app/sculpt_manager/deploy.cc
index fe627f6c7b..d520983cd0 100644
--- a/repos/gems/src/app/sculpt_manager/deploy.cc
+++ b/repos/gems/src/app/sculpt_manager/deploy.cc
@@ -33,7 +33,7 @@ bool Sculpt::Deploy::update_child_conditions()
}
-void Sculpt::Deploy::gen_child_diagnostics(Xml_generator &xml) const
+void Sculpt::Deploy::view_diag(Scope<> &s) const
{
/*
* Collect messages in registry, avoiding duplicates
@@ -59,7 +59,7 @@ void Sculpt::Deploy::gen_child_diagnostics(Xml_generator &xml) const
};
_children.for_each_unsatisfied_child([&] (Xml_node start, Xml_node launcher,
- Start_name const &name) {
+ Start_name const &name) {
gen_missing_dependencies(start, name);
gen_missing_dependencies(launcher, name);
});
@@ -67,17 +67,8 @@ void Sculpt::Deploy::gen_child_diagnostics(Xml_generator &xml) const
/*
* Generate dialog elements, drop consumed messages from the registry
*/
- int count = 0;
messages.for_each([&] (Registered_message &message) {
- gen_named_node(xml, "hbox", String<20>(count++), [&] () {
- gen_named_node(xml, "float", "left", [&] () {
- xml.attribute("west", "yes");
- xml.node("label", [&] () {
- xml.attribute("text", message);
- xml.attribute("font", "annotation/regular");
- });
- });
- });
+ s.sub_scope(message);
destroy(_alloc, &message);
});
}
@@ -170,7 +161,7 @@ void Sculpt::Deploy::handle_deploy()
/* apply runtime condition checks */
update_child_conditions();
- _dialog_generator.generate_dialog();
+ _action.refresh_deploy_dialog();
_runtime_config_generator.generate_runtime_config();
}
}
diff --git a/repos/gems/src/app/sculpt_manager/deploy.h b/repos/gems/src/app/sculpt_manager/deploy.h
index b8315b6994..d1e5edec68 100644
--- a/repos/gems/src/app/sculpt_manager/deploy.h
+++ b/repos/gems/src/app/sculpt_manager/deploy.h
@@ -45,7 +45,9 @@ struct Sculpt::Deploy
Runtime_info const &_runtime_info;
- Deprecated_dialog::Generator &_dialog_generator;
+ struct Action : Interface { virtual void refresh_deploy_dialog() = 0; };
+
+ Action &_action;
Runtime_config_generator &_runtime_config_generator;
@@ -248,7 +250,7 @@ struct Sculpt::Deploy
return !all_satisfied;
}
- void gen_child_diagnostics(Xml_generator &xml) const;
+ void view_diag(Scope<> &) const;
void gen_runtime_start_nodes(Xml_generator &, Prio_levels, Affinity::Space) const;
@@ -291,7 +293,7 @@ struct Sculpt::Deploy
Deploy(Env &env, Allocator &alloc, Registry &child_states,
Runtime_info const &runtime_info,
- Deprecated_dialog::Generator &dialog_generator,
+ Action &action,
Runtime_config_generator &runtime_config_generator,
Depot_query &depot_query,
Attached_rom_dataspace const &launcher_listing_rom,
@@ -300,7 +302,7 @@ struct Sculpt::Deploy
:
_env(env), _alloc(alloc), _child_states(child_states),
_runtime_info(runtime_info),
- _dialog_generator(dialog_generator),
+ _action(action),
_runtime_config_generator(runtime_config_generator),
_depot_query(depot_query),
_launcher_listing_rom(launcher_listing_rom),
diff --git a/repos/gems/src/app/sculpt_manager/graph.cc b/repos/gems/src/app/sculpt_manager/graph.cc
index 394aef0b4f..17efbfad03 100644
--- a/repos/gems/src/app/sculpt_manager/graph.cc
+++ b/repos/gems/src/app/sculpt_manager/graph.cc
@@ -18,43 +18,90 @@
using namespace Sculpt;
-void Graph::_gen_selected_node_content(Xml_generator &xml, Start_name const &name,
- Runtime_state::Info const &info) const
+namespace Dialog { struct Parent_node; }
+
+struct Dialog::Parent_node : Sub_scope
+{
+ template
+ static void view_sub_scope(SCOPE &s, TEXT const &text)
+ {
+ s.node("frame", [&] {
+ s.sub_node("label", [&] {
+ s.attribute("text", Sculpt::Start_name(" ", text, " ")); }); });
+ }
+
+ template
+ static void with_narrowed_at(AT const &, FN const &) { }
+};
+
+
+namespace Dialog { struct Selectable_node; }
+
+struct Dialog::Selectable_node
+{
+ struct Attr
+ {
+ bool selected;
+ bool important;
+ Start_name primary_dep;
+ Start_name pretty_name;
+ };
+
+ template
+ static void view(Scope &s, Id const &id,
+ Attr const &attr, FN const &selected_fn)
+ {
+ s.sub_scope(id, [&] (Scope &s) {
+
+ if (!attr.important)
+ s.attribute("style", "unimportant");
+
+ if (attr.primary_dep.valid()) {
+ s.attribute("dep", attr.primary_dep);
+ if (!attr.important)
+ s.attribute("dep_visible", false);
+ }
+
+ s.sub_scope([&] (Scope &s) {
+
+ s.sub_scope