[polari/wip/fmuellner/combined-gsoc: 73/137] Popovers are now created on demand, not when the tag is created
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari/wip/fmuellner/combined-gsoc: 73/137] Popovers are now created on demand, not when the tag is created
- Date: Thu, 28 Jul 2016 16:21:34 +0000 (UTC)
commit 076bee9d9678d687243b95ae1234396a7a28ff5b
Author: raresv <rares visalom gmail com>
Date: Thu Jul 14 22:58:57 2016 +0300
Popovers are now created on demand, not when the tag is created
src/chatView.js | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/chatView.js b/src/chatView.js
index 086c17f..bc7bf89 100644
--- a/src/chatView.js
+++ b/src/chatView.js
@@ -1283,7 +1283,7 @@ const ChatView = new Lang.Class({
_createNickTag: function(name) {
let tag = new ButtonTag({ name: name });
- tag._popover = new UserList.UserPopover({ relative_to: this._view, margin: 0, room: this._room,
userTracker: this._userStatusMonitor.getUserTrackerForAccount(this._room.account), width_request: 280 });
+ //tag._popover = new UserList.UserPopover({ relative_to: this._view, margin: 0, room: this._room,
userTracker: this._userStatusMonitor.getUserTrackerForAccount(this._room.account), width_request: 280 });
tag.connect('clicked', Lang.bind(this, this._onNickTagClicked));
return tag;
},
@@ -1315,6 +1315,9 @@ const ChatView = new Lang.Class({
//TODO: special chars?
let actualNickName = view.get_buffer().get_slice(start, end, false);
+ if (!tag._popover)
+ tag._popover = new UserList.UserPopover({ relative_to: this._view, margin: 0, room: this._room,
userTracker: this._userStatusMonitor.getUserTrackerForAccount(this._room.account), width_request: 280 });
+
tag._popover.nickname = actualNickName;
tag._popover.pointing_to = rect1;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]