[polari] joinDialog: Don't close when saving new account
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] joinDialog: Don't close when saving new account
- Date: Fri, 23 Oct 2015 14:56:15 +0000 (UTC)
commit 84ff117eb0666c9e437d118b66007b390f925cf7
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Oct 16 16:15:34 2015 +0200
joinDialog: Don't close when saving new account
The whole point of allowing users to create new connections directly
from the join dialog was to ease the task of joining a room; closing
the dialog on account creation and requiring the user to open the
dialog again clearly defeats that purpose.
https://bugzilla.gnome.org/show_bug.cgi?id=756702
src/joinDialog.js | 3 +++
src/mainWindow.js | 8 --------
src/messageDialog.js | 1 +
3 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/src/joinDialog.js b/src/joinDialog.js
index e07c1b2..33865cd 100644
--- a/src/joinDialog.js
+++ b/src/joinDialog.js
@@ -50,6 +50,8 @@ const JoinDialog = new Lang.Class({
function(w, response) {
if (response == Gtk.ResponseType.OK)
this._onConfirmClicked();
+ else
+ this.widget.destroy();
}));
this.widget.connect('destroy', Lang.bind(this,
function() {
@@ -139,6 +141,7 @@ const JoinDialog = new Lang.Class({
_onConfirmClicked: function() {
if (this._page == DialogPage.MAIN) {
this._joinRoom();
+ this._widget.destroy();
} else {
this._details.save();
this._setPage(DialogPage.MAIN);
diff --git a/src/mainWindow.js b/src/mainWindow.js
index 4a77b0c..c3f3c40 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -212,20 +212,12 @@ const MainWindow = new Lang.Class({
let dialog = new JoinDialog.JoinDialog();
dialog.widget.transient_for = this.window;
dialog.widget.show();
- dialog.widget.connect('response',
- function(widget) {
- widget.destroy();
- });
},
showMessageUserDialog: function() {
let dialog = new MessageDialog.MessageDialog();
dialog.widget.transient_for = this.window;
dialog.widget.show();
- dialog.widget.connect('response',
- function(widget) {
- widget.destroy();
- });
},
_updateUserListLabel: function() {
diff --git a/src/messageDialog.js b/src/messageDialog.js
index 9b974b4..cfde0bb 100644
--- a/src/messageDialog.js
+++ b/src/messageDialog.js
@@ -52,6 +52,7 @@ const MessageDialog = new Lang.Class({
function(w, response) {
if (response == Gtk.ResponseType.OK)
this._onMessageClicked();
+ this.widget.destroy();
}));
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]