changeset 17666:fe5a89474e6d

Reverse the smiley list only after reading the whole list of smileys in. Fixes smileys showing up in a "random" order. Fixes #273
author Stu Tomlinson <stu@nosnilmot.com>
date Sat, 02 Jun 2007 18:46:34 +0000
parents 02abb6713cf2
children 98f27c7f0ef5
files pidgin/gtkthemes.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkthemes.c	Sat Jun 02 17:38:22 2007 +0000
+++ b/pidgin/gtkthemes.c	Sat Jun 02 18:46:34 2007 +0000
@@ -146,6 +146,9 @@
 				list->next = child;
 			else
 				theme->list = child;
+			/* Reverse the Smiley list since it was built in reverse order for efficiency reasons */
+			if (list != NULL)
+				list->smileys = g_slist_reverse(list->smileys);
 			list = child;
 		} else if (!g_ascii_strncasecmp(i, "Name=", strlen("Name="))) {
 			int len;
@@ -201,8 +204,6 @@
 
 			}
 
-			/* Reverse the Smiley list since it was built in reverse order for efficiency reasons */
-			list->smileys = g_slist_reverse(list->smileys);
 
 			if (!have_used_sfile)
 				g_free(sfile);