[polari/gnome-3-32] mainWindow: Disconnect accountsMonitor signal
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari/gnome-3-32] mainWindow: Disconnect accountsMonitor signal
- Date: Sun, 12 May 2019 20:46:49 +0000 (UTC)
commit 808f147a229cf0ee061929ee2470345469078811
Author: Florian Müllner <fmuellner gnome org>
Date: Sun May 12 16:00:31 2019 +0000
mainWindow: Disconnect accountsMonitor signal
When set up to run in the background, the accountsMonitor will outlive
the window, so we need to disconnect any signals to avoid warnings.
https://gitlab.gnome.org/GNOME/polari/merge_requests/120
src/mainWindow.js | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/mainWindow.js b/src/mainWindow.js
index 3229589..c2f97f5 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -157,8 +157,8 @@ var MainWindow = GObject.registerClass({
});
this._accountsMonitor = AccountsMonitor.getDefault();
- this._accountsMonitor.connect('accounts-changed',
- this._onAccountsChanged.bind(this));
+ this._accountsChangedId = this._accountsMonitor.connect(
+ 'accounts-changed', this._onAccountsChanged.bind(this));
this._onAccountsChanged(this._accountsMonitor);
this._roomManager = RoomManager.getDefault();
@@ -245,6 +245,8 @@ var MainWindow = GObject.registerClass({
this.active_room = null;
+ this._accountsMonitor.disconnect(this._accountsChangedId);
+
this._roomManager.disconnect(this._roomsLoadedId);
this._roomManager.disconnect(this._roomRemovedId);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]