org.guifications.plugins: 35b025d3e1bd2d1e797907af34561d8a385f5515
nosnilmot at guifications.org
nosnilmot at guifications.org
Wed Apr 23 09:45:09 CDT 2008
-----------------------------------------------------------------
Revision: 35b025d3e1bd2d1e797907af34561d8a385f5515
Ancestor: 349867d59688cf5f0be22d20acdd3ffda7ab6e47
Author: nosnilmot at guifications.org
Date: 2008-04-23T14:39:22
Branch: org.guifications.plugins
Modified files:
switchspell/switchspell.c
ChangeLog:
Leak fixes
-----------------------------------------------------------------
This revision's diffstat output:
switchspell.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
-------------- next part --------------
============================================================
--- switchspell/switchspell.c d378a9ce5ff5d1b6e03ca2a91bca7d8adc6338e3
+++ switchspell/switchspell.c 06545759ef818bdca1a398bbde53028b03cc150b
@@ -148,7 +148,7 @@ update_switchspell_selection(PidginConve
{
PidginWindow *win;
GtkWidget *menu;
- GList *item;
+ GList *item, *items;
char *curlang;
if (gtkconv == NULL)
@@ -165,17 +165,20 @@ update_switchspell_selection(PidginConve
curlang = g_strdup(g_object_get_data(G_OBJECT(gtkconv->entry), PROP_LANG));
- g_list_foreach(gtk_container_get_children(GTK_CONTAINER(menu)),
+ items = gtk_container_get_children(GTK_CONTAINER(menu));
+ g_list_foreach(items,
(GFunc)gtk_check_menu_item_set_active, GINT_TO_POINTER(FALSE));
+ g_list_free(items);
- for (item = gtk_container_get_children(GTK_CONTAINER(menu));
- item; item = item->next) {
+ items = gtk_container_get_children(GTK_CONTAINER(menu));
+ for (item = items; item; item = item->next) {
const char *lang = g_object_get_data(G_OBJECT(item->data), "lang");
if (lang && curlang && strcmp(lang, curlang) == 0) {
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item->data), TRUE);
break;
}
}
+ g_list_free(items);
g_free(curlang);
}
More information about the Plugins-commits
mailing list