From: Christian H. <ch...@us...> - 2003-01-22 01:26:49
|
Update of /cvsroot/gaim/gaim/src In directory sc8-pr-cvs1:/tmp/cvs-serv9129 Modified Files: conversation.c gtkconv.c Log Message: Raise window on events works again. Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.478 retrieving revision 1.479 diff -u -d -r1.478 -r1.479 --- conversation.c 21 Jan 2003 06:16:41 -0000 1.478 +++ conversation.c 22 Jan 2003 01:26:46 -0000 1.479 @@ -1546,7 +1546,7 @@ void gaim_im_write(struct gaim_im *im, const char *who, const char *message, - size_t len, int flag, time_t mtime) + size_t len, int flags, time_t mtime) { struct gaim_conversation *c; @@ -1555,10 +1555,14 @@ c = gaim_im_get_conversation(im); + /* Raise the window, if specified in prefs. */ + if (!(flags & WFLAG_NOLOG) & (im_options & OPT_IM_POPUP)) + gaim_window_raise(gaim_conversation_get_window(c)); + if (c->ops != NULL && c->ops->write_im != NULL) - c->ops->write_im(c, who, message, len, flag, mtime); + c->ops->write_im(c, who, message, len, flags, mtime); else - gaim_conversation_write(c, who, message, -1, flag, mtime); + gaim_conversation_write(c, who, message, -1, flags, mtime); } void @@ -1743,7 +1747,7 @@ void gaim_chat_write(struct gaim_chat *chat, const char *who, - const char *message, int flag, time_t mtime) + const char *message, int flags, time_t mtime) { struct gaim_conversation *conv; struct gaim_connection *gc; @@ -1758,7 +1762,11 @@ if (gaim_chat_is_user_ignored(chat, who)) return; - if (!(flag & WFLAG_WHISPER)) { + /* Raise the window, if specified in prefs. */ + if (!(flags & WFLAG_NOLOG) & (chat_options & OPT_CHAT_POPUP)) + gaim_window_raise(gaim_conversation_get_window(conv)); + + if (!(flags & WFLAG_WHISPER)) { char *str; str = g_strdup(normalize(who)); @@ -1766,13 +1774,13 @@ if (!g_strcasecmp(str, normalize(gc->username)) || !g_strcasecmp(str, normalize(gc->displayname))) { - flag |= WFLAG_SEND; + flags |= WFLAG_SEND; } else { - flag |= WFLAG_RECV; + flags |= WFLAG_RECV; if (find_nick(gc, message)) - flag |= WFLAG_NICK; + flags |= WFLAG_NICK; } g_free(str); @@ -1780,9 +1788,9 @@ /* Pass this on to either the ops structure or the default write func. */ if (conv->ops != NULL && conv->ops->write_chat != NULL) - conv->ops->write_chat(conv, who, message, flag, mtime); + conv->ops->write_chat(conv, who, message, flags, mtime); else - gaim_conversation_write(conv, who, message, -1, flag, mtime); + gaim_conversation_write(conv, who, message, -1, flags, mtime); } void Index: gtkconv.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtkconv.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- gtkconv.c 21 Jan 2003 06:16:42 -0000 1.12 +++ gtkconv.c 22 Jan 2003 01:26:46 -0000 1.13 @@ -3569,6 +3569,7 @@ gtkconv = GAIM_GTK_CONVERSATION(conv); + /* Play a sound, if specified in prefs. */ if (gtkconv->make_sound) { if (flags & WFLAG_RECV) { if (gtkconv->u.im->a_virgin && @@ -3597,6 +3598,7 @@ gtkconv = GAIM_GTK_CONVERSATION(conv); + /* Play a sound, if specified in prefs. */ if (gtkconv->make_sound) { if (!(flags & WFLAG_WHISPER) && (flags & WFLAG_SEND)) play_sound(SND_CHAT_YOU_SAY); |