comparison src/buddy.c @ 5151:ab2ae9dc9370

[gaim-migrate @ 5515] This fixes a crash using zephyr + any other account, and a crash keeping convo windows open after an account has disconnected, and a few other crashes, and a crash in some code Chip hasn't written yet ;-) committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Thu, 17 Apr 2003 23:42:47 +0000
parents 6d68d9edf5ae
children 3db711442e0f
comparison
equal deleted inserted replaced
5150:9a19c0a1e1be 5151:ab2ae9dc9370
1780 create_prpl_icon(struct gaim_account *account) 1780 create_prpl_icon(struct gaim_account *account)
1781 { 1781 {
1782 struct prpl *prpl = find_prpl(account->protocol); 1782 struct prpl *prpl = find_prpl(account->protocol);
1783 GdkPixbuf *status = NULL; 1783 GdkPixbuf *status = NULL;
1784 char *filename = NULL; 1784 char *filename = NULL;
1785 const char *protoname = prpl->list_icon(account, NULL); 1785 const char *protoname = NULL;
1786
1787 /* this is so we can get the icon when the prpl isn't loaded.
1788 * it's not as bad as it looks, since most of the time this function
1789 * is called, the prpl is already loaded, so it'll just increment and
1790 * decrement the refcount, won't have to go through the hassle of
1791 * actually loading and unloading the prpl. the few times it actually
1792 * does that, it saves us from crashing */
1793 if(prpl && prpl->list_icon) {
1794 ref_protocol(prpl);
1795 protoname = prpl->list_icon(account, NULL);
1796 unref_protocol(prpl);
1797 }
1798
1786 /* "Hey, what's all this crap?" you ask. Status icons will be themeable too, and 1799 /* "Hey, what's all this crap?" you ask. Status icons will be themeable too, and
1787 then it will look up protoname from the theme */ 1800 then it will look up protoname from the theme */
1788 if (!strcmp(protoname, "aim")) { 1801 if (!strcmp(protoname, "aim")) {
1789 filename = g_build_filename(DATADIR, "pixmaps", "gaim", "status", "default", "aim.png", NULL); 1802 filename = g_build_filename(DATADIR, "pixmaps", "gaim", "status", "default", "aim.png", NULL);
1790 status = gdk_pixbuf_new_from_file(filename,NULL); 1803 status = gdk_pixbuf_new_from_file(filename,NULL);