Mercurial > pidgin.yaz
comparison src/conversation.c @ 9627:8a540b8a5f70
[gaim-migrate @ 10471]
A bug fix for away message tooltips and some more removing-gaim_notify_errors.
Here's the thought: for errors associated with a buddy, check to see if
there's already a window open for him, if so, print the error to the window
and present the window to the user. If not, you can go ahead and gaim_notify_error.
So, things like checking profiles in the buddy list might potentially print errors
to conversations. I think this is good, but we'll try it out a bit.
If it's really good, we won't even gaim_notify_error and instead create a new convo
window just for the error.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Sun, 01 Aug 2004 00:31:45 +0000 |
parents | c001be3c330e |
children | 81b31af2752d |
comparison
equal
deleted
inserted
replaced
9626:afd069368860 | 9627:8a540b8a5f70 |
---|---|
1664 c->ui_ops->write_im(c, who, message, flags, mtime); | 1664 c->ui_ops->write_im(c, who, message, flags, mtime); |
1665 else | 1665 else |
1666 gaim_conversation_write(c, who, message, flags, mtime); | 1666 gaim_conversation_write(c, who, message, flags, mtime); |
1667 } | 1667 } |
1668 | 1668 |
1669 gboolean gaim_conv_present_error(const char *who, GaimAccount *account, const char *what) | |
1670 { | |
1671 GaimConversation *conv; | |
1672 GaimConvWindow *window; | |
1673 | |
1674 g_return_val_if_fail(who != NULL, FALSE); | |
1675 g_return_val_if_fail(account !=NULL, FALSE); | |
1676 g_return_val_if_fail(what != NULL, FALSE); | |
1677 | |
1678 conv = gaim_find_conversation_with_account(who, account); | |
1679 if (conv != NULL) | |
1680 gaim_conversation_write(conv, NULL, what, GAIM_MESSAGE_ERROR, time(NULL)); | |
1681 else | |
1682 return FALSE; | |
1683 window = gaim_conversation_get_window(conv); | |
1684 if (!gaim_conv_window_has_focus(window)) /* don't change the active conversation if the user is using this window */ | |
1685 gaim_conv_window_switch_conversation(window, gaim_conversation_get_index(conv)); | |
1686 | |
1687 gaim_conv_window_raise(window); | |
1688 | |
1689 return TRUE; | |
1690 } | |
1691 | |
1669 void | 1692 void |
1670 gaim_conv_im_send(GaimConvIm *im, const char *message) | 1693 gaim_conv_im_send(GaimConvIm *im, const char *message) |
1671 { | 1694 { |
1672 g_return_if_fail(im != NULL); | 1695 g_return_if_fail(im != NULL); |
1673 g_return_if_fail(message != NULL); | 1696 g_return_if_fail(message != NULL); |