[Pkg-mozext-commits] [firetray] 354/399: refactor startIconBlinkingMaybe()
David Prévot
taffit at alioth.debian.org
Tue Oct 29 18:24:13 UTC 2013
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch dfsg-clean
in repository firetray.
commit 53e3421a51cf6c5250f11e2fb5fb1a31eed0708c
Author: foudfou <foudil.newbie+git at gmail.com>
Date: Thu Mar 28 16:22:28 2013 +0100
refactor startIconBlinkingMaybe()
---
src/modules/FiretrayChat.jsm | 27 +++++++++++++++++----------
1 file changed, 17 insertions(+), 10 deletions(-)
diff --git a/src/modules/FiretrayChat.jsm b/src/modules/FiretrayChat.jsm
index b6c29a4..71221d2 100644
--- a/src/modules/FiretrayChat.jsm
+++ b/src/modules/FiretrayChat.jsm
@@ -60,14 +60,7 @@ firetray.Chat = {
case "new-directed-incoming-message": // when PM or cited in channel
let conv = subject.QueryInterface(Ci.prplIMessage).conversation;
log.debug("conversation name="+conv.name); // normalizedName shouldn't be necessary
-
- let convIsCurrentlyShown = this.isConvCurrentlyShown(conv);
- log.debug("convIsCurrentlyShown="+convIsCurrentlyShown);
- if (!convIsCurrentlyShown) { // don't blink when conv tab already on top
- this.acknowledgeOnFocus.must = true;
- this.acknowledgeOnFocus.conv = conv;
- firetray.ChatStatusIcon.setIconBlinking(true);
- }
+ this.startIconBlinkingMaybe(conv);
break;
case "unread-im-count-changed":
@@ -87,8 +80,21 @@ firetray.Chat = {
}
},
- stopIconBlinkingMaybe: function(xid) {
- log.debug("acknowledgeOnFocus.must="+this.acknowledgeOnFocus.must);
+ // rename to setUrgency(bool), and possibly handle blinking ourselves
+ // (gtk_status_icon_set_blinking deprecated)
+ startIconBlinkingMaybe: function(conv) {
+ let convIsCurrentlyShown = this.isConvCurrentlyShown(conv);
+ log.debug("convIsCurrentlyShown="+convIsCurrentlyShown);
+ if (!convIsCurrentlyShown) { // don't blink when conv tab already on top
+ this.acknowledgeOnFocus.must = true;
+ this.acknowledgeOnFocus.conv = conv;
+ firetray.ChatStatusIcon.setIconBlinking(true);
+ // TODO: + gtk_window_set_urgency_hint(true)
+ }
+ },
+
+ stopIconBlinkingMaybe: function(xid) { // xid optional
+ log.error("acknowledgeOnFocus.must="+this.acknowledgeOnFocus.must);
if (!this.acknowledgeOnFocus.must) return;
let convIsCurrentlyShown = this.isConvCurrentlyShown(
@@ -96,6 +102,7 @@ firetray.Chat = {
log.debug("convIsCurrentlyShown="+convIsCurrentlyShown);
if (this.acknowledgeOnFocus.must && convIsCurrentlyShown) {
+ // TODO: + gtk_window_set_urgency_hint(false)
firetray.ChatStatusIcon.setIconBlinking(false);
this.acknowledgeOnFocus.must = false;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firetray.git
More information about the Pkg-mozext-commits
mailing list