[gnome-shell] Group chat sources on the left in the message tray
- From: Marina Zhurakhinskaya <marinaz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] Group chat sources on the left in the message tray
- Date: Tue, 1 Feb 2011 20:32:05 +0000 (UTC)
commit 6c55ca59b03b6e48a69f16e9779417eee2d161d7
Author: Hellyna Ng <hellyna hellyna com>
Date: Fri Dec 31 05:09:56 2010 +0800
Group chat sources on the left in the message tray
This will make it easier for users to get back to their chats.
https://bugzilla.gnome.org/show_bug.cgi?id=617234
js/ui/messageTray.js | 13 ++++++++++++-
js/ui/telepathyClient.js | 2 ++
2 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 1812983..aa1bdd1 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -806,6 +806,7 @@ Source.prototype = {
this._iconBin = new St.Bin({ width: this.ICON_SIZE,
height: this.ICON_SIZE });
this.isTransient = false;
+ this.isChat = false;
},
setTransient: function(isTransient) {
@@ -1025,6 +1026,7 @@ MessageTray.prototype = {
// added to the summary without a notification being shown.
this._newSummaryItems = [];
this._longestSummaryItem = null;
+ this._chatSummaryItemsCount = 0;
},
_setSizePosition: function() {
@@ -1058,7 +1060,12 @@ MessageTray.prototype = {
let summaryItem = new SummaryItem(source);
- this._summary.insert_actor(summaryItem.actor, 0);
+ if (source.isChat) {
+ this._summary.insert_actor(summaryItem.actor, 0);
+ this._chatSummaryItemsCount++;
+ } else {
+ this._summary.insert_actor(summaryItem.actor, this._chatSummaryItemsCount);
+ }
let titleWidth = summaryItem.getTitleNaturalWidth();
if (titleWidth > this._summaryItemTitleWidth) {
@@ -1123,6 +1130,10 @@ MessageTray.prototype = {
this._newSummaryItems.splice(newSummaryItemsIndex, 1);
this._summaryItems.splice(index, 1);
+
+ if (source.isChat)
+ this._chatSummaryItemsCount--;
+
if (this._longestSummaryItem.source == source) {
let newTitleWidth = 0;
this._longestSummaryItem = null;
diff --git a/js/ui/telepathyClient.js b/js/ui/telepathyClient.js
index ed8feae..8dcbfed 100644
--- a/js/ui/telepathyClient.js
+++ b/js/ui/telepathyClient.js
@@ -455,6 +455,8 @@ Source.prototype = {
_init: function(accountPath, connPath, channelPath, targetHandle, targetHandleType, targetId) {
MessageTray.Source.prototype._init.call(this, targetId);
+ this.isChat = true;
+
this._accountPath = accountPath;
let connName = Telepathy.pathToName(connPath);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]