[polari] entryArea: Disconnect 'key-press-event' signal
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] entryArea: Disconnect 'key-press-event' signal
- Date: Thu, 3 Apr 2014 14:10:47 +0000 (UTC)
commit dd4b2b7a32c7eafade014cc86c7fa8aa3acdc160
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Mar 25 20:15:08 2014 +0100
entryArea: Disconnect 'key-press-event' signal
src/entryArea.js | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/entryArea.js b/src/entryArea.js
index db92216..ea02e45 100644
--- a/src/entryArea.js
+++ b/src/entryArea.js
@@ -45,9 +45,9 @@ const EntryArea = new Lang.Class({
this.widget.connect('notify::sensitive', Lang.bind(this, this._onSensitiveChanged));
this.widget.connect('realize', Lang.bind(this,
function() {
- let toplevel = this.widget.get_toplevel();
- toplevel.connect('key-press-event',
- Lang.bind(this, this._onKeyPressEvent));
+ this._toplevel = this.widget.get_toplevel();
+ this._keyPressId = this._toplevel.connect('key-press-event',
+ Lang.bind(this, this._onKeyPressEvent));
}));
this._nickEntry = new Gtk.Entry();
@@ -201,5 +201,8 @@ const EntryArea = new Lang.Class({
if (this._channelChangedId)
this._room.disconnect(this._channelChangedId);
this._channelChangedId = 0;
+ if (this._keyPressId)
+ this._toplevel.disconnect(this._keyPressId);
+ this._keyPressId = 0;
}
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]