[polari] app: Hold application while showing connection dialog



commit c51786160a5e644bc6fe08572851adb0d1bad887
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue Mar 3 11:10:28 2015 +0100

    app: Hold application while showing connection dialog
    
    The connection dialog may now be shown without the main window, so
    make sure the application is kept alive while the dialog is showing.

 src/application.js |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/application.js b/src/application.js
index 27fde78..b5425f5 100644
--- a/src/application.js
+++ b/src/application.js
@@ -378,12 +378,14 @@ const Application = new Lang.Class({
             return;
         }
 
+        this.hold();
         this._connectionsDialog = new Connections.ConnectionsDialog();
         this._connectionsDialog.widget.show();
         this._connectionsDialog.widget.connect('response',
             Lang.bind(this, function(widget) {
                 widget.destroy();
                 this._connectionsDialog = null;
+                this.release();
             }));
     },
 


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