Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't register candidates signal handlers more than once.

  • Loading branch information...
commit b54c3258d653d4a93039ad479c8251f9ac2a2596 1 parent acbad04
@ueno authored
Showing with 8 additions and 8 deletions.
  1. +8 −8 src/engine.vala
View
16 src/engine.vala
@@ -134,6 +134,12 @@ class SkkEngine : IBus.Engine {
context.notify["input-mode"].connect ((s, p) => {
update_input_mode ();
});
+ context.candidates.populated.connect (() => {
+ populate_lookup_table ();
+ });
+ context.candidates.notify["cursor-pos"].connect (() => {
+ set_lookup_table_cursor_pos ();
+ });
update_candidates ();
update_input_mode ();
context.retrieve_surrounding_text.connect (_retrieve_surrounding_text);
@@ -181,8 +187,8 @@ class SkkEngine : IBus.Engine {
update_auxiliary_text (empty_text, false);
}
} else {
- update_lookup_table (lookup_table, false);
- update_auxiliary_text (empty_text, false);
+ hide_lookup_table ();
+ hide_auxiliary_text ();
}
}
@@ -203,12 +209,6 @@ class SkkEngine : IBus.Engine {
}
void update_candidates () {
- context.candidates.populated.connect (() => {
- populate_lookup_table ();
- });
- context.candidates.notify["cursor-pos"].connect (() => {
- set_lookup_table_cursor_pos ();
- });
populate_lookup_table ();
set_lookup_table_cursor_pos ();
}
Please sign in to comment.
Something went wrong with that request. Please try again.