comparison src/buddy_chat.c @ 3060:4f2f12bf4408

[gaim-migrate @ 3074] Code cleanups by Robert McQueen. Michael Golden replaced the multiple per-account signon windows with a single signon window showing the status of all your accounts committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Sat, 16 Mar 2002 00:32:53 +0000
parents b68c648618a3
children b17d773c3c80
comparison
equal deleted inserted replaced
3059:966c4e460ebb 3060:4f2f12bf4408
704 return; 704 return;
705 705
706 if (!(flag & WFLAG_WHISPER)) { 706 if (!(flag & WFLAG_WHISPER)) {
707 str = g_strdup(normalize (who)); 707 str = g_strdup(normalize (who));
708 if (!g_strcasecmp(str, normalize(b->gc->username))) { 708 if (!g_strcasecmp(str, normalize(b->gc->username))) {
709 if (b->makesound && (sound_options & OPT_SOUND_CHAT_YOU_SAY)) 709 if (b->makesound)
710 play_sound(CHAT_YOU_SAY); 710 play_sound(SND_CHAT_YOU_SAY);
711 flag |= WFLAG_SEND; 711 flag |= WFLAG_SEND;
712 } else if (!g_strcasecmp(str, normalize(b->gc->displayname))) { 712 } else if (!g_strcasecmp(str, normalize(b->gc->displayname))) {
713 if (b->makesound && (sound_options & OPT_SOUND_CHAT_YOU_SAY)) 713 if (b->makesound)
714 play_sound(CHAT_YOU_SAY); 714 play_sound(SND_CHAT_YOU_SAY);
715 flag |= WFLAG_SEND; 715 flag |= WFLAG_SEND;
716 } else { 716 } else {
717 if (b->makesound && (sound_options & OPT_SOUND_CHAT_SAY)) 717 if (b->makesound)
718 play_sound(CHAT_SAY); 718 play_sound(SND_CHAT_SAY);
719 flag |= WFLAG_RECV; 719 flag |= WFLAG_RECV;
720 } 720 }
721 g_free(str); 721 g_free(str);
722 } 722 }
723 723
921 921
922 g_snprintf(tmp, sizeof(tmp), _("%d %s in room"), g_list_length(b->in_room), 922 g_snprintf(tmp, sizeof(tmp), _("%d %s in room"), g_list_length(b->in_room),
923 g_list_length(b->in_room) == 1 ? "person" : "people"); 923 g_list_length(b->in_room) == 1 ? "person" : "people");
924 gtk_label_set_text(GTK_LABEL(b->count), tmp); 924 gtk_label_set_text(GTK_LABEL(b->count), tmp);
925 925
926 if (b->makesound && (sound_options & OPT_SOUND_CHAT_JOIN)) 926 if (b->makesound)
927 play_sound(CHAT_JOIN); 927 play_sound(SND_CHAT_JOIN);
928 928
929 if (chat_options & OPT_CHAT_LOGON) { 929 if (chat_options & OPT_CHAT_LOGON) {
930 g_snprintf(tmp, sizeof(tmp), _("%s entered the room."), name); 930 g_snprintf(tmp, sizeof(tmp), _("%s entered the room."), name);
931 write_to_conv(b, tmp, WFLAG_SYSTEM, NULL, time(NULL), -1); 931 write_to_conv(b, tmp, WFLAG_SYSTEM, NULL, time(NULL), -1);
932 } 932 }
1033 1033
1034 g_snprintf(tmp, sizeof(tmp), _("%d %s in room"), g_list_length(b->in_room), 1034 g_snprintf(tmp, sizeof(tmp), _("%d %s in room"), g_list_length(b->in_room),
1035 g_list_length(b->in_room) == 1 ? "person" : "people"); 1035 g_list_length(b->in_room) == 1 ? "person" : "people");
1036 gtk_label_set_text(GTK_LABEL(b->count), tmp); 1036 gtk_label_set_text(GTK_LABEL(b->count), tmp);
1037 1037
1038 if (b->makesound && (sound_options & OPT_SOUND_CHAT_PART)) 1038 if (b->makesound)
1039 play_sound(CHAT_LEAVE); 1039 play_sound(SND_CHAT_LEAVE);
1040 1040
1041 if (chat_options & OPT_CHAT_LOGON) { 1041 if (chat_options & OPT_CHAT_LOGON) {
1042 if (reason && *reason) 1042 if (reason && *reason)
1043 g_snprintf(tmp, sizeof(tmp), _("%s left the room (%s)."), buddy, reason); 1043 g_snprintf(tmp, sizeof(tmp), _("%s left the room (%s)."), buddy, reason);
1044 else 1044 else