Mercurial > pidgin
comparison libpurple/protocols/silc/ops.c @ 16375:391a79778f89
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
imgstore subsystem to not require IDs for everything.
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Tue, 24 Apr 2007 03:57:07 +0000 |
parents | 32c366eeeb99 |
children | 24bbd7e46bfe |
comparison
equal
deleted
inserted
replaced
16374:2a19bbc743ed | 16375:391a79778f89 |
---|---|
159 convo = purple_find_conversation_with_account(PURPLE_CONV_TYPE_CHAT, | 159 convo = purple_find_conversation_with_account(PURPLE_CONV_TYPE_CHAT, |
160 channel->channel_name, sg->account); | 160 channel->channel_name, sg->account); |
161 if (channel && !convo) | 161 if (channel && !convo) |
162 goto out; | 162 goto out; |
163 | 163 |
164 imgid = purple_imgstore_add(data, data_len, ""); | 164 imgid = purple_imgstore_add_with_id(data, data_len, ""); |
165 if (imgid) { | 165 if (imgid) { |
166 cflags |= PURPLE_MESSAGE_IMAGES | PURPLE_MESSAGE_RECV; | 166 cflags |= PURPLE_MESSAGE_IMAGES | PURPLE_MESSAGE_RECV; |
167 g_snprintf(tmp, sizeof(tmp), "<IMG ID=\"%d\">", imgid); | 167 g_snprintf(tmp, sizeof(tmp), "<IMG ID=\"%d\">", imgid); |
168 | 168 |
169 if (channel) | 169 if (channel) |
175 else | 175 else |
176 serv_got_im(gc, sender->nickname ? | 176 serv_got_im(gc, sender->nickname ? |
177 sender->nickname : "<unknown>", | 177 sender->nickname : "<unknown>", |
178 tmp, cflags, time(NULL)); | 178 tmp, cflags, time(NULL)); |
179 | 179 |
180 purple_imgstore_unref(imgid); | 180 purple_imgstore_unref_by_id(imgid); |
181 cflags = 0; | 181 cflags = 0; |
182 } | 182 } |
183 goto out; | 183 goto out; |
184 } | 184 } |
185 | 185 |