pidgin: 6a51501e: Fix a bug where the thumbnail buddy icon...

markdoliner at pidgin.im markdoliner at pidgin.im
Thu Jan 29 05:30:33 EST 2009


-----------------------------------------------------------------
Revision: 6a51501ec3aff341c8cd763ffc2076a9bbc07d23
Ancestor: 4651ec76f4efd30b174731a3a92bb1fcbe98281c
Author: markdoliner at pidgin.im
Date: 2009-01-29T10:29:25
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/6a51501ec3aff341c8cd763ffc2076a9bbc07d23

Modified files:
        pidgin/gtkaccount.c

ChangeLog: 

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.

-------------- next part --------------
============================================================
--- pidgin/gtkaccount.c	0a8eb5ce93c7bb6b834c6531fa7653ae8d035516
+++ pidgin/gtkaccount.c	b46851a34214bd2a18360dbd863df23290da78c2
@@ -1990,9 +1990,13 @@ set_account(GtkListStore *store, GtkTree
 		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);
 		}


More information about the Commits mailing list