diff options
| -rw-r--r-- | plugins/unityshell/src/FilterExpanderLabel.cpp | 3 | ||||
| -rw-r--r-- | plugins/unityshell/src/HudIcon.cpp | 6 | ||||
| -rw-r--r-- | plugins/unityshell/src/HudIcon.h | 2 | ||||
| -rw-r--r-- | plugins/unityshell/src/QuicklistView.cpp | 6 | ||||
| -rw-r--r-- | plugins/unityshell/src/Tooltip.cpp | 6 | ||||
| -rw-r--r-- | plugins/unityshell/src/UnityWindowStyle.cpp | 8 |
6 files changed, 16 insertions, 15 deletions
diff --git a/plugins/unityshell/src/FilterExpanderLabel.cpp b/plugins/unityshell/src/FilterExpanderLabel.cpp index 35543bd7c..be4da93e6 100644 --- a/plugins/unityshell/src/FilterExpanderLabel.cpp +++ b/plugins/unityshell/src/FilterExpanderLabel.cpp @@ -76,7 +76,8 @@ void FilterExpanderLabel::SetRightHandView(nux::View* view) void FilterExpanderLabel::SetContents(nux::Layout* contents) { - contents_.Adopt(contents); + // Since the contents is initially unowned, we don't want to Adopt it, just assign. + contents_ = contents; layout_->AddLayout(contents_.GetPointer(), 1, nux::MINOR_POSITION_LEFT, nux::MINOR_SIZE_FULL); top_bar_layout_->SetTopAndBottomPadding(0); diff --git a/plugins/unityshell/src/HudIcon.cpp b/plugins/unityshell/src/HudIcon.cpp index d0128ff42..3b213447c 100644 --- a/plugins/unityshell/src/HudIcon.cpp +++ b/plugins/unityshell/src/HudIcon.cpp @@ -50,9 +50,9 @@ void Icon::Init() { SetMinimumWidth(66); SetMinimumHeight(66); - background_ = nux::CreateTexture2DFromFile(PKGDATADIR"/launcher_icon_back_54.png", -1, true); - gloss_ = nux::CreateTexture2DFromFile(PKGDATADIR"/launcher_icon_shine_54.png", -1, true); - edge_ = nux::CreateTexture2DFromFile(PKGDATADIR"/launcher_icon_edge_54.png", -1, true); + background_.Adopt(nux::CreateTexture2DFromFile(PKGDATADIR"/launcher_icon_back_54.png", -1, true)); + gloss_.Adopt(nux::CreateTexture2DFromFile(PKGDATADIR"/launcher_icon_shine_54.png", -1, true)); + edge_.Adopt(nux::CreateTexture2DFromFile(PKGDATADIR"/launcher_icon_edge_54.png", -1, true)); texture_updated.connect([&] (nux::BaseTexture* texture) { diff --git a/plugins/unityshell/src/HudIcon.h b/plugins/unityshell/src/HudIcon.h index 5e24b518b..82ddf3ba9 100644 --- a/plugins/unityshell/src/HudIcon.h +++ b/plugins/unityshell/src/HudIcon.h @@ -50,7 +50,7 @@ namespace hud class Icon : public unity::IconTexture { public: - typedef nux::ObjectPtr<IconTexture> Ptr; + typedef nux::ObjectPtr<IconTexture> Ptr; Icon(nux::BaseTexture* texture, guint width, guint height); Icon(const char* icon_name, unsigned int size, bool defer_icon_loading = false); ~Icon(); diff --git a/plugins/unityshell/src/QuicklistView.cpp b/plugins/unityshell/src/QuicklistView.cpp index 41733e991..24ea7d6af 100644 --- a/plugins/unityshell/src/QuicklistView.cpp +++ b/plugins/unityshell/src/QuicklistView.cpp @@ -1323,9 +1323,9 @@ void QuicklistView::UpdateTexture() cairo_destroy(cr_outline); cairo_destroy(cr_mask); - texture_bg_ = texture_from_cairo_graphics(cairo_bg); - texture_mask_ = texture_from_cairo_graphics(cairo_mask); - texture_outline_ = texture_from_cairo_graphics(cairo_outline); + texture_bg_ = texture_ptr_from_cairo_graphics(cairo_bg); + texture_mask_ = texture_ptr_from_cairo_graphics(cairo_mask); + texture_outline_ = texture_ptr_from_cairo_graphics(cairo_outline); _cairo_text_has_changed = false; diff --git a/plugins/unityshell/src/Tooltip.cpp b/plugins/unityshell/src/Tooltip.cpp index c7f3256dd..d1a9843ba 100644 --- a/plugins/unityshell/src/Tooltip.cpp +++ b/plugins/unityshell/src/Tooltip.cpp @@ -513,9 +513,9 @@ void Tooltip::UpdateTexture() cairo_destroy(cr_outline); cairo_destroy(cr_mask); - texture_bg_ = texture_from_cairo_graphics(cairo_bg); - texture_mask_ = texture_from_cairo_graphics(cairo_mask); - texture_outline_ = texture_from_cairo_graphics(cairo_outline); + texture_bg_ = texture_ptr_from_cairo_graphics(cairo_bg); + texture_mask_ = texture_ptr_from_cairo_graphics(cairo_mask); + texture_outline_ = texture_ptr_from_cairo_graphics(cairo_outline); _cairo_text_has_changed = false; } diff --git a/plugins/unityshell/src/UnityWindowStyle.cpp b/plugins/unityshell/src/UnityWindowStyle.cpp index 826f7669d..348688ff8 100644 --- a/plugins/unityshell/src/UnityWindowStyle.cpp +++ b/plugins/unityshell/src/UnityWindowStyle.cpp @@ -24,9 +24,9 @@ namespace ui { UnityWindowStyle::UnityWindowStyle() { - background_top_ = BaseTexturePtr(nux::CreateTexture2DFromFile(PKGDATADIR"/switcher_top.png", -1, true)); - background_left_ = BaseTexturePtr(nux::CreateTexture2DFromFile(PKGDATADIR"/switcher_left.png", -1, true)); - background_corner_ = BaseTexturePtr(nux::CreateTexture2DFromFile(PKGDATADIR"/switcher_corner.png", -1, true)); + background_top_.Adopt(nux::CreateTexture2DFromFile(PKGDATADIR"/switcher_top.png", -1, true)); + background_left_.Adopt(nux::CreateTexture2DFromFile(PKGDATADIR"/switcher_left.png", -1, true)); + background_corner_.Adopt(nux::CreateTexture2DFromFile(PKGDATADIR"/switcher_corner.png", -1, true)); } UnityWindowStyle::~UnityWindowStyle() @@ -61,4 +61,4 @@ nux::BaseTexture* UnityWindowStyle::GetBackgroundCorner() const } -} \ No newline at end of file +} |
