Browse files

Simplify reset().

  • Loading branch information...
1 parent 2e8f1d2 commit 1e0422e3b276b4614b2a8f49472630bada1066a2 @ueno committed Aug 23, 2012
Showing with 4 additions and 11 deletions.
  1. +4 −11 src/engine.vala
View
15 src/engine.vala
@@ -450,7 +450,6 @@ class SkkEngine : IBus.Engine {
public override void enable () {
context.reset ();
- context.clear_output ();
// request to use surrounding text feature
get_surrounding_text (null, null, null);
@@ -464,21 +463,15 @@ class SkkEngine : IBus.Engine {
public override void reset () {
context.reset ();
- var output = context.poll_output ();
- if (output.length > 0) {
- var text = new IBus.Text.from_string (output);
- commit_text (text);
- }
- update_preedit ();
- update_candidates ();
- update_input_mode ();
+ var empty_text = new IBus.Text.from_static_string ("");
+ update_preedit_text (empty_text,
+ 0,
+ false);
base.reset ();
}
public override void focus_in () {
register_properties (prop_list);
- update_preedit ();
- update_candidates ();
update_input_mode ();
base.focus_in ();
}

0 comments on commit 1e0422e

Please sign in to comment.