Nux

Merge lp:~brandontschaefer/nux/ibus-active-reset into lp:nux/2.0

Proposed by Brandon Schaefer
Status: Merged
Approved by: Brandon Schaefer
Approved revision: 614
Merged at revision: 613
Proposed branch: lp:~brandontschaefer/nux/ibus-active-reset
Merge into: lp:nux/2.0
Diff against target: 63 lines (+7/-5)
1 file modified
Nux/InputMethodIBus.cpp (+7/-5)
To merge this branch: bzr merge lp:~brandontschaefer/nux/ibus-active-reset
Reviewer Review Type Date Requested Status
Jay Taoko (community) Approve
Thomi Richards (community) Approve
Review via email: mp+102774@code.launchpad.net

Commit message

ime_active was not getting reset when the ime context was getting destroyed, that is fixed.

Description of the change

=== Problem ===
TextEntry::ime_active was not getting reset when ibus context gets destroyed. This would leave the bool ime_active in the incorrect state.

=== Fix ===
Reset the value the context gets created.

=== Test ===
This was caught by a new ibus ap test, so that test will cover this.

To post a comment you must log in.
Revision history for this message
Thomi Richards (thomir-deactivatedaccount) wrote :

+1 from me.

review: Approve
Revision history for this message
Jay Taoko (jaytaoko) wrote :

+1

review: Approve
Revision history for this message
Unity Merger (unity-merger) wrote :

No commit message specified.

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-04-02 19:57:53 +0000
3+++ Nux/InputMethodIBus.cpp 2012-04-19 23:00:26 +0000
4@@ -29,7 +29,7 @@
5 {
6 IBusBus* IBusIMEContext::bus_ = NULL;
7
8- IBusIMEContext::IBusIMEContext(TextEntry* text_entry)
9+ IBusIMEContext::IBusIMEContext(TextEntry* text_entry)
10 : text_entry_(text_entry),
11 context_(NULL),
12 is_focused_(false)
13@@ -139,6 +139,8 @@
14 return;
15 }
16
17+ text_entry_->ime_active_ = false;
18+
19 // connect input context signals
20 g_signal_connect(context_, "commit-text", G_CALLBACK(OnCommitText_), this);
21 g_signal_connect(context_, "update-preedit-text", G_CALLBACK(OnUpdatePreeditText_), this);
22@@ -165,6 +167,7 @@
23 if (!context_)
24 return;
25
26+ text_entry_->ResetPreedit();
27 ibus_proxy_destroy(reinterpret_cast<IBusProxy *>(context_));
28
29 nuxAssert(!context_);
30@@ -174,7 +177,7 @@
31 {
32 nux::Rect strong, weak;
33 text_entry_->GetCursorRects(&strong, &weak);
34-
35+
36 // Get the position of the TextEntry in the Window.
37 nux::Geometry geo = text_entry_->GetAbsoluteGeometry();
38
39@@ -215,7 +218,7 @@
40 nuxAssert(context_ == context);
41
42 text_entry_->DeleteSelection();
43-
44+
45 if (text->text)
46 {
47 int cursor = text_entry_->cursor_;
48@@ -320,7 +323,6 @@
49 {
50 //nuxDebugMsg("***IBusIMEContext::OnDisable***");
51 nuxAssert(context_ == context);
52-
53 text_entry_->ime_active_ = false;
54 text_entry_->ResetPreedit();
55 text_entry_->QueueRefresh (true, true);
56@@ -348,7 +350,7 @@
57
58 if (error != NULL)
59 {
60- g_warning ("Process Key Event failed: %s.", error->message);
61+ g_warning ("Process Key Event failed: %s.", error->message);
62 g_error_free (error);
63 }
64

Subscribers

People subscribed via source and target branches

to all changes: