diff src/gtkrequest.c @ 7172:895cd1d03efb

[gaim-migrate @ 7740] I added buddy comment support for AIM and ICQ I also fixed a tini memleak in gaim_request_something when using a multiline dialog. I also tried to organize ChangeLog some. I put stuff that I thought normal people would care about the most at the top, and tried to group stuff aimed at plugin authors together, and nearer to the bottom. Feel free to do a better job than me. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 06 Oct 2003 03:21:33 +0000
parents cef309da8793
children 5d0db846c42d
line wrap: on
line diff
--- a/src/gtkrequest.c	Mon Oct 06 02:28:43 2003 +0000
+++ b/src/gtkrequest.c	Mon Oct 06 03:21:33 2003 +0000
@@ -71,6 +71,7 @@
 input_response_cb(GtkDialog *dialog, gint id, GaimGtkRequestData *data)
 {
 	const char *value;
+	char *multiline_value;
 
 	if (data->u.input.multiline) {
 		GtkTextIter start_iter, end_iter;
@@ -80,8 +81,9 @@
 		gtk_text_buffer_get_start_iter(buffer, &start_iter);
 		gtk_text_buffer_get_end_iter(buffer, &end_iter);
 
-		value = gtk_text_buffer_get_text(buffer, &start_iter, &end_iter,
+		multiline_value = gtk_text_buffer_get_text(buffer, &start_iter, &end_iter,
 										 FALSE);
+		value = multiline_value;
 	}
 	else
 		value = gtk_entry_get_text(GTK_ENTRY(data->u.input.entry));
@@ -91,6 +93,9 @@
 	else if (data->cbs[1] != NULL)
 		((GaimRequestInputCb)data->cbs[1])(data->user_data, value);
 
+	if (data->u.input.multiline)
+		g_free(multiline_value);
+
 	gaim_request_close(GAIM_REQUEST_INPUT, data);
 }