# HG changeset patch
# Node ID 92710299d413
# Parent  b1cfab593952
diff --git a/libpurple/protocols/facebook/data.c b/libpurple/protocols/facebook/data.c
--- a/libpurple/protocols/facebook/data.c
+++ b/libpurple/protocols/facebook/data.c
@@ -421,7 +421,7 @@ fb_data_image_add(FbData *fata, const gc
 	img->data = data;
 	img->dunc = dunc;
 
-	g_hash_table_insert(fata->imgs, img, img);
+	g_hash_table_add(fata->imgs, img);
 	return img;
 }
 
@@ -522,8 +522,8 @@ fb_data_image_queue(FbData *fata)
 	guint active = 0;
 
 	g_return_if_fail(FB_IS_DATA(fata));
+
 	g_hash_table_iter_init(&iter, fata->imgs);
-
 	while (g_hash_table_iter_next(&iter, (gpointer *) &img, NULL)) {
 		if (fb_data_image_get_active(img)) {
 			active++;
@@ -535,7 +535,6 @@ fb_data_image_queue(FbData *fata)
 	}
 
 	g_hash_table_iter_init(&iter, fata->imgs);
-
 	while (g_hash_table_iter_next(&iter, (gpointer *) &img, NULL)) {
 		SoupMessage *msg;
 
diff --git a/libpurple/protocols/gg/edisc.c b/libpurple/protocols/gg/edisc.c
--- a/libpurple/protocols/gg/edisc.c
+++ b/libpurple/protocols/gg/edisc.c
@@ -548,10 +548,8 @@ ggp_edisc_xfer_send_init_ticket_created(
 	purple_debug_info("gg", "ggp_edisc_xfer_send_init_ticket_created: "
 		"ticket \"%s\" created\n", edisc_xfer->ticket_id);
 
-	g_hash_table_insert(sdata->xfers_initialized,
-		edisc_xfer->ticket_id, xfer);
-	g_hash_table_insert(sdata->xfers_history,
-		g_strdup(edisc_xfer->ticket_id), GINT_TO_POINTER(1));
+	g_hash_table_insert(sdata->xfers_initialized, edisc_xfer->ticket_id, xfer);
+	g_hash_table_add(sdata->xfers_history, g_strdup(edisc_xfer->ticket_id));
 
 	if (ack_status != GGP_EDISC_XFER_ACK_STATUS_UNKNOWN)
 		ggp_edisc_xfer_send_ticket_changed(edisc_xfer->gc, xfer,
@@ -1298,8 +1296,7 @@ ggp_edisc_xfer_recv_ticket_update_got(GO
 	edisc_xfer = GGP_XFER(xfer);
 	edisc_xfer->ticket_id = g_strdup(ticket_id);
 	g_hash_table_insert(sdata->xfers_initialized, edisc_xfer->ticket_id, xfer);
-	g_hash_table_insert(sdata->xfers_history, g_strdup(ticket_id),
-	                    GINT_TO_POINTER(1));
+	g_hash_table_add(sdata->xfers_history, g_strdup(ticket_id));
 
 	g_object_unref(parser);
 }
@@ -1348,7 +1345,7 @@ ggp_edisc_xfer_recv_ticket_got(PurpleCon
 
 	g_return_if_fail(sdata != NULL);
 
-	if (g_hash_table_lookup(sdata->xfers_history, ticket_id)) {
+	if (g_hash_table_contains(sdata->xfers_history, ticket_id)) {
 		return;
 	}
 
diff --git a/libpurple/purpleconversationmanager.c b/libpurple/purpleconversationmanager.c
--- a/libpurple/purpleconversationmanager.c
+++ b/libpurple/purpleconversationmanager.c
@@ -214,12 +214,12 @@ purple_conversation_manager_register(Pur
 	g_return_val_if_fail(PURPLE_IS_CONVERSATION_MANAGER(manager), FALSE);
 	g_return_val_if_fail(PURPLE_IS_CONVERSATION(conversation), FALSE);
 
-	/* g_hash_table_insert calls the key_destroy_func if the key already exists
+	/* g_hash_table_add calls the key_destroy_func if the key already exists
 	 * which means we don't need to worry about the reference we're creating
-	 * during the insertion.
+	 * during the addition.
 	 */
-	registered = g_hash_table_insert(manager->conversations,
-	                                 g_object_ref(conversation), NULL);
+	registered = g_hash_table_add(manager->conversations,
+	                              g_object_ref(conversation));
 
 	if(registered) {
 		g_signal_emit(manager, signals[SIG_REGISTERED], 0, conversation);
@@ -252,8 +252,7 @@ purple_conversation_manager_is_registere
 	g_return_val_if_fail(PURPLE_IS_CONVERSATION_MANAGER(manager), FALSE);
 	g_return_val_if_fail(PURPLE_IS_CONVERSATION(conversation), FALSE);
 
-	return g_hash_table_lookup_extended(manager->conversations, conversation,
-	                                    NULL, NULL);
+	return g_hash_table_contains(manager->conversations, conversation);
 }
 
 void
diff --git a/libpurple/request.c b/libpurple/request.c
--- a/libpurple/request.c
+++ b/libpurple/request.c
@@ -1566,7 +1566,7 @@ purple_request_field_list_add_selected(P
 	field->u.list.selected = g_list_append(field->u.list.selected,
 										   g_strdup(item));
 
-	g_hash_table_insert(field->u.list.selected_table, g_strdup(item), NULL);
+	g_hash_table_add(field->u.list.selected_table, g_strdup(item));
 }
 
 void
@@ -1581,10 +1581,7 @@ purple_request_field_list_clear_selected
 		field->u.list.selected = NULL;
 	}
 
-	g_hash_table_destroy(field->u.list.selected_table);
-
-	field->u.list.selected_table =
-		g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL);
+	g_hash_table_remove_all(field->u.list.selected_table);
 }
 
 void
@@ -1606,12 +1603,11 @@ purple_request_field_list_set_selected(P
 		return;
 	}
 
-	for (l = items; l != NULL; l = l->next)
-	{
+	for (l = items; l != NULL; l = l->next) {
+		char *selected = l->data;
 		field->u.list.selected = g_list_append(field->u.list.selected,
-					g_strdup(l->data));
-		g_hash_table_insert(field->u.list.selected_table,
-							g_strdup((char *)l->data), NULL);
+		                                       g_strdup(selected));
+		g_hash_table_add(field->u.list.selected_table, g_strdup(selected));
 	}
 }
 
@@ -1623,8 +1619,7 @@ purple_request_field_list_is_selected(co
 	g_return_val_if_fail(item  != NULL, FALSE);
 	g_return_val_if_fail(field->type == PURPLE_REQUEST_FIELD_LIST, FALSE);
 
-	return g_hash_table_lookup_extended(field->u.list.selected_table,
-										item, NULL, NULL);
+	return g_hash_table_contains(field->u.list.selected_table, item);
 }
 
 GList *
diff --git a/pidgin/plugins/spellchk/spellchk.c b/pidgin/plugins/spellchk/spellchk.c
--- a/pidgin/plugins/spellchk/spellchk.c
+++ b/pidgin/plugins/spellchk/spellchk.c
@@ -1808,14 +1808,13 @@ static void load_conf(void)
 			{
 				strncpy(good, buf + 5, 255);
 
-				if (*bad && *good && g_hash_table_lookup(hashes, bad) == NULL) {
+				if (*bad && *good && !g_hash_table_contains(hashes, bad)) {
 					GtkTreeIter iter;
 
 					/* We don't actually need to store the good string, since this
 					 * hash is just being used to eliminate duplicate bad strings.
-					 * The value has to be non-NULL so the lookup above will work.
 					 */
-					g_hash_table_insert(hashes, g_strdup(bad), GINT_TO_POINTER(1));
+					g_hash_table_add(hashes, g_strdup(bad));
 
 					if (!complete)
 						case_sensitive = TRUE;
