comparison pidgin/gtkaccount.c @ 25032:c434094cf298

Fix a bug where the thumbnail buddy icon in the Accounts dialog would get cleared if you dragdropped or edited an account which was using your global buddy icon. The global_buddyicon variable is only set when the dialog is initially populated, so we need to look up the path to that icon again and grab the thumbnail from there.
author Mark Doliner <mark@kingant.net>
date Thu, 29 Jan 2009 10:29:25 +0000
parents 17b840986607
children 4b8c4870b13a dfd7be3e3cb7
comparison
equal deleted inserted replaced
25031:3cace6a9a28f 25032:c434094cf298
1988 prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl); 1988 prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl);
1989 if (prpl_info != NULL && prpl_info->icon_spec.format != NULL) { 1989 if (prpl_info != NULL && prpl_info->icon_spec.format != NULL) {
1990 if (purple_account_get_bool(account, "use-global-buddyicon", TRUE)) { 1990 if (purple_account_get_bool(account, "use-global-buddyicon", TRUE)) {
1991 if (global_buddyicon != NULL) 1991 if (global_buddyicon != NULL)
1992 buddyicon = g_object_ref(G_OBJECT(global_buddyicon)); 1992 buddyicon = g_object_ref(G_OBJECT(global_buddyicon));
1993 /* This is for when set_account() is called for a single account */ 1993 else {
1994 else 1994 /* This is for when set_account() is called for a single account */
1995 img = purple_buddy_icons_find_account_icon(account); 1995 const char *path;
1996 path = purple_prefs_get_path(PIDGIN_PREFS_ROOT "/accounts/buddyicon");
1997 if (path != NULL)
1998 img = purple_imgstore_new_from_file(path);
1999 }
1996 } else { 2000 } else {
1997 img = purple_buddy_icons_find_account_icon(account); 2001 img = purple_buddy_icons_find_account_icon(account);
1998 } 2002 }
1999 } 2003 }
2000 2004