summaryrefslogtreecommitdiff
diff options
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2012-07-16 03:09:52 +0200
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2012-07-16 03:09:52 +0200
commit35a817091deafb2528f8dae3993a5f54806226f5 (patch)
treeca92b8f4090ed20195aca6b8cf9654b46d153884
parentafaa3f3534f3445c3411948988a3832e8cd40b45 (diff)
ShortcutView: pass values to lambda by value instead of using sigc::bind
(bzr r2501.1.8)
-rw-r--r--shortcuts/ShortcutView.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/shortcuts/ShortcutView.cpp b/shortcuts/ShortcutView.cpp
index 564d270b5..4c0a64a6c 100644
--- a/shortcuts/ShortcutView.cpp
+++ b/shortcuts/ShortcutView.cpp
@@ -208,16 +208,16 @@ nux::View* View::CreateShortKeyEntryView(AbstractHint::Ptr const& hint)
layout->SetSpaceBetweenChildren(INTER_SPACE_SHORTKEY_DESCRIPTION);
description_layout->SetContentDistribution(nux::MAJOR_POSITION_START);
- auto on_shortkey_changed = [](std::string const& new_shortkey, nux::View* main_view, nux::StaticText* view) {
+ auto on_shortkey_changed = [view, shortkey_view] (std::string const& new_shortkey) {
std::string skey("<b>");
skey += new_shortkey;
skey += "</b>";
- view->SetText(skey);
- main_view->SetVisible(!new_shortkey.empty());
+ shortkey_view->SetText(skey);
+ view->SetVisible(!new_shortkey.empty());
};
- hint->shortkey.changed.connect(sigc::bind(sigc::slot<void, std::string const&, nux::View*, nux::StaticText*>(on_shortkey_changed), view, shortkey_view));
+ hint->shortkey.changed.connect(on_shortkey_changed);
return view;
}