summaryrefslogtreecommitdiff
path: root/hud
diff options
authorThomi Richards <thomi.richards@canonical.com>2012-07-01 18:38:01 -0400
committerTarmac <>2012-07-01 18:38:01 -0400
commit3f169f4833821fac293687a2d0587d7665119a5d (patch)
tree46a110dfc85ef993ae6823580c0d8fbc4a0d580d /hud
parent135d777622c6731606872108052b8ef158070f8d (diff)
parent3f6ef29bb1105fd1e97b27fb35df75bdd73e7214 (diff)
Fix broken Hud autopilot tests.. Fixes: . Approved by Christopher Lee, jenkins.
(bzr r2461)
Diffstat (limited to 'hud')
-rw-r--r--hud/HudView.cpp7
-rw-r--r--hud/HudView.h5
2 files changed, 4 insertions, 8 deletions
diff --git a/hud/HudView.cpp b/hud/HudView.cpp
index b090477c1..d1f77fa2f 100644
--- a/hud/HudView.cpp
+++ b/hud/HudView.cpp
@@ -118,10 +118,6 @@ View::View()
View::~View()
{
- for (auto button = buttons_.begin(); button != buttons_.end(); button++)
- {
- RemoveChild((*button).GetPointer());
- }
}
void View::ProcessGrowShrink()
@@ -510,9 +506,10 @@ void View::AddProperties(GVariantBuilder* builder)
.add("num_buttons", num_buttons);
}
-debug::Introspectable::IntrospectableList const& View::GetIntrospectableChildren()
+debug::Introspectable::IntrospectableList View::GetIntrospectableChildren()
{
introspectable_children_.clear();
+ introspectable_children_.merge(debug::Introspectable::GetIntrospectableChildren());
for (auto button: buttons_)
{
introspectable_children_.push_front(button.GetPointer());
diff --git a/hud/HudView.h b/hud/HudView.h
index 32a35a818..8e654b49f 100644
--- a/hud/HudView.h
+++ b/hud/HudView.h
@@ -71,8 +71,6 @@ protected:
void OnSearchChanged(std::string const& search_string);
virtual long PostLayoutManagement(long LayoutResult);
- IntrospectableList introspectable_children_;
-
private:
void OnMouseButtonDown(int x, int y, unsigned long button, unsigned long key);
void OnKeyDown (unsigned long event_type, unsigned long event_keysym,
@@ -89,7 +87,7 @@ private:
std::string GetName() const;
void AddProperties(GVariantBuilder* builder);
- IntrospectableList const& GetIntrospectableChildren();
+ IntrospectableList GetIntrospectableChildren();
private:
UBusManager ubus;
@@ -97,6 +95,7 @@ private:
nux::ObjectPtr<nux::Layout> content_layout_;
nux::ObjectPtr<nux::VLayout> button_views_;
std::list<HudButton::Ptr> buttons_;
+ IntrospectableList introspectable_children_;
//FIXME - replace with dash search bar once modifications to dash search bar land
SearchBar::Ptr search_bar_;