Mercurial > pidgin
comparison src/gtkrequest.c @ 7921:c3dc33bb94dc
[gaim-migrate @ 8589]
as twisted as this seems, it does seem to work
committer: Tailor Script <tailor@pidgin.im>
| author | Nathan Walp <nwalp@pidgin.im> |
|---|---|
| date | Tue, 23 Dec 2003 15:53:13 +0000 |
| parents | 5be22af4ebfc |
| children | 1fb7a840b5c7 |
comparison
equal
deleted
inserted
replaced
| 7920:74b03db5ba4f | 7921:c3dc33bb94dc |
|---|---|
| 810 cols++; | 810 cols++; |
| 811 } | 811 } |
| 812 else | 812 else |
| 813 rows = field_count; | 813 rows = field_count; |
| 814 | 814 |
| 815 col_num=0; | |
| 815 for (fl = field_list; fl != NULL; fl = fl->next) | 816 for (fl = field_list; fl != NULL; fl = fl->next) |
| 816 { | 817 { |
| 817 GaimRequestFieldType type; | 818 GaimRequestFieldType type; |
| 818 | 819 |
| 819 field = (GaimRequestField *)fl->data; | 820 field = (GaimRequestField *)fl->data; |
| 820 | 821 |
| 821 type = gaim_request_field_get_type(field); | 822 type = gaim_request_field_get_type(field); |
| 822 | 823 |
| 823 if (type == GAIM_REQUEST_FIELD_STRING && | 824 if (type == GAIM_REQUEST_FIELD_LABEL) { |
| 824 gaim_request_field_string_is_multiline(field)) | 825 if(col_num > 0) |
| 825 { | 826 rows++; |
| 827 rows++; | |
| 828 } else if(type == GAIM_REQUEST_FIELD_STRING && gaim_request_field_string_is_multiline(field)){ | |
| 829 if(col_num > 0) | |
| 830 rows++; | |
| 826 rows += 2; | 831 rows += 2; |
| 827 } | 832 } |
| 833 | |
| 834 col_num++; | |
| 835 if(col_num >= cols) | |
| 836 col_num=0; | |
| 828 } | 837 } |
| 829 | 838 |
| 830 table = gtk_table_new(rows, 2 * cols, FALSE); | 839 table = gtk_table_new(rows, 2 * cols, FALSE); |
| 831 gtk_table_set_row_spacings(GTK_TABLE(table), 6); | 840 gtk_table_set_row_spacings(GTK_TABLE(table), 6); |
| 832 gtk_table_set_col_spacings(GTK_TABLE(table), 6); | 841 gtk_table_set_col_spacings(GTK_TABLE(table), 6); |
| 870 | 879 |
| 871 if (type == GAIM_REQUEST_FIELD_LABEL || | 880 if (type == GAIM_REQUEST_FIELD_LABEL || |
| 872 (type == GAIM_REQUEST_FIELD_STRING && | 881 (type == GAIM_REQUEST_FIELD_STRING && |
| 873 gaim_request_field_string_is_multiline(field))) | 882 gaim_request_field_string_is_multiline(field))) |
| 874 { | 883 { |
| 884 if(col_num > 0) | |
| 885 row_num++; | |
| 886 | |
| 875 gtk_table_attach_defaults(GTK_TABLE(table), label, | 887 gtk_table_attach_defaults(GTK_TABLE(table), label, |
| 876 0, 2 * cols, | 888 0, 2 * cols, |
| 877 row_num, row_num + 1); | 889 row_num, row_num + 1); |
| 878 | 890 |
| 879 row_num++; | 891 row_num++; |
| 892 col_num=cols; | |
| 880 } | 893 } |
| 881 else | 894 else |
| 882 { | 895 { |
| 883 gtk_table_attach_defaults(GTK_TABLE(table), label, | 896 gtk_table_attach_defaults(GTK_TABLE(table), label, |
| 884 col_offset, col_offset + 1, | 897 col_offset, col_offset + 1, |
