[gnome-characters] categoryList: Make IBus detection robuster
- From: Daiki Ueno <dueno src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-characters] categoryList: Make IBus detection robuster
- Date: Tue, 4 Jul 2017 13:13:30 +0000 (UTC)
commit a28eb5fec0c0eeca2d67616f10da2a22ab25ad1a
Author: Daiki Ueno <dueno src gnome org>
Date: Tue Jul 4 15:11:42 2017 +0200
categoryList: Make IBus detection robuster
src/categoryList.js | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/src/categoryList.js b/src/categoryList.js
index 6d9446e..4e186af 100644
--- a/src/categoryList.js
+++ b/src/categoryList.js
@@ -171,11 +171,14 @@ const CategoryListWidget = new Lang.Class({
ibus.init();
let bus = new ibus.Bus();
- bus.list_engines_async(-1,
- null,
- Lang.bind(this, function (bus, res) {
- this._finishListEngines(sources, bus, res);
- }));
+ if (bus.is_connected()) {
+ bus.list_engines_async(-1,
+ null,
+ Lang.bind(this, function (bus, res) {
+ this._finishListEngines(sources, bus, res);
+ }));
+ } else
+ this._finishBuildScriptList(sources);
},
_finishBuildScriptList: function(sources) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]