Mercurial > pidgin.yaz
comparison src/gtkutils.c @ 8363:19459d9eead2
[gaim-migrate @ 9088]
Nice patch from nosnilmot to make AIM icons work better.
My testing made me realize 2 things still don't work well:
Gaim doesn't clear icons when someone else sets their icon to nothing
Gaim doesn't show some icons. Maybe the official ones?
With the shorter, constant checksum thing?
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 28 Feb 2004 22:45:34 +0000 |
parents | e39ea2b4f6cd |
children | 95afeb9a0c96 |
comparison
equal
deleted
inserted
replaced
8362:1976914caa51 | 8363:19459d9eead2 |
---|---|
280 GTK_FILE_SELECTION(gtkconv->u.im->save_icon)); | 280 GTK_FILE_SELECTION(gtkconv->u.im->save_icon)); |
281 | 281 |
282 if (gaim_gtk_check_if_dir(f, GTK_FILE_SELECTION(gtkconv->u.im->save_icon))) | 282 if (gaim_gtk_check_if_dir(f, GTK_FILE_SELECTION(gtkconv->u.im->save_icon))) |
283 return; | 283 return; |
284 | 284 |
285 if ((file = fopen(f, "w")) != NULL) { | 285 GaimBuddyIcon *icon = gaim_conv_im_get_icon(GAIM_CONV_IM(c)); |
286 GaimBuddyIcon *icon = gaim_conv_im_get_icon(GAIM_CONV_IM(c)); | 286 size_t len; |
287 size_t len; | 287 const void *data = gaim_buddy_icon_get_data(icon, &len); |
288 const void *data = gaim_buddy_icon_get_data(icon, &len); | 288 |
289 | 289 if ((len > 0) && (data != NULL) && (file = fopen(f, "wb")) != NULL) { |
290 if (data) | 290 fwrite(data, 1, len, file); |
291 fwrite(data, 1, len, file); | |
292 | |
293 fclose(file); | 291 fclose(file); |
294 } else { | 292 } else { |
295 gaim_notify_error(NULL, NULL, | 293 gaim_notify_error(NULL, NULL, |
296 _("Can't save icon file to disk."), NULL); | 294 _("Can't save icon file to disk."), NULL); |
297 } | 295 } |