[polari/gnome-3-32] roomList: Remove unnecessary signal disconnection



commit c864718c5d570c34dd2904570679eba01d500e0f
Author: Florian Müllner <fmuellner gnome org>
Date:   Sat Apr 20 14:08:22 2019 +0200

    roomList: Remove unnecessary signal disconnection
    
    The popover is destroyed with its :relative-to widget, so
    no need to disconnect signals explicitly.
    
    https://gitlab.gnome.org/GNOME/polari/merge_requests/121

 src/roomList.js | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/src/roomList.js b/src/roomList.js
index bdba7ee..77ad504 100644
--- a/src/roomList.js
+++ b/src/roomList.js
@@ -33,7 +33,6 @@ var RoomRow = GObject.registerClass({
         this._room = room;
         this._popover = null;
 
-        this._popoverVisibleChangedId = 0;
         this._connectingTimeoutId = 0;
 
         this._icon.gicon = room.icon;
@@ -59,10 +58,6 @@ var RoomRow = GObject.registerClass({
         }
 
         this.connect('destroy', () => {
-            if (this._popoverVisibleChangedId)
-                this._popover.disconnect(this._popoverVisibleChangedId);
-            this._popoverVisibleChangedId = 0;
-
             room.disconnect(channelChangedId);
             this._channelSignals.forEach(id => {
                 room.channel.disconnect(id);
@@ -194,9 +189,8 @@ var RoomRow = GObject.registerClass({
                         `app.leave-room(("${this._room.id}", ""))`);
 
             this._popover = Gtk.Popover.new_from_model(this, menu);
-            this._popoverVisibleChangedId =
-                this._popover.connect('notify::visible',
-                                      _onPopoverVisibleChanged);
+            this._popover.connect('notify::visible',
+                                   _onPopoverVisibleChanged);
             this._popover.position = Gtk.PositionType.BOTTOM;
         }
         this._popover.show();


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