diff options
| author | Thomi Richards <thomi.richards@canonical.com> | 2012-06-29 09:51:29 +1200 |
|---|---|---|
| committer | Thomi Richards <thomi.richards@canonical.com> | 2012-06-29 09:51:29 +1200 |
| commit | 0c2a54bc5303986827129a597a3531596c781b91 (patch) | |
| tree | de9ded63173c0eedbdc27d8a7af32105ed0170b0 | |
| parent | fcba82250ca019a53caf47380be2289537578955 (diff) | |
Fix hud searchbar and icon not being found.
(bzr r2444.2.1)
| -rw-r--r-- | dash/ResultView.cpp | 2 | ||||
| -rw-r--r-- | dash/ResultView.h | 2 | ||||
| -rw-r--r-- | hud/HudView.cpp | 7 | ||||
| -rw-r--r-- | hud/HudView.h | 5 | ||||
| -rw-r--r-- | launcher/LauncherModel.cpp | 2 | ||||
| -rw-r--r-- | launcher/LauncherModel.h | 2 | ||||
| -rw-r--r-- | launcher/QuicklistView.cpp | 2 | ||||
| -rw-r--r-- | launcher/QuicklistView.h | 2 | ||||
| -rw-r--r-- | unity-shared/Introspectable.cpp | 2 | ||||
| -rw-r--r-- | unity-shared/Introspectable.h | 4 |
10 files changed, 13 insertions, 17 deletions
diff --git a/dash/ResultView.cpp b/dash/ResultView.cpp index 8c22866e7..5350fc579 100644 --- a/dash/ResultView.cpp +++ b/dash/ResultView.cpp @@ -142,7 +142,7 @@ void ResultView::AddProperties(GVariantBuilder* builder) .add("expanded", expanded); } -debug::Introspectable::IntrospectableList const& ResultView::GetIntrospectableChildren() +debug::Introspectable::IntrospectableList ResultView::GetIntrospectableChildren() { ClearIntrospectableWrappers(); diff --git a/dash/ResultView.h b/dash/ResultView.h index 1cc339b82..224d11637 100644 --- a/dash/ResultView.h +++ b/dash/ResultView.h @@ -61,7 +61,7 @@ public: std::string GetName() const; void AddProperties(GVariantBuilder* builder); - IntrospectableList const& GetIntrospectableChildren(); + IntrospectableList GetIntrospectableChildren(); protected: virtual void Draw(nux::GraphicsEngine& GfxContext, bool force_draw); diff --git a/hud/HudView.cpp b/hud/HudView.cpp index 921c7713c..271e80593 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() @@ -504,9 +500,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_; diff --git a/launcher/LauncherModel.cpp b/launcher/LauncherModel.cpp index c3f0f9f38..8e8d6e504 100644 --- a/launcher/LauncherModel.cpp +++ b/launcher/LauncherModel.cpp @@ -44,7 +44,7 @@ void LauncherModel::AddProperties(GVariantBuilder* builder) .add("selection", selection_); } -unity::debug::Introspectable::IntrospectableList const& LauncherModel::GetIntrospectableChildren() +unity::debug::Introspectable::IntrospectableList LauncherModel::GetIntrospectableChildren() { introspection_results_.clear(); diff --git a/launcher/LauncherModel.h b/launcher/LauncherModel.h index de3e33867..e6295b6cf 100644 --- a/launcher/LauncherModel.h +++ b/launcher/LauncherModel.h @@ -84,7 +84,7 @@ public: sigc::signal<void> saved; sigc::signal<void, AbstractLauncherIcon::Ptr> selection_changed; - IntrospectableList const& GetIntrospectableChildren(); + IntrospectableList GetIntrospectableChildren(); protected: // Introspectable methods std::string GetName() const; diff --git a/launcher/QuicklistView.cpp b/launcher/QuicklistView.cpp index fd88737c4..9d71820b4 100644 --- a/launcher/QuicklistView.cpp +++ b/launcher/QuicklistView.cpp @@ -1500,7 +1500,7 @@ QuicklistView::GetSelectedMenuItem() return GetNthItems(_current_item_index); } -debug::Introspectable::IntrospectableList const& QuicklistView::GetIntrospectableChildren() +debug::Introspectable::IntrospectableList QuicklistView::GetIntrospectableChildren() { _introspectable_children.clear(); for (auto item: _item_list) diff --git a/launcher/QuicklistView.h b/launcher/QuicklistView.h index 49674aa33..d246d771a 100644 --- a/launcher/QuicklistView.h +++ b/launcher/QuicklistView.h @@ -71,7 +71,7 @@ public: // Introspection std::string GetName() const; void AddProperties(GVariantBuilder* builder); - IntrospectableList const& GetIntrospectableChildren(); + IntrospectableList GetIntrospectableChildren(); void EnableQuicklistForTesting(bool enable_testing); diff --git a/unity-shared/Introspectable.cpp b/unity-shared/Introspectable.cpp index 1c2f12038..4ecd0fc18 100644 --- a/unity-shared/Introspectable.cpp +++ b/unity-shared/Introspectable.cpp @@ -38,7 +38,7 @@ Introspectable::~Introspectable() child->_parents.remove(this); } -Introspectable::IntrospectableList const& Introspectable::GetIntrospectableChildren() +Introspectable::IntrospectableList Introspectable::GetIntrospectableChildren() { return _children; } diff --git a/unity-shared/Introspectable.h b/unity-shared/Introspectable.h index e6b299648..7814ca281 100644 --- a/unity-shared/Introspectable.h +++ b/unity-shared/Introspectable.h @@ -32,7 +32,7 @@ class Introspectable { public: typedef std::list<Introspectable*> IntrospectableList; - + Introspectable(); virtual ~Introspectable(); GVariant* Introspect(); @@ -40,7 +40,7 @@ public: void AddChild(Introspectable* child); void RemoveChild(Introspectable* child); virtual void AddProperties(GVariantBuilder* builder) = 0; - virtual IntrospectableList const& GetIntrospectableChildren(); + virtual IntrospectableList GetIntrospectableChildren(); guint64 GetIntrospectionId() const; protected: |
