# HG changeset patch # User Luke Schierer # Date 1109126211 0 # Node ID 57589eb364497f3160702c849a13195138cb7adb # Parent 06f5cc17cddca7bf1f14fb501b5ccafbb7fd5ea5 [gaim-migrate @ 12102] " Using the request API with only a GAIM_REQUEST_FIELD_LIST would result in a squished tree view for the list (two rows high, but only the width of the scroll-bar buttons wide). This patch adjusts things so that list fields are displayed similarly to multi-line text fields, with the label on top and the field itself stretched to something more sane. Another nice addition would be to make the window resizable, but that's not part of this patch. I didn't do a lot of testing. The request dialogues from idle.c still work fine, so I guess nothing is broken..." --Christopher (siege) O'Brien committer: Tailor Script diff -r 06f5cc17cddc -r 57589eb36449 src/gtkrequest.c --- a/src/gtkrequest.c Wed Feb 23 02:35:51 2005 +0000 +++ b/src/gtkrequest.c Wed Feb 23 02:36:51 2005 +0000 @@ -1267,8 +1267,9 @@ rows++; } - else if (type == GAIM_REQUEST_FIELD_STRING && - gaim_request_field_string_is_multiline(field)) + else if ((type == GAIM_REQUEST_FIELD_LIST) || + (type == GAIM_REQUEST_FIELD_STRING && + gaim_request_field_string_is_multiline(field))) { if (col_num > 0) rows++; @@ -1327,6 +1328,7 @@ gtk_size_group_add_widget(sg, label); if (type == GAIM_REQUEST_FIELD_LABEL || + type == GAIM_REQUEST_FIELD_LIST || (type == GAIM_REQUEST_FIELD_STRING && gaim_request_field_string_is_multiline(field))) { @@ -1375,10 +1377,19 @@ GTK_FILL | GTK_EXPAND, 5, 0); } - else if (type != GAIM_REQUEST_FIELD_BOOLEAN) + else if (type == GAIM_REQUEST_FIELD_LIST) + { + gtk_table_attach(GTK_TABLE(table), widget, + 0, 2 * cols, + row_num, row_num + 1, + GTK_FILL | GTK_EXPAND, + GTK_FILL | GTK_EXPAND, + 5, 0); + } + else if (type == GAIM_REQUEST_FIELD_BOOLEAN) { gtk_table_attach(GTK_TABLE(table), widget, - col_offset + 1, col_offset + 2, + col_offset, col_offset + 1, row_num, row_num + 1, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, @@ -1387,7 +1398,7 @@ else { gtk_table_attach(GTK_TABLE(table), widget, - col_offset, col_offset + 1, + 1, 2 * cols, row_num, row_num + 1, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND,