diff options
| author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2012-05-20 20:48:00 +0200 |
|---|---|---|
| committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2012-05-20 20:48:00 +0200 |
| commit | cc74d2490eec6bcc0c04c711d68b950166480f2b (patch) | |
| tree | d63279c0b2e616e2cc212a8de5dd14a8a725e21a /dash | |
| parent | 11fb5a971257aef9e41c486a9003bc927b3db20b (diff) | |
Unity: make the sources to always destroy before other relevant objects
(bzr r2364.3.34)
Diffstat (limited to 'dash')
| -rw-r--r-- | dash/DashController.cpp | 4 | ||||
| -rw-r--r-- | dash/DashController.h | 12 | ||||
| -rw-r--r-- | dash/LensView.cpp | 2 | ||||
| -rw-r--r-- | dash/LensView.h | 5 | ||||
| -rw-r--r-- | dash/PlacesGroup.h | 2 |
5 files changed, 12 insertions, 13 deletions
diff --git a/dash/DashController.cpp b/dash/DashController.cpp index ddcd6a3d5..259e4732f 100644 --- a/dash/DashController.cpp +++ b/dash/DashController.cpp @@ -40,12 +40,12 @@ nux::logging::Logger logger("unity.dash.controller"); Controller::Controller() : launcher_width(64) , use_primary(false) - , ensure_timeout_(40 * 1000) - , timeline_animator_(90) , monitor_(0) , visible_(false) , need_show_(false) , view_(nullptr) + , ensure_timeout_(40 * 1000) + , timeline_animator_(90) { SetupRelayoutCallbacks(); RegisterUBusInterests(); diff --git a/dash/DashController.h b/dash/DashController.h index 9e9cf744d..dbcaf2aee 100644 --- a/dash/DashController.h +++ b/dash/DashController.h @@ -87,18 +87,18 @@ private: static void OnWindowConfigure(int width, int height, nux::Geometry& geo, void* data); private: - glib::SignalManager sig_manager_; - glib::Timeout ensure_timeout_; - UBusManager ubus_manager_; - Animator timeline_animator_; + nux::ObjectPtr<nux::BaseWindow> window_; int monitor_; - nux::ObjectPtr<nux::BaseWindow> window_; bool visible_; bool need_show_; - DashView* view_; + sigc::connection screen_ungrabbed_slot_; + glib::SignalManager sig_manager_; + glib::Timeout ensure_timeout_; + Animator timeline_animator_; + UBusManager ubus_manager_; }; diff --git a/dash/LensView.cpp b/dash/LensView.cpp index 2506fb98e..932c0d40d 100644 --- a/dash/LensView.cpp +++ b/dash/LensView.cpp @@ -145,7 +145,7 @@ LensView::LensView(Lens::Ptr lens, nux::Area* show_filters) filters_expanded.changed.connect([&](bool expanded) { fscroll_view_->SetVisible(expanded); QueueRelayout(); OnColumnsChanged(); }); view_type.changed.connect(sigc::mem_fun(this, &LensView::OnViewTypeChanged)); - ubus_.RegisterInterest(UBUS_RESULT_VIEW_KEYNAV_CHANGED, [this] (GVariant* data) { + ubus_manager_.RegisterInterest(UBUS_RESULT_VIEW_KEYNAV_CHANGED, [&] (GVariant* data) { // we get this signal when a result view keynav changes, // its a bad way of doing this but nux ABI needs to be broken // to do it properly diff --git a/dash/LensView.h b/dash/LensView.h index f2c70aefb..bfc0b5f19 100644 --- a/dash/LensView.h +++ b/dash/LensView.h @@ -102,14 +102,12 @@ private: std::string get_search_string() const; private: - UBusManager ubus_manager_; Lens::Ptr lens_; CategoryGroups categories_; ResultCounts counts_; bool initial_activation_; bool no_results_active_; std::string search_string_; - glib::Source::UniquePtr fix_rendering_idle_; nux::HLayout* layout_; LensScrollView* scroll_view_; @@ -119,7 +117,8 @@ private: FilterBar* filter_bar_; nux::StaticCairoText* no_results_; - UBusManager ubus_; + UBusManager ubus_manager_; + glib::Source::UniquePtr fix_rendering_idle_; }; diff --git a/dash/PlacesGroup.h b/dash/PlacesGroup.h index f279cd715..8e9bab92d 100644 --- a/dash/PlacesGroup.h +++ b/dash/PlacesGroup.h @@ -114,7 +114,6 @@ private: nux::ObjectPtr<nux::HLayout> separator_layout_; HSeparator* separator_; std::unique_ptr<nux::AbstractPaintLayer> _focus_layer; - glib::Source::UniquePtr _relayout_idle; IconTexture* _icon; nux::StaticCairoText* _name; @@ -127,6 +126,7 @@ private: std::string _cached_name; nux::Geometry _cached_geometry; + glib::Source::UniquePtr _relayout_idle; UBusManager _ubus; }; |
