Mercurial > pidgin
comparison src/gtkrequest.c @ 6324:01ce15fb27eb
[gaim-migrate @ 6823]
A few multi-field request fixes on the UI side. Labels with underscores in
them are now interpreted as accelerator keys. The separator between the
fields and buttons are now removed. Groups with a NULL title no longer
appear indented or have a nasty "(null)" title appearing. More to come.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Tue, 29 Jul 2003 05:30:16 +0000 |
parents | d1d8e70cf33d |
children | de67cb0dd09d |
comparison
equal
deleted
inserted
replaced
6323:5d7063e137da | 6324:01ce15fb27eb |
---|---|
481 size_t row_num; | 481 size_t row_num; |
482 | 482 |
483 group = gl->data; | 483 group = gl->data; |
484 field_list = gaim_request_field_group_get_fields(group); | 484 field_list = gaim_request_field_group_get_fields(group); |
485 | 485 |
486 frame = gaim_gtk_make_frame(vbox, | 486 if (gaim_request_field_group_get_title(group) != NULL) { |
487 gaim_request_field_group_get_title(group)); | 487 frame = gaim_gtk_make_frame(vbox, |
488 gaim_request_field_group_get_title(group)); | |
489 } | |
490 else { | |
491 frame = vbox; | |
492 } | |
488 | 493 |
489 field_count = g_list_length(field_list); | 494 field_count = g_list_length(field_list); |
490 | 495 |
491 if (field_count > 9) { | 496 if (field_count > 9) { |
492 rows = field_count / 2; | 497 rows = field_count / 2; |
522 "type = %d (%d)\n", | 527 "type = %d (%d)\n", |
523 type, field->type); | 528 type, field->type); |
524 | 529 |
525 if (type != GAIM_REQUEST_FIELD_BOOLEAN) { | 530 if (type != GAIM_REQUEST_FIELD_BOOLEAN) { |
526 text = g_strdup_printf("%s:", | 531 text = g_strdup_printf("%s:", |
527 gaim_request_field_get_label(field)); | 532 gaim_request_field_get_label(field)); |
528 label = gtk_label_new(text); | 533 |
534 label = gtk_label_new(NULL); | |
535 gtk_label_set_markup_with_mnemonic(GTK_LABEL(label), text); | |
529 g_free(text); | 536 g_free(text); |
530 | 537 |
531 gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); | 538 gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); |
532 | 539 |
533 gtk_size_group_add_widget(sg, label); | 540 gtk_size_group_add_widget(sg, label); |
666 } | 673 } |
667 } | 674 } |
668 | 675 |
669 g_object_unref(sg); | 676 g_object_unref(sg); |
670 | 677 |
678 #if 0 | |
671 /* Separator */ | 679 /* Separator */ |
672 sep = gtk_hseparator_new(); | 680 sep = gtk_hseparator_new(); |
673 gtk_box_pack_start(GTK_BOX(vbox), sep, FALSE, FALSE, 0); | 681 gtk_box_pack_start(GTK_BOX(vbox), sep, FALSE, FALSE, 0); |
674 gtk_widget_show(sep); | 682 gtk_widget_show(sep); |
683 #endif | |
675 | 684 |
676 /* Button box. */ | 685 /* Button box. */ |
677 bbox = gtk_hbutton_box_new(); | 686 bbox = gtk_hbutton_box_new(); |
678 gtk_box_set_spacing(GTK_BOX(bbox), 6); | 687 gtk_box_set_spacing(GTK_BOX(bbox), 6); |
679 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END); | 688 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END); |