[polari/gnome-3-26] initialSetup: Fix quit action
- From: Gitlab System User <gitlab src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari/gnome-3-26] initialSetup: Fix quit action
- Date: Mon, 23 Oct 2017 07:34:52 +0000 (UTC)
commit 0d9f30734ece9b2ec32374fd6dfb697fbd3206f9
Author: Florian Müllner <fmuellner gnome org>
Date: Sat Oct 21 20:14:14 2017 +0200
initialSetup: Fix quit action
We will currently always open the main application window after the
initial setup window has been closed. This behavior is correct if
the window was completed or dismissed, but not when the app itself
was quit - cancel continuing to the main window in that case to
get the expected behavior.
src/application.js | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/src/application.js b/src/application.js
index ad9ac66..6a7352b 100644
--- a/src/application.js
+++ b/src/application.js
@@ -42,6 +42,8 @@ var Application = new Lang.Class({
this._nickTrackData = new Map();
this._demons = [];
+ this._windowRemovedId = 0;
+
this.add_main_option('start-client', 0,
GLib.OptionFlags.NONE, GLib.OptionArg.NONE,
_("Start Telepathy client"), null);
@@ -285,8 +287,9 @@ var Application = new Lang.Class({
if (!this.active_window) {
if (this._needsInitialSetup()) {
let setupDialog = new InitialSetup.InitialSetupWindow({ application: this });
- let id = this.connect('window-removed', () => {
- this.disconnect(id);
+ this._windowRemovedId = this.connect('window-removed', () => {
+ this.disconnect(this._windowRemovedId);
+ this._windowRemovedId = 0;
this.activate();
});
} else {
@@ -776,6 +779,10 @@ var Application = new Lang.Class({
},
_onQuit: function() {
+ if (this._windowRemovedId)
+ this.disconnect(this._windowRemovedId);
+ this._windowRemovedId = 0;
+
this.get_windows().reverse().forEach(w => { w.destroy(); });
this.emit('prepare-shutdown');
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]