Mercurial > pidgin.yaz
comparison src/gtkrequest.c @ 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 | 957c1d28b96a |
comparison
equal
deleted
inserted
replaced
6334:930708df05dd | 6335:ea47bddc7376 |
---|---|
419 GtkWidget *hbox; | 419 GtkWidget *hbox; |
420 GtkWidget *bbox; | 420 GtkWidget *bbox; |
421 GtkWidget *frame; | 421 GtkWidget *frame; |
422 GtkWidget *label; | 422 GtkWidget *label; |
423 GtkWidget *table; | 423 GtkWidget *table; |
424 GtkWidget *sep; | 424 /* GtkWidget *sep; */ |
425 GtkWidget *button; | 425 GtkWidget *button; |
426 GtkWidget *img; | 426 GtkWidget *img; |
427 GtkSizeGroup *sg; | 427 GtkSizeGroup *sg; |
428 GList *gl, *fl; | 428 GList *gl, *fl; |
429 GaimRequestFieldGroup *group; | 429 GaimRequestFieldGroup *group; |
563 } | 563 } |
564 | 564 |
565 if (type == GAIM_REQUEST_FIELD_STRING) { | 565 if (type == GAIM_REQUEST_FIELD_STRING) { |
566 const char *value; | 566 const char *value; |
567 | 567 |
568 widget = gtk_entry_new(); | |
569 | |
570 value = gaim_request_field_string_get_default_value(field); | 568 value = gaim_request_field_string_get_default_value(field); |
571 | 569 |
572 if (value != NULL) | 570 if (gaim_request_field_string_is_multiline(field)) { |
573 gtk_entry_set_text(GTK_ENTRY(widget), value); | 571 widget = gtk_text_view_new(); |
572 | |
573 if (value != NULL) { | |
574 GtkTextBuffer *buffer; | |
575 | |
576 buffer = gtk_text_view_get_buffer( | |
577 GTK_TEXT_VIEW(widget)); | |
578 | |
579 gtk_text_buffer_set_text(buffer, value, -1); | |
580 } | |
581 } | |
582 else { | |
583 widget = gtk_entry_new(); | |
584 | |
585 if (value != NULL) | |
586 gtk_entry_set_text(GTK_ENTRY(widget), value); | |
587 } | |
574 | 588 |
575 g_signal_connect(G_OBJECT(widget), "focus-out-event", | 589 g_signal_connect(G_OBJECT(widget), "focus-out-event", |
576 G_CALLBACK(field_string_focus_out_cb), | 590 G_CALLBACK(field_string_focus_out_cb), |
577 field); | 591 field); |
578 } | 592 } |