diff src/themes.c @ 9971:ab5db2c5da79

[gaim-migrate @ 10882] Remove the default prpl, patch from datallah Patch from nosnilmot that might make recent buddies work Someone check my get_proto_smileys function. I feel like it could be better committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Wed, 08 Sep 2004 02:33:53 +0000
parents 4a15962c344a
children
line wrap: on
line diff
--- a/src/themes.c	Wed Sep 08 02:15:18 2004 +0000
+++ b/src/themes.c	Wed Sep 08 02:33:53 2004 +0000
@@ -239,21 +239,23 @@
 }
 
 GSList *get_proto_smileys(const char *id) {
-	GaimPlugin *proto = gaim_find_prpl(id);
+	GaimPlugin *proto;
 	struct smiley_list *list, *def;
 
-	if(!current_smiley_theme)
-		return NULL;
-
-	if(!current_smiley_theme->list)
+	if ((current_smiley_theme == NULL) || (current_smiley_theme->list == NULL))
 		return NULL;
 
 	def = list = current_smiley_theme->list;
 
-	while(list) {
-		if(!strcmp(list->sml, "default"))
+	if (id == NULL)
+		return def->smileys;
+
+	proto = gaim_find_prpl(id);
+
+	while (list) {
+		if (!strcmp(list->sml, "default"))
 			def = list;
-		else if(proto && !strcmp(proto->info->name, list->sml))
+		else if (proto && !strcmp(proto->info->name, list->sml))
 			break;
 
 		list = list->next;