Mercurial > pidgin
comparison src/away.c @ 4476:62c1e5e656d0
[gaim-migrate @ 4751]
gaim_conversation_new() now takes an aim_user parameter. This should fix
the new placement grouping bugs, as the default "user" (account)
selected was the first account in the list of connections. There may be
side-effects, especially with perl plugins, but I'm not sure. Please report
anything odd that you see as a result of this.
committer: Tailor Script <tailor@pidgin.im>
| author | Christian Hammond <chipx86@chipx86.com> |
|---|---|
| date | Thu, 30 Jan 2003 18:45:50 +0000 |
| parents | 8067614e49e4 |
| children | 3196d9044a45 |
comparison
equal
deleted
inserted
replaced
| 4475:1f3241831734 | 4476:62c1e5e656d0 |
|---|---|
| 70 | 70 |
| 71 while (templist) { | 71 while (templist) { |
| 72 struct queued_message *qm = templist->data; | 72 struct queued_message *qm = templist->data; |
| 73 if (templist->data) { | 73 if (templist->data) { |
| 74 if (!g_strcasecmp(qm->name, name)) { | 74 if (!g_strcasecmp(qm->name, name)) { |
| 75 struct aim_user *user = NULL; | |
| 76 | |
| 77 if (g_slist_index(connections, qm->gc) >= 0) | |
| 78 user = qm->gc->user; | |
| 79 | |
| 75 cnv = gaim_find_conversation(name); | 80 cnv = gaim_find_conversation(name); |
| 76 | 81 |
| 77 if (!cnv) | 82 if (!cnv) |
| 78 cnv = gaim_conversation_new(GAIM_CONV_IM, qm->name); | 83 cnv = gaim_conversation_new(GAIM_CONV_IM, user, qm->name); |
| 79 | 84 else |
| 80 if (g_slist_index(connections, qm->gc) >= 0) | 85 gaim_conversation_set_user(cnv, user); |
| 81 gaim_conversation_set_user(cnv, qm->gc->user); | |
| 82 | 86 |
| 83 gaim_im_write(GAIM_IM(cnv), NULL, qm->message, qm->len, | 87 gaim_im_write(GAIM_IM(cnv), NULL, qm->message, qm->len, |
| 84 qm->flags, qm->tm); | 88 qm->flags, qm->tm); |
| 85 g_free(qm->message); | 89 g_free(qm->message); |
| 86 g_free(qm); | 90 g_free(qm); |
| 101 void purge_away_queue(GSList **queue) | 105 void purge_away_queue(GSList **queue) |
| 102 { | 106 { |
| 103 GSList *q = *queue; | 107 GSList *q = *queue; |
| 104 struct queued_message *qm; | 108 struct queued_message *qm; |
| 105 struct gaim_conversation *cnv; | 109 struct gaim_conversation *cnv; |
| 110 struct aim_user *user; | |
| 106 | 111 |
| 107 while (q) { | 112 while (q) { |
| 108 qm = q->data; | 113 qm = q->data; |
| 109 | 114 |
| 115 user = NULL; | |
| 116 | |
| 117 if (g_slist_index(connections, qm->gc) >= 0) | |
| 118 user = qm->gc->user; | |
| 119 | |
| 110 cnv = gaim_find_conversation(qm->name); | 120 cnv = gaim_find_conversation(qm->name); |
| 111 | 121 |
| 112 if (!cnv) | 122 if (!cnv) |
| 113 cnv = gaim_conversation_new(GAIM_CONV_IM, qm->name); | 123 cnv = gaim_conversation_new(GAIM_CONV_IM, user, qm->name); |
| 114 | 124 else |
| 115 if (g_slist_index(connections, qm->gc) >= 0) | 125 gaim_conversation_set_user(cnv, user); |
| 116 gaim_conversation_set_user(cnv, qm->gc->user); | |
| 117 | 126 |
| 118 gaim_im_write(GAIM_IM(cnv), NULL, qm->message, -1, qm->flags, qm->tm); | 127 gaim_im_write(GAIM_IM(cnv), NULL, qm->message, -1, qm->flags, qm->tm); |
| 119 | 128 |
| 120 g_free(qm->message); | 129 g_free(qm->message); |
| 121 g_free(qm); | 130 g_free(qm); |
