diff plugins/spellchk.c @ 11790:53490cc0fccf

[gaim-migrate @ 14081] Deleting multiple items from the list of corrections in the text replacement/spellchk plugin didn't work correctly. It would start at the top of the list, and delete items moving downward. Apparently this screwed up the GtkTreePaths or something, so it would delete the wrong iter. So now we start at the bottom and move up :-) committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 24 Oct 2005 05:22:14 +0000
parents bee192436fa6
children e439530c0c6d
line wrap: on
line diff
--- a/plugins/spellchk.c	Mon Oct 24 04:50:12 2005 +0000
+++ b/plugins/spellchk.c	Mon Oct 24 05:22:14 2005 +0000
@@ -1819,15 +1819,15 @@
 	GtkTreeIter *iter, gpointer data)
 {
 	GSList **list = (GSList **)data;
-	*list = g_slist_append(*list, gtk_tree_path_copy(path) );
+	*list = g_slist_prepend(*list, gtk_tree_path_copy(path));
 }
 
 static void remove_row(void *data1, gpointer data2)
 {
 	GtkTreePath *path = (GtkTreePath*)data1;
 	GtkTreeIter iter;
-	gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, path);
-	gtk_list_store_remove(model, &iter);
+	if (gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, path))
+		gtk_list_store_remove(model, &iter);
 	gtk_tree_path_free(path);
 }