summaryrefslogtreecommitdiff
path: root/shortcuts
diff options
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2013-07-01 23:43:10 +0200
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2013-07-01 23:43:10 +0200
commit12891c70ab02cf420534e52bcfc4d71a58f52c60 (patch)
treeddfe99c4003ebd7de339b1c34555dcb2f1d34429 /shortcuts
parent96adb1e317a308c72af28b96e046706a079a36cc (diff)
ShortcutView: use connection::Wrapper
(bzr r3387.5.7)
Diffstat (limited to 'shortcuts')
-rw-r--r--shortcuts/ShortcutView.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/shortcuts/ShortcutView.cpp b/shortcuts/ShortcutView.cpp
index e2d1c40d8..389c4f73e 100644
--- a/shortcuts/ShortcutView.cpp
+++ b/shortcuts/ShortcutView.cpp
@@ -21,6 +21,7 @@
#include "ShortcutView.h"
#include <glib/gi18n-lib.h>
+#include <UnityCore/ConnectionManager.h>
#include <UnityCore/GLibWrapper.h>
#include "unity-shared/LineSeparator.h"
@@ -47,12 +48,7 @@ namespace
: nux::View(NUX_FILE_LINE_PARAM)
{}
- ~SectionView()
- {
- key_changed_conn.disconnect();
- }
-
- sigc::connection key_changed_conn;
+ connection::Wrapper key_changed_conn_;
protected:
void Draw(nux::GraphicsEngine& graphics_engine, bool force_draw)
@@ -166,7 +162,7 @@ nux::View* View::CreateShortKeyEntryView(AbstractHint::Ptr const& hint)
layout->SetSpaceBetweenChildren(INTER_SPACE_SHORTKEY_DESCRIPTION);
description_layout->SetContentDistribution(nux::MAJOR_POSITION_START);
- view->key_changed_conn = hint->shortkey.changed.connect([this, view, shortkey_view] (std::string const& new_key) {
+ view->key_changed_conn_ = hint->shortkey.changed.connect([this, view, shortkey_view] (std::string const& new_key) {
bool enabled = !new_key.empty();
shortkey_view->SetText(enabled ? "<b>"+new_key+"</b>" : "");
view->SetVisible(enabled);