changeset 2257:eae25a0309c1

[gaim-migrate @ 2267] eyh luuve to leek you all uuver uur bohdee. sorry. i had to put "leek" in there and i already used "leek soup". and one of my co-workers is french. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Mon, 10 Sep 2001 17:09:46 +0000
parents 73872bedf07e
children a8232c7dafa9
files src/aim.c src/buddy_chat.c
diffstat 2 files changed, 11 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/aim.c	Mon Sep 10 17:03:39 2001 +0000
+++ b/src/aim.c	Mon Sep 10 17:09:46 2001 +0000
@@ -190,7 +190,7 @@
 
 	while (usr) {
 		u = (struct aim_user *)usr->data;
-		tmp = g_list_append(tmp, g_strdup(u->username));
+		tmp = g_list_append(tmp, u->username);
 		usr = usr->next;
 	}
 
@@ -221,6 +221,8 @@
 	GtkStyle *style;
 	GdkBitmap *mask;
 
+	GList *tmp;
+
 	if (mainwindow) {
 		gtk_widget_show(mainwindow);
 		return;
@@ -254,7 +256,9 @@
 	gtk_widget_show(label);
 
 	name = gtk_combo_new();
-	gtk_combo_set_popdown_strings(GTK_COMBO(name), combo_user_names());
+	tmp = combo_user_names();
+	gtk_combo_set_popdown_strings(GTK_COMBO(name), tmp);
+	g_list_free(tmp);
 	gtk_signal_connect(GTK_OBJECT(GTK_COMBO(name)->entry), "activate",
 			   GTK_SIGNAL_FUNC(doenter), mainwindow);
 	gtk_signal_connect(GTK_OBJECT(GTK_COMBO(name)->entry), "changed",
--- a/src/buddy_chat.c	Mon Sep 10 17:03:39 2001 +0000
+++ b/src/buddy_chat.c	Mon Sep 10 17:09:46 2001 +0000
@@ -316,7 +316,10 @@
 	struct group *g;
 	struct buddy *buddy;
 	
-	GList *tmp = NULL;
+	static GList *tmp = NULL;
+
+	if (tmp)
+		g_list_free(tmp);
 
 	tmp = g_list_append(tmp, "");
 
@@ -332,7 +335,7 @@
 				buddy = (struct buddy *)bl->data;
 
 				if (buddy->present)
-					tmp = g_list_append(tmp, g_strdup(buddy->name));
+					tmp = g_list_append(tmp, buddy->name);
 
 				bl = g_slist_next(bl);
 			}	
@@ -352,7 +355,6 @@
 	GtkWidget *label;
 	GtkWidget *bbox;
 	GtkWidget *vbox;
-	GtkWidget *topbox;
 	GtkWidget *table;
 	GtkWidget *frame;
 	
@@ -374,7 +376,6 @@
 		gtk_container_set_border_width(GTK_CONTAINER(frame), 5);
 		
 		/* Now we should fill out all of the names */ 
-		/* FIXME: Does this cause a leak? */
 		gtk_combo_set_popdown_strings(GTK_COMBO(inviteentry), generate_invite_user_names(b->gc));
 
 		if (display_options & OPT_DISP_COOL_LOOK) {