comparison pidgin/gtkimhtmltoolbar.c @ 16391:24bbd7e46bfe

Change the imgstore and by extension, then the buddy icon code to take over the references to icon data instead of calling g_memdup(). This eliminates g_memdup()ing and g_free()ing in ~50% of the callers. For the rest, it's no worse (they now do a g_memdup() instead of the core) and they may be able to be modified in the future to avoid that.
author Richard Laager <rlaager@wiktel.com>
date Wed, 25 Apr 2007 22:23:29 +0000
parents 414b9c9405fd
children 5e47b3427b28
comparison
equal deleted inserted replaced
16390:4fc51a87ce42 16391:24bbd7e46bfe
479 } 479 }
480 480
481 name = strrchr(filename, G_DIR_SEPARATOR) + 1; 481 name = strrchr(filename, G_DIR_SEPARATOR) + 1;
482 482
483 id = purple_imgstore_add_with_id(filedata, size, name); 483 id = purple_imgstore_add_with_id(filedata, size, name);
484 g_free(filedata);
485 484
486 if (id == 0) { 485 if (id == 0) {
487 buf = g_strdup_printf(_("Failed to store image: %s\n"), filename); 486 buf = g_strdup_printf(_("Failed to store image: %s\n"), filename);
488 purple_notify_error(NULL, NULL, buf, NULL); 487 purple_notify_error(NULL, NULL, buf, NULL);
489 488