pidgin/gtkwebview.c

changeset 39234
14861f3ffe0c
parent 39198
271f274d83ff
child 39238
53cfb9400de8
equal deleted inserted replaced
39233:7888def49437 39234:14861f3ffe0c
192 } 192 }
193 } else 193 } else
194 return; 194 return;
195 195
196 if (img != NULL) { 196 if (img != NULL) {
197 /* At the time of this comment, purple_image_get_path()
198 * always returns something, whether it's the actual
199 * path or a unique identifier, such as derived from a
200 * hash. That API will probably be reviewed after which
201 * this code can probably be simplified.
202 */
203 gchar *uri = NULL;
204
197 path = purple_image_get_path(img); 205 path = purple_image_get_path(img);
206
198 if (path) { 207 if (path) {
199 gchar *uri = g_filename_to_uri(path, NULL, NULL); 208 uri = g_filename_to_uri(path, NULL, NULL);
209 }
210
211 if (uri != NULL) {
200 webkit_network_request_set_uri(request, uri); 212 webkit_network_request_set_uri(request, uri);
201 g_free(uri); 213 g_free(uri);
202 } else { 214 } else {
203 gchar *b64, *src; 215 gchar *b64, *src;
204 const gchar *type; 216 const gchar *type;

mercurial