comparison src/server.c @ 3521:f3981f94494a

[gaim-migrate @ 3594] Play the sounds even if we're queuing them up. This way at least we'll know you have a message waiting. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Mon, 16 Sep 2002 18:13:45 +0000
parents 6b0cb60162f4
children 82180bb28f1f
comparison
equal deleted inserted replaced
3520:0cf6fee378fc 3521:f3981f94494a
686 g_free(tmpmsg); 686 g_free(tmpmsg);
687 } else { 687 } else {
688 /* we're not away. this is easy. if the convo window doesn't exist, create and update 688 /* we're not away. this is easy. if the convo window doesn't exist, create and update
689 * it (if it does exist it was updated earlier), then play a sound indicating we've 689 * it (if it does exist it was updated earlier), then play a sound indicating we've
690 * received it and then display it. easy. */ 690 * received it and then display it. easy. */
691
692 if (new_conv && (sound_options & OPT_SOUND_FIRST_RCV))
693 play_sound(SND_FIRST_RECEIVE);
694 else if (cnv->makesound)
695 play_sound(SND_RECEIVE);
696
691 if (away_options & OPT_AWAY_QUEUE_UNREAD && !find_conversation(name)) { 697 if (away_options & OPT_AWAY_QUEUE_UNREAD && !find_conversation(name)) {
692 /* We're gonna queue it up and wait for the user to ask for it... probably 698 /* We're gonna queue it up and wait for the user to ask for it... probably
693 * by clicking the docklet or windows tray icon. */ 699 * by clicking the docklet or windows tray icon. */
694 struct queued_message *qm; 700 struct queued_message *qm;
695 qm = g_new0(struct queued_message, 1); 701 qm = g_new0(struct queued_message, 1);
703 } else { 709 } else {
704 if (cnv == NULL) { 710 if (cnv == NULL) {
705 cnv = new_conversation(name); 711 cnv = new_conversation(name);
706 set_convo_gc(cnv, gc); 712 set_convo_gc(cnv, gc);
707 } 713 }
708 if (new_conv && (sound_options & OPT_SOUND_FIRST_RCV)) 714
709 play_sound(SND_FIRST_RECEIVE);
710 else if (cnv->makesound)
711 play_sound(SND_RECEIVE);
712
713 set_convo_name(cnv, name); 715 set_convo_name(cnv, name);
714 716
715 write_to_conv(cnv, message, away | WFLAG_RECV, NULL, mtime, len); 717 write_to_conv(cnv, message, away | WFLAG_RECV, NULL, mtime, len);
716 } 718 }
717 } 719 }