comparison plugins/spellchk.c @ 4601:203741ac86b3

[gaim-migrate @ 4888] tony skuse (zeet) writes: " this is a simple (two lines) fix for the text replacement plugin (spellchk.so) to update its settings file (~/.gaim/dict) with each modification/deletion." committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Sat, 22 Feb 2003 17:31:59 +0000
parents 2427d847e39c
children 03ea71acade3
comparison
equal deleted inserted replaced
4600:7b2c6b8a6a08 4601:203741ac86b3
264 0, gtk_entry_get_text(GTK_ENTRY(bad_entry)), 264 0, gtk_entry_get_text(GTK_ENTRY(bad_entry)),
265 1, gtk_entry_get_text(GTK_ENTRY(good_entry)), 265 1, gtk_entry_get_text(GTK_ENTRY(good_entry)),
266 -1); 266 -1);
267 gtk_editable_select_region(GTK_EDITABLE(bad_entry), 0, -1); 267 gtk_editable_select_region(GTK_EDITABLE(bad_entry), 0, -1);
268 gtk_widget_grab_focus(bad_entry); 268 gtk_widget_grab_focus(bad_entry);
269
270 save_list();
269 } 271 }
270 272
271 static void add_selected_row_to_list(GtkTreeModel *model, GtkTreePath *path, 273 static void add_selected_row_to_list(GtkTreeModel *model, GtkTreePath *path,
272 GtkTreeIter *iter, gpointer data) 274 GtkTreeIter *iter, gpointer data)
273 { 275 {
293 sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree)); 295 sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree));
294 gtk_tree_selection_selected_foreach(sel, add_selected_row_to_list, &list); 296 gtk_tree_selection_selected_foreach(sel, add_selected_row_to_list, &list);
295 297
296 g_slist_foreach(list, remove_row, NULL); 298 g_slist_foreach(list, remove_row, NULL);
297 g_slist_free(list); 299 g_slist_free(list);
300
301 save_list();
298 } 302 }
299 303
300 static void save_list() 304 static void save_list()
301 { 305 {
302 FILE *f; 306 FILE *f;