Mercurial > pidgin
diff src/gtkrequest.c @ 10627:57589eb36449
[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 <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Wed, 23 Feb 2005 02:36:51 +0000 |
parents | 56d4460bb6bd |
children | aafe8f30b826 |
line wrap: on
line diff
--- 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,