mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-07 03:17:44 +00:00
sculpt_manager: remove double name attributes
The 'name' attribute was generated by both the call of 'gen_named_node' and 'Hoverable_item::gen_button_attr'. Use only the former.
This commit is contained in:
parent
05fa063068
commit
3f8dfa346c
@ -44,14 +44,21 @@ struct Sculpt::Hoverable_item
|
||||
*/
|
||||
bool hovered(Id const &id) const { return id == _hovered; }
|
||||
|
||||
/**
|
||||
* Generate hovered attribute depending on the item state
|
||||
*/
|
||||
void gen_hovered_attr(Xml_generator &xml, Id const &id) const
|
||||
{
|
||||
if (hovered(id)) xml.attribute("hovered", "yes");
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate button attributes depending on the item state
|
||||
*/
|
||||
void gen_button_attr(Xml_generator &xml, Id const &id) const
|
||||
{
|
||||
xml.attribute("name", id);
|
||||
|
||||
if (hovered(id)) xml.attribute("hovered", "yes");
|
||||
gen_hovered_attr(xml, id);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -270,7 +270,7 @@ struct Sculpt::Popup_dialog
|
||||
gen_named_node(xml, "button", "back", [&] () {
|
||||
xml.attribute("selected", "yes");
|
||||
xml.attribute("style", "back");
|
||||
_item.gen_button_attr(xml, name);
|
||||
_item.gen_hovered_attr(xml, name);
|
||||
xml.node("hbox", [&] () { });
|
||||
});
|
||||
gen_named_node(xml, "label", "label", [&] () {
|
||||
@ -299,7 +299,7 @@ struct Sculpt::Popup_dialog
|
||||
xml.attribute("selected", "yes");
|
||||
|
||||
xml.attribute("style", style);
|
||||
_item.gen_button_attr(xml, name);
|
||||
_item.gen_hovered_attr(xml, name);
|
||||
xml.node("hbox", [&] () { });
|
||||
});
|
||||
gen_named_node(xml, "label", "name", [&] () {
|
||||
@ -328,7 +328,7 @@ struct Sculpt::Popup_dialog
|
||||
xml.attribute("selected", "yes");
|
||||
|
||||
xml.attribute("style", style);
|
||||
_route_item.gen_button_attr(xml, name);
|
||||
_route_item.gen_hovered_attr(xml, name);
|
||||
xml.node("hbox", [&] () { });
|
||||
});
|
||||
gen_named_node(xml, "label", "name", [&] () {
|
||||
|
Loading…
x
Reference in New Issue
Block a user