aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hua <william.hua@canonical.com>2014-04-02 10:42:22 +1300
committerWilliam Hua <william.hua@canonical.com>2014-04-02 10:42:22 +1300
commit93ed04c203bdab3d831c1586b7d4222072002577 (patch)
treecb58049a289e56f28312a610c5ece2bb0945df44
parent8c6fd2e9daff0d486ab71c50413dadff6d1c12d8 (diff)
downloadayatana-indicator-keyboard-93ed04c203bdab3d831c1586b7d4222072002577.tar.gz
ayatana-indicator-keyboard-93ed04c203bdab3d831c1586b7d4222072002577.tar.bz2
ayatana-indicator-keyboard-93ed04c203bdab3d831c1586b7d4222072002577.zip
Update sources and indicator when IBus is ready.
-rw-r--r--lib/main.vala9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/main.vala b/lib/main.vala
index 55c46b02..a54cf904 100644
--- a/lib/main.vala
+++ b/lib/main.vala
@@ -127,6 +127,15 @@ public class Indicator.Keyboard.Service : Object {
if (ibus == null) {
IBus.init ();
ibus = new IBus.Bus ();
+ ((!) ibus).connected.connect (() => {
+ if (sources_menu != null) {
+ update_sources_menu ();
+ }
+
+ if (indicator_action != null) {
+ update_indicator_action ();
+ }
+ });
}
return (!) ibus;