summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIzhar Firdaus <izhar@inigo-tech.com>2011-04-19 11:50:14 +0800
committerIzhar Firdaus <izhar@inigo-tech.com>2011-04-19 11:50:14 +0800
commitdad53d605330cbf0485e209da29201420ab4cde1 (patch)
tree05d91a9273e5f14d0954caae9ea8f3bea6e72cbf
parent0ccd7370d41c25c1ad221ce61c86a320a98ed9d0 (diff)
downloadhack-patches-dad53d605330cbf0485e209da29201420ab4cde1.tar.gz
hack-patches-dad53d605330cbf0485e209da29201420ab4cde1.tar.xz
hack-patches-dad53d605330cbf0485e209da29201420ab4cde1.zip
* bring back notification when window open, as its not quite make sense
* some fixes in onStatusChange
-rw-r--r--gnomeshell@pidgin.im/extension.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/gnomeshell@pidgin.im/extension.js b/gnomeshell@pidgin.im/extension.js
index 778b3aa..398570e 100644
--- a/gnomeshell@pidgin.im/extension.js
+++ b/gnomeshell@pidgin.im/extension.js
@@ -132,9 +132,7 @@ Source.prototype = {
this._messageSentId = proxy.connect('SentImMsg', Lang.bind(this, this._onSentImMessage));
this._messageReceivedId = proxy.connect('ReceivedImMsg', Lang.bind(this, this._onReceivedImMessage));
- if (this._initialMessage) {
- this.notify(this._notification);
- }
+ this.notify(this._notification);
},
destroy: function () {
@@ -206,9 +204,10 @@ Source.prototype = {
let old_status = proxy.PurpleStatusGetIdSync(old_status_id);
let new_status = proxy.PurpleStatusGetIdSync(new_status_id);
- if (this._presence == old_status) return;
-
+ if (this._presence == new_status) return;
this._presence = new_status;
+
+ if (new_status == 'dnd') new_status = 'busy';
this._notification.appendPresence('<i>' + this.title + ' is now ' + new_status + '</i>', false);
},