changeset 25392: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 3cace6a9a28f
children f5188d4d84e3 b018c91fb90b f931efdddfbb f4b9d56dba80
files pidgin/gtkaccount.c
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkaccount.c	Thu Jan 29 08:23:27 2009 +0000
+++ b/pidgin/gtkaccount.c	Thu Jan 29 10:29:25 2009 +0000
@@ -1990,9 +1990,13 @@
 		if (purple_account_get_bool(account, "use-global-buddyicon", TRUE)) {
 			if (global_buddyicon != NULL)
 				buddyicon = g_object_ref(G_OBJECT(global_buddyicon));
-			/* This is for when set_account() is called for a single account */
-			else
-				img = purple_buddy_icons_find_account_icon(account);
+			else {
+				/* This is for when set_account() is called for a single account */
+				const char *path;
+				path = purple_prefs_get_path(PIDGIN_PREFS_ROOT "/accounts/buddyicon");
+				if (path != NULL)
+					img = purple_imgstore_new_from_file(path);
+			}
 		} else {
 			img = purple_buddy_icons_find_account_icon(account);
 		}