Open
Bug 297292
Opened 20 years ago
Updated 15 years ago
Need option to flash taskbar on any message on some channel
Categories
(Other Applications :: ChatZilla, enhancement)
Other Applications
ChatZilla
Tracking
(Not tracked)
NEW
People
(Reporter: eyalroz1, Assigned: rginda)
Details
Attachments
(1 file)
|
16.42 KB,
patch
|
Details | Diff | Splinter Review |
Often I want to be notified whenver anything is said on some specific channel, not necessarily to me (e.g. channel with very low activity); in mIRC this can be done with the "Options|IRC|Options|Flash On|Channel Message" . This feature, coupled configurable per-channel, would be extremely useful for me (and many others, I hope).
| Reporter | ||
Comment 1•20 years ago
|
||
And here's the code to do it (I'd post a patch but I don't know what to patch
against...)
in prefs.js, in function getChannelPrefManager():
- ["outputWindowURL", defer, "appearance.misc"]
+ ["outputWindowURL", defer, "appearance.misc"],
+ ["getAttentionOnMessage", false, "hidden"]
in static.js, in function
- if (client.prefs["notify.aggressive"])
+ if ( (client.prefs["notify.aggressive"]) ||
+ (o.channel && o.channel.prefs["getAttentionOnMessage"]) )
window.getAttention();
}
else
{
+ if (o.channel && o.channel.prefs["getAttentionOnMessage"])
+ window.getAttention();
rginda, _please_ say you'll add this to the code, it's a really trivial change...
Comment 2•20 years ago
|
||
(In reply to comment #1) > And here's the code to do it (I'd post a patch but I don't know what to patch > against...) > > in prefs.js, in function getChannelPrefManager(): > > - ["outputWindowURL", defer, "appearance.misc"] > + ["outputWindowURL", defer, "appearance.misc"], > + ["getAttentionOnMessage", false, "hidden"] To get this to work right, the prefs need to be added for the network and globally as well, and made deferable. > in static.js, in function in function what? > > - if (client.prefs["notify.aggressive"]) > + if ( (client.prefs["notify.aggressive"]) || > + (o.channel && o.channel.prefs["getAttentionOnMessage"]) ) > window.getAttention(); > } > else > { > + if (o.channel && o.channel.prefs["getAttentionOnMessage"]) > + window.getAttention(); > > > rginda, _please_ say you'll add this to the code, it's a really trivial change... You're adding preferences, by definition that's NOT a trivial change. I'd like to have this done using the message filtering system, if possible. You could then even specify more criteria as to when the window should or should not flash. This would also prevent the addition of preferences, which seems like a good idea to me. (Note that I'm not vetoing this change (as if I could), I'm just saying I think there are better ways to do this, if we want to do it at all)
| Reporter | ||
Comment 3•20 years ago
|
||
(In reply to comment #2) > in function what? Oh, sorry, in function __display() > You're adding preferences, by definition that's NOT a trivial change. Well, no functions are added, and a total of -2 +5 lines of code are changed (add another two or three or four for deferring to network and global prefs, and perhaps for addition into the GUI), so it's certainly not much... > I'd like to have this done using the message filtering system, if possible. > You could then even specify more criteria as to when the window > should or should not flash. This would also prevent the addition of > preferences, which seems like a good idea to me. As this is the first time I have ever even looked at the chatzilla code, I have no idea what you're talking about. What part of the code is the 'message filtering system'? Where can I find information about what it's supposed to do and what it does? (other than reading the code of course)?
Comment 4•20 years ago
|
||
(In reply to comment #3) > (In reply to comment #2) > > I'd like to have this done using the message filtering system, if possible. > > You could then even specify more criteria as to when the window > > should or should not flash. This would also prevent the addition of > > preferences, which seems like a good idea to me. > > As this is the first time I have ever even looked at the chatzilla code, I have > no idea what you're talking about. What part of the code is the 'message > filtering system'? Where can I find information about what it's supposed to do > and what it does? (other than reading the code of course)? Not even reading the code would help. See bug 252848 - this is yet to be implemented. As for GUI inclusion of those preferences, that would happen automatically. Our preference window code rocks in that respect (kudos to Silver).
Comment 5•20 years ago
|
||
(In reply to comment #1) Bad way to do it. The events system (though labeled and called sounds, which should change at some point) can easily handle this if you add a new type to the possible options.
Comment 6•20 years ago
|
||
Please try and use the bug fields properly, too. ;)
Severity: normal → enhancement
Summary: [RFE] need option to flash taskbar on any message on some channel → Need option to flash taskbar on any message on some channel
| Reporter | ||
Comment 7•20 years ago
|
||
(In reply to comment #2) Making deferable prefs doesn't work for some reason. I have: ["getAttentionOnChannelMessage", false, "global"] in the client prefs, ["getAttentionOnChannelMessage", defer, "getAttentionOnChannelMessage"] in the network prefs and ["getAttentionOnMessage", defer, "getAttentionOnChannelMessage"] in the channel prefs. And when I check o.channel.prefs["getAttentionOnMessage"] it seems to be undefined. No Javascript warnings/errors either. (In reply to comment #5) Uh, I don't mean to sound disrespectful, but I don't think the following constitutes an event system... function playSound(file) { if (!client.sound || !client.prefs["sound.enabled"] || !file) return; if (file == "beep") client.sound.beep(); else try { var uri = client.iosvc.newURI(file, null, null); client.sound.play(uri); } catch (ex) {} }
Comment 8•20 years ago
|
||
(In reply to comment #7) The prefs don't work because you didn't add it to the channel list. And you seem to be ignorant to most of ChatZilla's code, as there is somewhat more than those lines in the sound/event system.
| Reporter | ||
Updated•19 years ago
|
OS: Windows XP → All
Updated•15 years ago
|
No longer depends on: 252848
QA Contact: samuel → chatzilla
Hardware: x86 → All
Version: unspecified → Trunk
Comment 9•15 years ago
|
||
This patch was made a while back when I was bored; it's not a finished thing, but I'd like comments on it now if that's alright. Basically it renames the sound.* prefs to event.* and migrates them, including the aggressive notify pref into the new events.
You need to log in
before you can comment on or make changes to this bug.
Description
•