~attente/unity/hud-controller-gvariant-type-error

« back to all changes in this revision

Viewing changes to dash/ScopeView.cpp

  • Committer: Marco Trevisan (Treviño)
  • Date: 2013-11-14 03:00:29 UTC
  • mto: This revision was merged to the branch mainline in revision 3596.
  • Revision ID: mail@3v1n0.net-20131114030029-jw6albd1rccg1uzm
Unity: always prefer passing [this] to lambdas than [&]

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
  {
60
60
    SetVScrollBar(scroll_bar);
61
61
 
62
 
    OnVisibleChanged.connect([&] (nux::Area* /*area*/, bool visible) {
 
62
    OnVisibleChanged.connect([this] (nux::Area* /*area*/, bool visible) {
63
63
      if (m_horizontal_scrollbar_enable)
64
64
        _hscrollbar->SetVisible(visible);
65
65
      if (m_vertical_scrollbar_enable)
178
178
    conn_manager_.Add(scope_->filters.changed.connect(sigc::mem_fun(this, &ScopeView::SetupFilters)));
179
179
    SetupFilters(scope->filters);
180
180
 
181
 
    scope_->connected.changed.connect([&](bool is_connected)
 
181
    scope_->connected.changed.connect([this](bool is_connected)
182
182
    {
183
183
      // We need to search again if we were reconnected after being connected before.
184
184
      if (scope_connected_ && !is_connected)
193
193
    });
194
194
  }
195
195
 
196
 
  ubus_manager_.RegisterInterest(UBUS_RESULT_VIEW_KEYNAV_CHANGED, [&] (GVariant* data) {
 
196
  ubus_manager_.RegisterInterest(UBUS_RESULT_VIEW_KEYNAV_CHANGED, [this] (GVariant* data) {
197
197
    // we get this signal when a result view keynav changes,
198
198
    // its a bad way of doing this but nux ABI needs to be broken
199
199
    // to do it properly
220
220
    }
221
221
  });
222
222
 
223
 
  OnVisibleChanged.connect([&] (nux::Area* area, bool visible) {
 
223
  OnVisibleChanged.connect([this] (nux::Area* area, bool visible) {
224
224
    scroll_view_->SetVisible(visible);
225
225
 
226
226
    if ((filters_expanded && visible) || !visible)
757
757
{
758
758
  if (!model_updated_timeout_)
759
759
  {
760
 
    model_updated_timeout_.reset(new glib::Idle([&] () {
 
760
    model_updated_timeout_.reset(new glib::Idle([this] () {
761
761
      // Check if all results so far are from one category
762
762
      // If so, then expand that category.
763
763
      CheckCategoryCounts();
830
830
  if (scope_)
831
831
  {
832
832
    // 150ms to hide the no reults message if its take a while to return results
833
 
    hide_message_delay_.reset(new glib::Timeout(150, [&] () {
 
833
    hide_message_delay_.reset(new glib::Timeout(150, [this] () {
834
834
      HideResultsMessage();
835
835
      return false;
836
836
    }));