[polari/wip/fmuellner/combined-gsoc: 79/136] cleaned the code a bit and fixed popover translatable labels



commit fd07d2441c05eff2fed4decd7dc635bf6cb494db
Author: raresv <rares visalom gmail com>
Date:   Sun Jul 17 16:34:24 2016 +0300

    cleaned the code a bit and fixed popover translatable labels

 src/userList.js    |    8 ++++----
 src/userTracker.js |    2 --
 2 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/userList.js b/src/userList.js
index 4f918f0..777aa9d 100644
--- a/src/userList.js
+++ b/src/userList.js
@@ -321,7 +321,7 @@ const UserDetails = new Lang.Class({
 
         if (this._user == this._user.connection.self_contact) {
             this._messageButton.visible = false;
-            this._messageButton.sensitive = true; //TODO: does this even make sense?
+            this._messageButton.sensitive = true;
         } else {
             this._messageButton.visible = true;
             this._messageButton.sensitive = true;
@@ -400,12 +400,12 @@ const UserPopover = new Lang.Class({
 
         let labelStatus = "";
         if (!bestMatchingContact)
-            labelStatus = "<small>Offline</small>";
+            labelStatus = '<small>' + _("Offline") + '</small>';
         else
             if (this._userTracker.getNickRoomStatus(this._nickname, this._room) == 
Tp.ConnectionPresenceType.AVAILABLE)
-                labelStatus = "<small>Online</small>";
+                labelStatus = '<small>' + _("Online") + '</small>';
             else
-                labelStatus = "<small>Available in another room.</small>";
+                labelStatus = '<small>' + _("Available in another room.") + '</small>';
 
         this._statusLabel.set_label(labelStatus);
 
diff --git a/src/userTracker.js b/src/userTracker.js
index ce49194..a38819b 100644
--- a/src/userTracker.js
+++ b/src/userTracker.js
@@ -371,8 +371,6 @@ const UserTracker = new Lang.Class({
     },
 
     unwatchUser: function(room, handlerID) {
-        /*TODO: it wouldn't make sense to call _ensure() here, right?*/
-
         /*TODO: rewrite into a single conditional?*/
         if (!this._roomMapping)
             return;


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