Nux

Merge lp:~brandontschaefer/nux/nux.fix-input_method_text_change into lp:nux/2.0

Proposed by Brandon Schaefer on 2012-03-02
Status: Merged
Approved by: Brandon Schaefer on 2012-03-14
Approved revision: 588
Merged at revision: 599
Proposed branch: lp:~brandontschaefer/nux/nux.fix-input_method_text_change
Merge into: lp:nux/2.0
Diff against target: 71 lines (+1/-15)
2 files modified
Nux/InputMethodIBus.cpp (+1/-3)
tests/xtest-text-entry.cpp (+0/-12)
To merge this branch: bzr merge lp:~brandontschaefer/nux/nux.fix-input_method_text_change
Reviewer Review Type Date Requested Status
Tim Penhey (community) 2012-03-02 Approve on 2012-03-04
Review via email: mp+95508@code.launchpad.net

Description of the Change

= 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.

To post a comment you must log in.
Tim Penhey (thumper) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Nux/InputMethodIBus.cpp'
2--- Nux/InputMethodIBus.cpp 2012-02-23 05:13:46 +0000
3+++ Nux/InputMethodIBus.cpp 2012-03-02 05:40:25 +0000
4@@ -259,7 +259,6 @@
5 text_entry_->preedit_ = preedit;
6 text_entry_->preedit_cursor_ = preedit.length();
7 text_entry_->QueueRefresh (true, true);
8- text_entry_->text_changed.emit(text_entry_);
9 }
10 }
11 else
12@@ -281,7 +280,6 @@
13
14 text_entry_->ResetPreedit();
15 text_entry_->QueueRefresh (true, true);
16- text_entry_->text_changed.emit(text_entry_);
17 }
18
19 void IBusIMEContext::OnEnable(IBusInputContext *context)
20@@ -290,6 +288,7 @@
21 nuxAssert(context_ == context);
22
23 text_entry_->ime_active_ = true;
24+ text_entry_->text_changed.emit(text_entry_);
25 UpdateCursorLocation();
26 }
27
28@@ -301,7 +300,6 @@
29 text_entry_->ime_active_ = false;
30 text_entry_->ResetPreedit();
31 text_entry_->QueueRefresh (true, true);
32- text_entry_->text_changed.emit(text_entry_);
33 }
34
35 void IBusIMEContext::OnDestroy(IBusInputContext *context)
36
37=== modified file 'tests/xtest-text-entry.cpp'
38--- tests/xtest-text-entry.cpp 2012-02-23 08:54:32 +0000
39+++ tests/xtest-text-entry.cpp 2012-03-02 05:40:25 +0000
40@@ -308,10 +308,6 @@
41
42 active = true;
43 }
44- else
45- {
46- test.TestReportMsg(false,"Pinyin is NOT an active input method" );
47- }
48
49 // Test for ibus-hangul
50 if (bus_ && SetEngineActive(bus_,"hangul"))
51@@ -331,10 +327,6 @@
52
53 active = true;
54 }
55- else
56- {
57- test.TestReportMsg(false,"Hangul is NOT an active input method" );
58- }
59
60 // Checking for ibus-anthy - Japanese
61 if (bus_ && SetEngineActive(bus_,"anthy"))
62@@ -359,10 +351,6 @@
63
64 active = true;
65 }
66- else
67- {
68- test.TestReportMsg(false,"Anthy is NOT an active input method" );
69- }
70
71 g_object_unref (bus_);
72

Subscribers

People subscribed via source and target branches

to all changes: