diff src/request.c @ 7962:cc77bd88cd72

[gaim-migrate @ 8639] Honestly, I don't know *what* I was thinking. We no longer delete all items in a multi-select list when trying to clear the selection. Sorry, faceprint :) committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Wed, 31 Dec 2003 07:47:01 +0000
parents 5be22af4ebfc
children a5c70e43ee43
line wrap: on
line diff
--- a/src/request.c	Wed Dec 31 07:03:18 2003 +0000
+++ b/src/request.c	Wed Dec 31 07:47:01 2003 +0000
@@ -727,17 +727,12 @@
 	g_return_if_fail(field != NULL);
 	g_return_if_fail(field->type == GAIM_REQUEST_FIELD_LIST);
 
-	if (field->u.list.items != NULL)
+	if (field->u.list.selected != NULL)
 	{
-		g_list_foreach(field->u.list.items, (GFunc)g_free, NULL);
-		g_list_free(field->u.list.items);
-		field->u.list.items = NULL;
+		g_list_foreach(field->u.list.selected, (GFunc)g_free, NULL);
+		g_list_free(field->u.list.selected);
+		field->u.list.selected = NULL;
 	}
-
-	g_hash_table_destroy(field->u.list.item_data);
-
-	field->u.list.item_data = g_hash_table_new_full(g_str_hash, g_str_equal,
-													g_free, NULL);
 }
 
 void
@@ -747,12 +742,7 @@
 	g_return_if_fail(items != NULL);
 	g_return_if_fail(field->type == GAIM_REQUEST_FIELD_LIST);
 
-	if (field->u.list.selected != NULL)
-	{
-		g_list_foreach(field->u.list.selected, (GFunc)g_free, NULL);
-		g_list_free(field->u.list.selected);
-		field->u.list.selected = NULL;
-	}
+	gaim_request_field_list_clear_selected(field);
 
 	field->u.list.selected = items;
 }