[polari/wip/raresv/popoverRebasedOnTracker] fixed minor things, patches now work



commit 8d01d92b01ad886166d26a640ee425d5cd334de3
Author: raresv <rares visalom gmail com>
Date:   Wed Jul 20 17:21:49 2016 +0300

    fixed minor things, patches now work

 src/chatView.js    |   11 +----------
 src/userList.js    |    5 +----
 src/userTracker.js |   14 ++++----------
 3 files changed, 6 insertions(+), 24 deletions(-)
---
diff --git a/src/chatView.js b/src/chatView.js
index 8056d3e..a4817e2 100644
--- a/src/chatView.js
+++ b/src/chatView.js
@@ -776,15 +776,6 @@ const ChatView = new Lang.Class({
         return NICKTAG_PREFIX + Polari.util_get_basenick(nick);
     },
 
-    _onNickStatusChanged: function(tracker, nickName, status) {
-        let nickTag = this._lookupTag(this._getNickTagName(nickName));
-
-        if (!nickTag)
-            return;
-
-        this._updateNickTag(nickTag, status);
-    },
-
     _onChannelChanged: function() {
         if (this._channel == this._room.channel)
             return;
@@ -1185,7 +1176,7 @@ const ChatView = new Lang.Class({
                     nickTag = this._createNickTag(nickTagName);
                     buffer.get_tag_table().add(nickTag);
 
-                    let status = this._userTracker.getNickStatus(message.nick));
+                    let status = this._userTracker.getNickStatus(message.nick);
                     this._updateNickTag(nickTag, status);
                 }
                 tags.push(nickTag);
diff --git a/src/userList.js b/src/userList.js
index 1b50f7a..649f865 100644
--- a/src/userList.js
+++ b/src/userList.js
@@ -333,10 +333,7 @@ const UserPopover = new Lang.Class({
     Name: 'UserPopover',
     Extends: Gtk.Popover,
     Template: 'resource:///org/gnome/Polari/ui/user-popover.ui',
-    InternalChildren: ['userPopoverVBox',
-                       'userPopoverHeaderHBox',
-                       'userPopoverInfoVBox',
-                       'nickLabel',
+    InternalChildren: ['nickLabel',
                        'statusLabel',
                        'notifyButton',
                        'userDetails'],
diff --git a/src/userTracker.js b/src/userTracker.js
index a65c73e..34fc461 100644
--- a/src/userTracker.js
+++ b/src/userTracker.js
@@ -75,7 +75,7 @@ const UserTracker = new Lang.Class({
         this.parent();
 
         /* not sure what "reference" in the name refers to, but it's weird
-         * to have that as a property if it's just used in one place 
+         * to have that as a property if it's just used in one place
          * somewhere else */
         this._referenceRoomSignals = [
             { name: 'notify::channel',
@@ -117,12 +117,6 @@ const UserTracker = new Lang.Class({
         this._handlerCounter = 0;
         this._app = Gio.Application.get_default();
 
-        /* Why would we need this? It doesn't appear to be used currently */
-        this._userStatusMonitor = getUserStatusMonitor();
-
-        /* Unused as well */
-        this._watchlist = [];
-
         this._chatroomManager = ChatroomManager.getDefault();
         this._chatroomManager.connect('room-added', Lang.bind(this, this._onRoomAdded));
         this._chatroomManager.connect('room-removed', Lang.bind(this, this._onRoomRemoved));
@@ -219,7 +213,7 @@ const UserTracker = new Lang.Class({
 
     _runHandlers: function(room, member, status) {
         let baseNick = Polari.util_get_basenick(member.alias);
-        for ([id, info] of this._roomMapping.get(room)._contactMapping)
+        for ([id, info] of this._roomMapping.get(room)._handlerMapping)
             if (!info.nickName || info.nickName == baseNick)
                 info.handler(member.alias, status);
     },
@@ -334,7 +328,7 @@ const UserTracker = new Lang.Class({
         this._ensureRoomMappingForRoom(room);
 
         this._roomMapping.get(room)._handlerMapping.set(this._handlerCounter, {
-            nickName: Polari.util_get_basenick(nick),
+            nickName: nick ? Polari.util_get_basenick(nick) : undefined,
             handler: callback
         });
 
@@ -401,6 +395,6 @@ const UserTracker = new Lang.Class({
             this._app.add_action(action);
         }
 
-        return notifyActionName;
+        return name;
     }
 });


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