~haggai-eran/nux/rtl-fallback-to-unity-2d

« back to all changes in this revision

Viewing changes to Nux/InputMethodIBus.cpp

  • Committer: Tarmac
  • Author(s): brandontschaefer at gmail
  • Date: 2012-03-14 23:25:51 UTC
  • mfrom: (586.2.2 nux)
  • Revision ID: tarmac-20120314232551-mz0tlioulzgi0kap
= Problem description =

Preedit text updating was causing text_changed signal to go off, this could be inefficient as it keeps thing the search has changed! Was also causing the search bar spinner to go off when you mouse over any icon in the Dash! (because it would think the search had changed!)

= The fix =

Any kind of preedit changing shouldn't emit text_change, as its not text yet. So those signals are removed now!

= Test coverage =

All autopilot ibus test for nux pass.. Fixes: . Approved by Tim Penhey.

Show diffs side-by-side

added added

removed removed

Lines of Context:
282
282
        text_entry_->preedit_ = preedit;
283
283
        text_entry_->preedit_cursor_ = preedit.length();
284
284
        text_entry_->QueueRefresh (true, true);
285
 
        text_entry_->text_changed.emit(text_entry_);
286
285
      }
287
286
    }
288
287
    else
304
303
 
305
304
    text_entry_->ResetPreedit();
306
305
    text_entry_->QueueRefresh (true, true);
307
 
    text_entry_->text_changed.emit(text_entry_);
308
306
  }
309
307
 
310
308
  void IBusIMEContext::OnEnable(IBusInputContext *context)
313
311
    nuxAssert(context_ == context);
314
312
 
315
313
    text_entry_->ime_active_ = true;
 
314
    text_entry_->text_changed.emit(text_entry_);
316
315
    UpdateCursorLocation();
317
316
  }
318
317
 
324
323
    text_entry_->ime_active_ = false;
325
324
    text_entry_->ResetPreedit();
326
325
    text_entry_->QueueRefresh (true, true);
327
 
    text_entry_->text_changed.emit(text_entry_);
328
326
  }
329
327
 
330
328
  void IBusIMEContext::OnDestroy(IBusInputContext *context)