changeset 6335:ea47bddc7376

[gaim-migrate @ 6834] Multi-line text fields are now supported in the UI end on multi-field dialogs. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Wed, 30 Jul 2003 03:15:48 +0000
parents 930708df05dd
children aeb8c2119a58
files src/gtkrequest.c
diffstat 1 files changed, 19 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkrequest.c	Wed Jul 30 01:45:31 2003 +0000
+++ b/src/gtkrequest.c	Wed Jul 30 03:15:48 2003 +0000
@@ -421,7 +421,7 @@
 	GtkWidget *frame;
 	GtkWidget *label;
 	GtkWidget *table;
-	GtkWidget *sep;
+	/* GtkWidget *sep; */
 	GtkWidget *button;
 	GtkWidget *img;
 	GtkSizeGroup *sg;
@@ -565,12 +565,26 @@
 				if (type == GAIM_REQUEST_FIELD_STRING) {
 					const char *value;
 
-					widget = gtk_entry_new();
-
 					value = gaim_request_field_string_get_default_value(field);
 
-					if (value != NULL)
-						gtk_entry_set_text(GTK_ENTRY(widget), value);
+					if (gaim_request_field_string_is_multiline(field)) {
+						widget = gtk_text_view_new();
+
+						if (value != NULL) {
+							GtkTextBuffer *buffer;
+							
+							buffer = gtk_text_view_get_buffer(
+								GTK_TEXT_VIEW(widget));
+
+							gtk_text_buffer_set_text(buffer, value, -1);
+						}
+					}
+					else {
+						widget = gtk_entry_new();
+
+						if (value != NULL)
+							gtk_entry_set_text(GTK_ENTRY(widget), value);
+					}
 
 					g_signal_connect(G_OBJECT(widget), "focus-out-event",
 									 G_CALLBACK(field_string_focus_out_cb),