diff 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
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);
 		}