[gnome-shell/wip/carlosg/im-full-reset: 1/5] ibusManager: Allow passing callbacks after enabling/disabling completion




commit a0c0f56d78dcb0f7f34057fdea89e145b1beaceb
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Oct 17 13:29:10 2022 +0200

    ibusManager: Allow passing callbacks after enabling/disabling completion
    
    Since this is an async operation, we may want to let some things happen
    after the engine is changed due to completion being enabled/disabled.

 js/misc/ibusManager.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/js/misc/ibusManager.js b/js/misc/ibusManager.js
index ebab179a2b..5ba7e636d0 100644
--- a/js/misc/ibusManager.js
+++ b/js/misc/ibusManager.js
@@ -337,7 +337,7 @@ var IBusManager = class extends Signals.EventEmitter {
                 });
     }
 
-    setCompletionEnabled(enabled) {
+    setCompletionEnabled(enabled, callback) {
         /* Needs typing-booster available */
         if (!this._engines.has(TYPING_BOOSTER_ENGINE))
             return false;
@@ -373,12 +373,12 @@ var IBusManager = class extends Signals.EventEmitter {
 
             settings.reset(KEY_INLINECOMPLETION);
             settings.set_string(KEY_INPUTMETHOD, 'NoIME');
-            this.setEngine(TYPING_BOOSTER_ENGINE);
+            this.setEngine(TYPING_BOOSTER_ENGINE, callback);
         } else if (this._preOskState) {
             const {engine, emoji, langs, completion, inputMethod} =
                   this._preOskState;
             this._preOskState = null;
-            this.setEngine(engine);
+            this.setEngine(engine, callback);
             settings.set_value(KEY_EMOJIPREDICTIONS, emoji);
             settings.set_value(KEY_DICTIONARY, langs);
             settings.set_value(KEY_INLINECOMPLETION, completion);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]