comparison pidgin/gtkstatusbox.c @ 16381:72dc611f3257

Fix the custom icon stuff, and various memory leaks. At this point, custom icons work properly, EXCEPT FOR A SERIOUS LEAK which I haven't fixed yet because I'm seeing weird memory allocation issues. Once I deal with that, it's just the account icon stuff that's left.
author Richard Laager <rlaager@wiktel.com>
date Tue, 24 Apr 2007 17:00:22 +0000
parents bf353c85959a
children 4fc51a87ce42
comparison
equal deleted inserted replaced
16380:6c97924af83b 16381:72dc611f3257
1437 PurplePlugin *plug = purple_find_prpl(purple_account_get_protocol_id(box->account)); 1437 PurplePlugin *plug = purple_find_prpl(purple_account_get_protocol_id(box->account));
1438 if (plug) { 1438 if (plug) {
1439 PurplePluginProtocolInfo *prplinfo = PURPLE_PLUGIN_PROTOCOL_INFO(plug); 1439 PurplePluginProtocolInfo *prplinfo = PURPLE_PLUGIN_PROTOCOL_INFO(plug);
1440 if (prplinfo && prplinfo->icon_spec.format) { 1440 if (prplinfo && prplinfo->icon_spec.format) {
1441 char *icon = NULL; 1441 char *icon = NULL;
1442 #if 0
1442 if (filename) 1443 if (filename)
1443 icon = pidgin_convert_buddy_icon(plug, filename); 1444 icon = pidgin_convert_buddy_icon(plug, filename);
1445 #endif
1444 purple_account_set_bool(box->account, "use-global-buddyicon", (filename != NULL)); 1446 purple_account_set_bool(box->account, "use-global-buddyicon", (filename != NULL));
1445 purple_account_set_ui_string(box->account, PIDGIN_UI, "non-global-buddyicon-cached-path", icon); 1447 purple_account_set_ui_string(box->account, PIDGIN_UI, "non-global-buddyicon-cached-path", icon);
1446 purple_account_set_buddy_icon_path(box->account, filename); 1448 purple_account_set_buddy_icon_path(box->account, filename);
1447 purple_account_set_buddy_icon(box->account, icon); 1449 purple_account_set_buddy_icon(box->account, icon);
1448 g_free(icon); 1450 g_free(icon);
1457 PurplePluginProtocolInfo *prplinfo = PURPLE_PLUGIN_PROTOCOL_INFO(plug); 1459 PurplePluginProtocolInfo *prplinfo = PURPLE_PLUGIN_PROTOCOL_INFO(plug);
1458 if (prplinfo != NULL && 1460 if (prplinfo != NULL &&
1459 purple_account_get_bool(account, "use-global-buddyicon", TRUE) && 1461 purple_account_get_bool(account, "use-global-buddyicon", TRUE) &&
1460 prplinfo->icon_spec.format) { 1462 prplinfo->icon_spec.format) {
1461 char *icon = NULL; 1463 char *icon = NULL;
1464 #if 0
1462 if (filename) 1465 if (filename)
1463 icon = pidgin_convert_buddy_icon(plug, filename); 1466 icon = pidgin_convert_buddy_icon(plug, filename);
1467 #endif
1464 purple_account_set_buddy_icon_path(account, filename); 1468 purple_account_set_buddy_icon_path(account, filename);
1465 purple_account_set_buddy_icon(account, icon); 1469 purple_account_set_buddy_icon(account, icon);
1466 g_free(icon); 1470 g_free(icon);
1467 } 1471 }
1468 } 1472 }