Mercurial > pidgin
changeset 612:12bb64b42ad1
[gaim-migrate @ 622]
show logons/logoffs in chat window.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Sat, 05 Aug 2000 01:49:49 +0000 |
parents | 0f7e5ff95f71 |
children | 7800445cc561 |
files | src/buddy_chat.c src/gaim.h src/prefs.c |
diffstat | 3 files changed, 17 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/buddy_chat.c Sat Aug 05 01:23:46 2000 +0000 +++ b/src/buddy_chat.c Sat Aug 05 01:49:49 2000 +0000 @@ -426,6 +426,7 @@ void add_chat_buddy(struct conversation *b, char *buddy) { char *name = g_strdup(buddy); + char tmp[BUF_LONG]; #ifdef GAIM_PLUGINS GList *c = callbacks; @@ -440,13 +441,17 @@ c = c->next; } #endif - b->in_room = g_list_append(b->in_room, name); update_chat_list(b); if (b->makesound && (sound_options & OPT_SOUND_CHAT_JOIN)) play_sound(BUDDY_ARRIVE); + + if (display_options & OPT_DISP_CHAT_LOGON) { + g_snprintf(tmp, sizeof(tmp), _("<B>%s entered the room.</B>"), name); + write_to_conv(b, tmp, WFLAG_SYSTEM, NULL); + } } @@ -455,6 +460,7 @@ void remove_chat_buddy(struct conversation *b, char *buddy) { GList *names = b->in_room; + char tmp[BUF_LONG]; #ifdef GAIM_PLUGINS GList *c = callbacks; @@ -481,6 +487,11 @@ if (b->makesound && (sound_options & OPT_SOUND_CHAT_JOIN)) play_sound(BUDDY_LEAVE); + + if (display_options & OPT_DISP_CHAT_LOGON) { + g_snprintf(tmp, sizeof(tmp), _("<B>%s left the room.</B>"), buddy); + write_to_conv(b, tmp, WFLAG_SYSTEM, NULL); + } }
--- a/src/gaim.h Sat Aug 05 01:23:46 2000 +0000 +++ b/src/gaim.h Sat Aug 05 01:49:49 2000 +0000 @@ -408,7 +408,7 @@ #define TYPE_SIGNOFF 4 #define TYPE_KEEPALIVE 5 -#define REVISION "gaim:$Revision: 618 $" +#define REVISION "gaim:$Revision: 622 $" #define FLAPON "FLAPON\r\n\r\n" #define ROAST "Tic/Toc" @@ -501,8 +501,9 @@ #define OPT_DISP_SHOW_LOGON 0x00000040 #define OPT_DISP_DEVIL_PIXMAPS 0x00000080 #define OPT_DISP_SHOW_SMILEY 0x00000100 -#define OPT_DISP_SHOW_BUDDYTICKER 0x00000200 -#define OPT_DISP_COOL_LOOK 0x00000400 +#define OPT_DISP_SHOW_BUDDYTICKER 0x00000200 +#define OPT_DISP_COOL_LOOK 0x00000400 +#define OPT_DISP_CHAT_LOGON 0x00000800 extern int sound_options; #define OPT_SOUND_LOGIN 0x00000001
--- a/src/prefs.c Sat Aug 05 01:23:46 2000 +0000 +++ b/src/prefs.c Sat Aug 05 01:49:49 2000 +0000 @@ -780,6 +780,7 @@ gaim_button("Transparent text window (experimental)", &transparent, appbox ); #endif gaim_button(_("Show logon/logoffs in conversation windows"), &display_options, OPT_DISP_SHOW_LOGON, appbox ); + gaim_button(_("Show people joining/leaving in chat windows"), &display_options, OPT_DISP_CHAT_LOGON, appbox ); gaim_button(_("Use devil icons"), &display_options, OPT_DISP_DEVIL_PIXMAPS, appbox ); gaim_button(_("Show graphical smileys (experimental)"), &display_options, OPT_DISP_SHOW_SMILEY, appbox ); gaim_button(_("Show Buddy Ticker after restart"), &display_options, OPT_DISP_SHOW_BUDDYTICKER, appbox );