diff options
| author | Peng Huang <shawn.p.huang@gmail.com> | 2010-01-26 21:27:16 +0800 |
|---|---|---|
| committer | Peng Huang <shawn.p.huang@gmail.com> | 2010-01-26 21:27:16 +0800 |
| commit | 9db3894d2b02e0e7e28955bf8564dcf5e1240624 (patch) | |
| tree | 234b067f2b08e66024978bbf82e788e86d24f765 /src/Main.cc | |
| parent | 7c8dc0f92d59d0657b4edf42c03410e81bc1a8cd (diff) | |
| download | ibus-libpinyin-9db3894d2b02e0e7e28955bf8564dcf5e1240624.tar.gz ibus-libpinyin-9db3894d2b02e0e7e28955bf8564dcf5e1240624.tar.xz ibus-libpinyin-9db3894d2b02e0e7e28955bf8564dcf5e1240624.zip | |
Exit if can not connect to ibus
Diffstat (limited to 'src/Main.cc')
| -rw-r--r-- | src/Main.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Main.cc b/src/Main.cc index a93030a..7d7c472 100644 --- a/src/Main.cc +++ b/src/Main.cc @@ -42,6 +42,12 @@ start_component (void) ibus_init (); Bus bus; + + if (!bus.isConnected ()) { + g_warning ("Can not connect to ibus"); + exit (0); + } + Config config (bus); g_signal_connect (bus, "disconnected", G_CALLBACK (ibus_disconnected_cb), NULL); |
