[polari/wip/fmuellner/bg-app: 2/6] telepathyClient: Hold application while running



commit ccacdcc372f0b8b1cafa4be5a91a23a8a7b8b491
Author: Florian Müllner <fmuellner gnome org>
Date:   Sat Aug 6 05:26:55 2016 +0200

    telepathyClient: Hold application while running
    
    The application runtime is currently tied to having a window, however it
    can be useful to have only the telepathy client running in the background.
    In order to support this, hold the application while the client is running.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=770749

 src/telepathyClient.js |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/telepathyClient.js b/src/telepathyClient.js
index 5a9d504..9b0c89c 100644
--- a/src/telepathyClient.js
+++ b/src/telepathyClient.js
@@ -119,7 +119,9 @@ const TelepathyClient = new Lang.Class({
         this._app.connect('prepare-shutdown', () => {
             [...this._pendingRequests.values()].forEach(r => { r.cancel(); });
             [...this._pendingBotPasswords.keys()].forEach(a => { this._discardIdentifyPassword(a); });
+            this._app.release();
         });
+        this._app.hold();
 
         this._pendingBotPasswords = new Map();
         this._pendingRequests = new Map();


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