From: Luke Schierer <lschiere@us...> - 2004-07-24 15:18:41
Update of /cvsroot/gaim/gaim/src/protocols/zephyr
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10105/src/protocols/zephyr
" When joining a jabber conference many jabber servers
send a recap of the last 20 or so messages. If you
have sounds enabled, this will result in either 20
sounds in row, or worse if mixing is available, a
horrible mix of 20 overlapping sounds. These recap
messages can be identifed be the presence of the
"jabber:x:delay". This patch identifies delayed
messages, passes that information through flags from
the prpl to the core, and then on to the gui. Detailed
Add GAIM_MESSAGE_DELAYED to GaimMessageFlags to
indicate a delayed message.
Change gtkconv.c to not play sounds when either
GAIM_MESSAGE_DELAYED or GAIM_MESSAGE_SYSTEM are set.
Add GaimConvChatFlags, parallel to GaimConvImFlags, to
pass flags from protocols to core. Currently contains
Change fourth arg of serv_got_chat_in() from "int
whisper" to "GaimConvChatFlags chatflags".
Change jabber prpl to set delayed flag when the
"jabber:x:delay" element is present. Change toc
protocol since it uses the whisper flag." --Nathan Fredrickson
Date: 2004-07-24 00:49
Sender: marv_sfAccepting Donations
Logged In: YES
I'm not sure I like naming the flags "DELAYED". I mean
that's okay inside jabber since that's what the jabber
protocol refers to it as, but for the the GAIM_*_DELAYED
flags, I think they should be named something else.
I thought about NOSOUND, but I decided that was wrong,
because the flag should say what kind of message it is, not
what to do with it, that's up to the UI to decide.
What's up with not playing sounds on GAIM_MESSAGE_SYSTEM?
This sounds unrelated to this. Are there times when we want
to play sounds on system messages?
Date: 2004-07-24 09:13
Logged In: YES
I purposely did not use a name that implied what the UI
should do with the flag. The only characteristic that makes
these messages unique is that they've been stored in the
server for some period of time and are not current. I'm
open to a better flag name than "DELAYED"... I thought about
"RECAP", but that seemed less generalized than "DELAYED".
As for not playing sounds on GAIM_MESSAGE_SYSTEM, that can
be removed if it's controversial. I think I slipped that
in since the setting of the topic was still playing a sound
every time you joined a jabber conference.
I think we can change the flag name ourselves if something else is better.
RCS file: /cvsroot/gaim/gaim/src/protocols/zephyr/zephyr.c,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -d -p -r1.106 -r1.107
--- zephyr.c 17 Jul 2004 18:11:12 -0000 1.106
+++ zephyr.c 24 Jul 2004 15:18:32 -0000 1.107
@@ -715,7 +715,7 @@ static void handle_message(ZNotice_t not
send_inst_utf8 = "malformed instance";
- serv_got_chat_in(zgc, zt2->id, send_inst_utf8, FALSE, buf3, time(NULL));
+ serv_got_chat_in(zgc, zt2->id, send_inst_utf8, 0, buf3, time(NULL));
gconv1 = gaim_find_conversation_with_account(zt2->name, zgc->account);
gcc = gaim_conversation_get_chat_data(gconv1);