summaryrefslogtreecommitdiff
path: root/unity-shared
diff options
Diffstat (limited to 'unity-shared')
-rw-r--r--unity-shared/CoverArt.cpp2
-rw-r--r--unity-shared/DefaultThumbnailProvider.cpp1
-rw-r--r--unity-shared/IMTextEntry.h1
-rw-r--r--unity-shared/IconLoader.cpp2
-rw-r--r--unity-shared/IconTextureSource.h1
-rw-r--r--unity-shared/MockableBaseWindow.h1
-rw-r--r--unity-shared/OverlayWindowButtons.cpp2
-rw-r--r--unity-shared/PanelStyle.cpp8
-rw-r--r--unity-shared/PlacesOverlayVScrollBar.h1
-rw-r--r--unity-shared/PlacesVScrollBar.h2
-rw-r--r--unity-shared/RatingsButton.cpp4
-rw-r--r--unity-shared/ResizingBaseWindow.h2
-rw-r--r--unity-shared/SearchBar.cpp14
-rw-r--r--unity-shared/SearchBarSpinner.cpp2
-rw-r--r--unity-shared/TextInput.cpp4
-rw-r--r--unity-shared/TextureThumbnailProvider.cpp1
-rw-r--r--unity-shared/ThumbnailGenerator.cpp4
-rw-r--r--unity-shared/ThumbnailGenerator.h2
-rw-r--r--unity-shared/UBusServer.cpp2
-rw-r--r--unity-shared/UScreen.cpp4
-rw-r--r--unity-shared/UnityWindowView.cpp11
-rw-r--r--unity-shared/UserThumbnailProvider.cpp1
-rw-r--r--unity-shared/VScrollBarOverlayWindow.h1
-rw-r--r--unity-shared/WindowButtons.cpp6
24 files changed, 50 insertions, 29 deletions
diff --git a/unity-shared/CoverArt.cpp b/unity-shared/CoverArt.cpp
index 2399214d6..99f003b8f 100644
--- a/unity-shared/CoverArt.cpp
+++ b/unity-shared/CoverArt.cpp
@@ -160,7 +160,7 @@ void CoverArt::StartWaiting()
rotate_matrix_.Rotate_z(0.0f);
rotation_ = 0.0f;
- spinner_timeout_.reset(new glib::TimeoutSeconds(IMAGE_TIMEOUT, [&]
+ spinner_timeout_.reset(new glib::TimeoutSeconds(IMAGE_TIMEOUT, [this]
{
StopWaiting();
diff --git a/unity-shared/DefaultThumbnailProvider.cpp b/unity-shared/DefaultThumbnailProvider.cpp
index 7545b21e5..5d16b4744 100644
--- a/unity-shared/DefaultThumbnailProvider.cpp
+++ b/unity-shared/DefaultThumbnailProvider.cpp
@@ -36,6 +36,7 @@ public:
DefaultThumbnailer(std::string const& name)
: name(name)
{}
+ virtual ~DefaultThumbnailer() {}
std::string name;
diff --git a/unity-shared/IMTextEntry.h b/unity-shared/IMTextEntry.h
index b39b37b85..086b23e51 100644
--- a/unity-shared/IMTextEntry.h
+++ b/unity-shared/IMTextEntry.h
@@ -32,6 +32,7 @@ class IMTextEntry : public nux::TextEntry
NUX_DECLARE_OBJECT_TYPE(IMTextEntry, nux::TextEntry);
public:
IMTextEntry();
+ virtual ~IMTextEntry() {}
bool im_preedit();
protected:
diff --git a/unity-shared/IconLoader.cpp b/unity-shared/IconLoader.cpp
index ee7db98df..bfa03fae7 100644
--- a/unity-shared/IconLoader.cpp
+++ b/unity-shared/IconLoader.cpp
@@ -830,7 +830,7 @@ IconLoader::Impl::Impl()
, theme_(::gtk_icon_theme_get_default())
, handle_counter_(0)
{
- theme_changed_signal_.Connect(theme_, "changed", [&] (GtkIconTheme*) {
+ theme_changed_signal_.Connect(theme_, "changed", [this] (GtkIconTheme*) {
/* Since the theme has been changed we can clear the cache, however we
* could include two improvements here:
* 1) clear only the themed icons in cache
diff --git a/unity-shared/IconTextureSource.h b/unity-shared/IconTextureSource.h
index 9388c979a..2a81c0902 100644
--- a/unity-shared/IconTextureSource.h
+++ b/unity-shared/IconTextureSource.h
@@ -46,6 +46,7 @@ public:
};
IconTextureSource();
+ virtual ~IconTextureSource() {}
std::vector<nux::Vector4> & GetTransform(TransformIndex index, int monitor);
diff --git a/unity-shared/MockableBaseWindow.h b/unity-shared/MockableBaseWindow.h
index fb52eef06..3fa051b12 100644
--- a/unity-shared/MockableBaseWindow.h
+++ b/unity-shared/MockableBaseWindow.h
@@ -37,6 +37,7 @@ public:
: nux::BaseWindow(window_name, NUX_TRACKER_LOCATION)
, struts_enabled_(false)
{}
+ virtual ~MockableBaseWindow() {}
/**
* Sets the window opacity.
diff --git a/unity-shared/OverlayWindowButtons.cpp b/unity-shared/OverlayWindowButtons.cpp
index 5e498ba52..97616548e 100644
--- a/unity-shared/OverlayWindowButtons.cpp
+++ b/unity-shared/OverlayWindowButtons.cpp
@@ -36,7 +36,7 @@ OverlayWindowButtons::OverlayWindowButtons()
: nux::BaseWindow("OverlayWindowButtons")
, window_buttons_(new WindowButtons())
{
- window_buttons_->queue_draw.connect([&] (nux::Layout* /*layout*/) {
+ window_buttons_->queue_draw.connect([this] (nux::Layout* /*layout*/) {
QueueDraw();
});
diff --git a/unity-shared/PanelStyle.cpp b/unity-shared/PanelStyle.cpp
index ba0768224..5ce50c1fa 100644
--- a/unity-shared/PanelStyle.cpp
+++ b/unity-shared/PanelStyle.cpp
@@ -96,22 +96,22 @@ Style::Style()
GtkSettings* settings = gtk_settings_get_default();
_style_changed_signal.Connect(settings, "notify::gtk-theme-name",
- [&] (GtkSettings*, GParamSpec*) {
+ [this] (GtkSettings*, GParamSpec*) {
Refresh();
});
_font_changed_signal.Connect(settings, "notify::gtk-font-name",
- [&] (GtkSettings*, GParamSpec*) {
+ [this] (GtkSettings*, GParamSpec*) {
changed.emit();
});
_dpi_changed_signal.Connect(settings, "notify::gtk-xft-dpi",
- [&] (GtkSettings*, GParamSpec*) {
+ [this] (GtkSettings*, GParamSpec*) {
changed.emit();
});
_settings_changed_signal.Connect(_gsettings, "changed::" + PANEL_TITLE_FONT_KEY,
- [&] (GSettings*, gchar*) {
+ [this] (GSettings*, gchar*) {
changed.emit();
});
diff --git a/unity-shared/PlacesOverlayVScrollBar.h b/unity-shared/PlacesOverlayVScrollBar.h
index a32e4f18a..b9697ef47 100644
--- a/unity-shared/PlacesOverlayVScrollBar.h
+++ b/unity-shared/PlacesOverlayVScrollBar.h
@@ -38,6 +38,7 @@ class PlacesOverlayVScrollBar: public PlacesVScrollBar
{
public:
PlacesOverlayVScrollBar(NUX_FILE_LINE_PROTO);
+ virtual ~PlacesOverlayVScrollBar() {}
protected:
void Draw(nux::GraphicsEngine& graphics_engine, bool force_draw);
diff --git a/unity-shared/PlacesVScrollBar.h b/unity-shared/PlacesVScrollBar.h
index 87f793ea9..c6bc201cb 100644
--- a/unity-shared/PlacesVScrollBar.h
+++ b/unity-shared/PlacesVScrollBar.h
@@ -36,7 +36,7 @@ class PlacesVScrollBar : public nux::VScrollBar
{
public:
PlacesVScrollBar(NUX_FILE_LINE_PROTO);
- ~PlacesVScrollBar();
+ virtual ~PlacesVScrollBar();
protected:
virtual void PreLayoutManagement();
diff --git a/unity-shared/RatingsButton.cpp b/unity-shared/RatingsButton.cpp
index 391e09e1e..ac3865db6 100644
--- a/unity-shared/RatingsButton.cpp
+++ b/unity-shared/RatingsButton.cpp
@@ -49,7 +49,7 @@ RatingsButton::RatingsButton(int star_size, int star_gap, NUX_FILE_LINE_DECL)
mouse_move.connect(sigc::mem_fun(this, &RatingsButton::RecvMouseMove));
mouse_drag.connect(sigc::mem_fun(this, &RatingsButton::RecvMouseDrag));
- key_nav_focus_change.connect([&](nux::Area* area, bool has_focus, nux::KeyNavDirection direction)
+ key_nav_focus_change.connect([this](nux::Area* area, bool has_focus, nux::KeyNavDirection direction)
{
if (has_focus && direction != nux::KEY_NAV_NONE)
focused_star_ = 0;
@@ -58,7 +58,7 @@ RatingsButton::RatingsButton(int star_size, int star_gap, NUX_FILE_LINE_DECL)
QueueDraw();
});
- key_nav_focus_activate.connect([&](nux::Area*) { SetRating(static_cast<float>(focused_star_+1)/num_stars); });
+ key_nav_focus_activate.connect([this](nux::Area*) { SetRating(static_cast<float>(focused_star_+1)/num_stars); });
key_down.connect(sigc::mem_fun(this, &RatingsButton::OnKeyDown));
}
diff --git a/unity-shared/ResizingBaseWindow.h b/unity-shared/ResizingBaseWindow.h
index 3d9080133..75d3721c7 100644
--- a/unity-shared/ResizingBaseWindow.h
+++ b/unity-shared/ResizingBaseWindow.h
@@ -50,6 +50,8 @@ public:
ResizingBaseWindow(char const* window_name,
GeometryAdjuster const& input_adjustment);
+ virtual ~ResizingBaseWindow() {}
+
/**
* Recalculates the input window geometry.
*
diff --git a/unity-shared/SearchBar.cpp b/unity-shared/SearchBar.cpp
index 19710bc56..f82cd39dd 100644
--- a/unity-shared/SearchBar.cpp
+++ b/unity-shared/SearchBar.cpp
@@ -165,8 +165,8 @@ void SearchBar::Init()
pango_entry_->SetFontFamily(PANGO_ENTRY_DEFAULT_FONT_FAMILY.c_str());
pango_entry_->SetFontSize(PANGO_ENTRY_FONT_SIZE);
pango_entry_->text_changed.connect(sigc::mem_fun(this, &SearchBar::OnSearchChanged));
- pango_entry_->activated.connect([&]() { activated.emit(); });
- pango_entry_->cursor_moved.connect([&](int i) { QueueDraw(); });
+ pango_entry_->activated.connect([this]() { activated.emit(); });
+ pango_entry_->cursor_moved.connect([this](int i) { QueueDraw(); });
pango_entry_->mouse_down.connect(sigc::mem_fun(this, &SearchBar::OnMouseButtonDown));
pango_entry_->end_key_focus.connect(sigc::mem_fun(this, &SearchBar::OnEndKeyFocus));
pango_entry_->key_up.connect([this] (unsigned int, unsigned long, unsigned long) {
@@ -232,17 +232,17 @@ void SearchBar::Init()
show_filters_->SetMaximumWidth(style.GetFilterBarWidth() - arrow_layout_->GetBaseWidth() - 8);
// Lambda functions
- auto mouse_expand = [&](int, int, unsigned long, unsigned long)
+ auto mouse_expand = [this](int, int, unsigned long, unsigned long)
{
showing_filters = !showing_filters;
};
- auto key_redraw = [&](nux::Area*, bool, nux::KeyNavDirection)
+ auto key_redraw = [this](nux::Area*, bool, nux::KeyNavDirection)
{
QueueDraw();
};
- auto key_expand = [&](nux::Area*)
+ auto key_expand = [this](nux::Area*)
{
showing_filters = !showing_filters;
};
@@ -259,13 +259,13 @@ void SearchBar::Init()
sigc::mem_fun(this, &SearchBar::OnFontChanged));
OnFontChanged(gtk_settings_get_default());
- search_hint.changed.connect([&](std::string const& s) { OnSearchHintChanged(); });
+ search_hint.changed.connect([this](std::string const& s) { OnSearchHintChanged(); });
search_string.SetGetterFunction(sigc::mem_fun(this, &SearchBar::get_search_string));
search_string.SetSetterFunction(sigc::mem_fun(this, &SearchBar::set_search_string));
im_active.SetGetterFunction(sigc::mem_fun(this, &SearchBar::get_im_active));
im_preedit.SetGetterFunction(sigc::mem_fun(this, &SearchBar::get_im_preedit));
showing_filters.changed.connect(sigc::mem_fun(this, &SearchBar::OnShowingFiltersChanged));
- can_refine_search.changed.connect([&] (bool can_refine)
+ can_refine_search.changed.connect([this] (bool can_refine)
{
if (show_filter_hint_)
{
diff --git a/unity-shared/SearchBarSpinner.cpp b/unity-shared/SearchBarSpinner.cpp
index 639feef84..8263ee71e 100644
--- a/unity-shared/SearchBarSpinner.cpp
+++ b/unity-shared/SearchBarSpinner.cpp
@@ -175,7 +175,7 @@ SearchBarSpinner::SetState(SpinnerState state)
if (search_timeout_ > 0 && state_== STATE_SEARCHING)
{
- spinner_timeout_.reset(new glib::Timeout(search_timeout_, [&] {
+ spinner_timeout_.reset(new glib::Timeout(search_timeout_, [this] {
state_ = STATE_READY;
return false;
}));
diff --git a/unity-shared/TextInput.cpp b/unity-shared/TextInput.cpp
index 4aa01ee1c..8258e42e8 100644
--- a/unity-shared/TextInput.cpp
+++ b/unity-shared/TextInput.cpp
@@ -74,7 +74,7 @@ void TextInput::Init()
pango_entry_ = new IMTextEntry();
pango_entry_->SetFontFamily(PANGO_ENTRY_DEFAULT_FONT_FAMILY.c_str());
pango_entry_->SetFontSize(PANGO_ENTRY_FONT_SIZE);
- pango_entry_->cursor_moved.connect([&](int i) { QueueDraw(); });
+ pango_entry_->cursor_moved.connect([this](int i) { QueueDraw(); });
pango_entry_->mouse_down.connect(sigc::mem_fun(this, &TextInput::OnMouseButtonDown));
pango_entry_->end_key_focus.connect(sigc::mem_fun(this, &TextInput::OnEndKeyFocus));
@@ -93,7 +93,7 @@ void TextInput::Init()
input_string.SetSetterFunction(sigc::mem_fun(this, &TextInput::set_input_string));
im_active.SetGetterFunction(sigc::mem_fun(this, &TextInput::get_im_active));
im_preedit.SetGetterFunction(sigc::mem_fun(this, &TextInput::get_im_preedit));
- input_hint.changed.connect([&](std::string const& s) { OnInputHintChanged(); });
+ input_hint.changed.connect([this](std::string const& s) { OnInputHintChanged(); });
}
diff --git a/unity-shared/TextureThumbnailProvider.cpp b/unity-shared/TextureThumbnailProvider.cpp
index 128daf8bf..0cfbc55e2 100644
--- a/unity-shared/TextureThumbnailProvider.cpp
+++ b/unity-shared/TextureThumbnailProvider.cpp
@@ -36,6 +36,7 @@ public:
GdkTextureThumbnailer(std::string const& name)
: name(name)
{}
+ virtual ~GdkTextureThumbnailer() {}
std::string name;
diff --git a/unity-shared/ThumbnailGenerator.cpp b/unity-shared/ThumbnailGenerator.cpp
index fae86ad91..9eef47bab 100644
--- a/unity-shared/ThumbnailGenerator.cpp
+++ b/unity-shared/ThumbnailGenerator.cpp
@@ -187,7 +187,7 @@ ThumbnailNotifier::Ptr ThumbnailGeneratorImpl::GetThumbnail(std::string const& u
if (!thread_create_timer_ && thumbnail_thread_is_running_ == false)
{
- thread_create_timer_.reset(new glib::Timeout(0, [&]()
+ thread_create_timer_.reset(new glib::Timeout(0, [this]()
{
thumbnail_thread_is_running_ = true;
pthread_create (&thumbnail_thread_, NULL, thumbnail_thread_start, this);
@@ -214,7 +214,7 @@ ThumbnailNotifier::Ptr ThumbnailGeneratorImpl::GetThumbnail(std::string const& u
void ThumbnailGeneratorImpl::StartCleanupTimer()
{
if (!cleanup_timer_)
- cleanup_timer_.reset(new glib::Timeout(CLEANUP_DURATION, [&]() { DoCleanup(); return false; }));
+ cleanup_timer_.reset(new glib::Timeout(CLEANUP_DURATION, [this]() { DoCleanup(); return false; }));
}
diff --git a/unity-shared/ThumbnailGenerator.h b/unity-shared/ThumbnailGenerator.h
index 387620945..b717216f8 100644
--- a/unity-shared/ThumbnailGenerator.h
+++ b/unity-shared/ThumbnailGenerator.h
@@ -33,6 +33,8 @@ class Thumbnailer
public:
typedef std::shared_ptr<Thumbnailer> Ptr;
+ virtual ~Thumbnailer() {}
+
virtual std::string GetName() const = 0;
virtual bool Run(int size, std::string const& input_file, std::string& output_file, std::string& error_hint) = 0;
diff --git a/unity-shared/UBusServer.cpp b/unity-shared/UBusServer.cpp
index 7016548a7..105983bfc 100644
--- a/unity-shared/UBusServer.cpp
+++ b/unity-shared/UBusServer.cpp
@@ -44,7 +44,7 @@ unsigned UBusServer::RegisterInterest(std::string const& interest_name,
void UBusServer::UnregisterInterest(unsigned connection_id)
{
auto it = std::find_if(interests_.begin(), interests_.end(),
- [&] (std::pair<std::string, UBusConnection::Ptr> const& p)
+ [connection_id] (std::pair<std::string, UBusConnection::Ptr> const& p)
{ return p.second->id == connection_id; });
if (it != interests_.end()) interests_.erase(it);
}
diff --git a/unity-shared/UScreen.cpp b/unity-shared/UScreen.cpp
index 6812a8325..869383824 100644
--- a/unity-shared/UScreen.cpp
+++ b/unity-shared/UScreen.cpp
@@ -35,7 +35,7 @@ UScreen::UScreen()
{
size_changed_signal_.Connect(screen_, "size-changed", sigc::mem_fun(this, &UScreen::Changed));
monitors_changed_signal_.Connect(screen_, "monitors-changed", sigc::mem_fun(this, &UScreen::Changed));
- proxy_.Connect("Resuming", [&] (GVariant* data) { resuming.emit(); });
+ proxy_.Connect("Resuming", [this] (GVariant* data) { resuming.emit(); });
Refresh();
}
@@ -101,7 +101,7 @@ void UScreen::Changed(GdkScreen* screen)
if (refresh_idle_)
return;
- refresh_idle_.reset(new glib::Idle([&] () {
+ refresh_idle_.reset(new glib::Idle([this] () {
Refresh();
refresh_idle_.reset();
diff --git a/unity-shared/UnityWindowView.cpp b/unity-shared/UnityWindowView.cpp
index 0638e9160..272ba9eaa 100644
--- a/unity-shared/UnityWindowView.cpp
+++ b/unity-shared/UnityWindowView.cpp
@@ -20,6 +20,7 @@
#include "UnityWindowView.h"
#include <Nux/VLayout.h>
+#include "unity-shared/UnitySettings.h"
#include "unity-shared/WindowManager.h"
namespace unity {
@@ -234,12 +235,20 @@ void UnityWindowView::Draw(nux::GraphicsEngine& GfxContext, bool force_draw)
#ifndef NUX_OPENGLES_20
if (GfxContext.UsingGLSLCodePath())
+ {
+ auto temp_background_color = background_color();
+
+ if (Settings::Instance().GetLowGfxMode())
+ temp_background_color.alpha = 1.0f;
+
gPainter.PushDrawCompositionLayer(GfxContext, base,
bg_texture_,
texxform_blur_bg,
nux::color::White,
- background_color, nux::LAYER_BLEND_MODE_OVERLAY,
+ temp_background_color,
+ Settings::Instance().GetLowGfxMode() ? nux::LAYER_BLEND_MODE_NORMAL : nux::LAYER_BLEND_MODE_OVERLAY,
true, rop);
+ }
else
gPainter.PushDrawTextureLayer(GfxContext, base,
bg_texture_,
diff --git a/unity-shared/UserThumbnailProvider.cpp b/unity-shared/UserThumbnailProvider.cpp
index 2b8511480..5e4de6fa4 100644
--- a/unity-shared/UserThumbnailProvider.cpp
+++ b/unity-shared/UserThumbnailProvider.cpp
@@ -37,6 +37,7 @@ public:
: name(name)
, command_line(command_line)
{}
+ virtual ~UserThumbnailer() {}
std::string name;
std::string command_line;
diff --git a/unity-shared/VScrollBarOverlayWindow.h b/unity-shared/VScrollBarOverlayWindow.h
index 7dfc15d0b..ce78e8c14 100644
--- a/unity-shared/VScrollBarOverlayWindow.h
+++ b/unity-shared/VScrollBarOverlayWindow.h
@@ -32,6 +32,7 @@ class VScrollBarOverlayWindow : public nux::BaseWindow
{
public:
VScrollBarOverlayWindow(nux::Geometry const& geo);
+ virtual ~VScrollBarOverlayWindow() {}
void UpdateGeometry(nux::Geometry const& geo);
void SetThumbOffsetY(int y);
diff --git a/unity-shared/WindowButtons.cpp b/unity-shared/WindowButtons.cpp
index 1dc8c449e..ea5b3254c 100644
--- a/unity-shared/WindowButtons.cpp
+++ b/unity-shared/WindowButtons.cpp
@@ -261,17 +261,17 @@ WindowButtons::WindowButtons()
controlled_window.changed.connect(sigc::mem_fun(this, &WindowButtons::OnControlledWindowChanged));
focused.changed.connect(sigc::hide(sigc::mem_fun(this, &WindowButtons::QueueDraw)));
- auto lambda_enter = [&](int x, int y, unsigned long button_flags, unsigned long key_flags)
+ auto lambda_enter = [this](int x, int y, unsigned long button_flags, unsigned long key_flags)
{
mouse_enter.emit(x, y, button_flags, key_flags);
};
- auto lambda_leave = [&](int x, int y, unsigned long button_flags, unsigned long key_flags)
+ auto lambda_leave = [this](int x, int y, unsigned long button_flags, unsigned long key_flags)
{
mouse_leave.emit(x, y, button_flags, key_flags);
};
- auto lambda_moved = [&](int x, int y, int dx, int dy, unsigned long button_flags, unsigned long key_flags)
+ auto lambda_moved = [this](int x, int y, int dx, int dy, unsigned long button_flags, unsigned long key_flags)
{
mouse_move.emit(x, y, dx, dy, button_flags, key_flags);
};