[polari/wip/raresv/popoverRebasedOnTracker] Popovers are now created on demand, not when the tag is created
- From: Rares Visalom <raresvisalom src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari/wip/raresv/popoverRebasedOnTracker] Popovers are now created on demand, not when the tag is created
- Date: Sat, 16 Jul 2016 01:03:41 +0000 (UTC)
commit 0a3e746c008fb0a1256cbe6a28e268a1a927687e
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 ff4b419..50c9c5a 100644
--- a/src/chatView.js
+++ b/src/chatView.js
@@ -1244,7 +1244,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;
},
@@ -1276,6 +1276,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]