Mercurial > pidgin.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
10626:06f5cc17cddc | 10627:57589eb36449 |
---|---|
1265 if (col_num > 0) | 1265 if (col_num > 0) |
1266 rows++; | 1266 rows++; |
1267 | 1267 |
1268 rows++; | 1268 rows++; |
1269 } | 1269 } |
1270 else if (type == GAIM_REQUEST_FIELD_STRING && | 1270 else if ((type == GAIM_REQUEST_FIELD_LIST) || |
1271 gaim_request_field_string_is_multiline(field)) | 1271 (type == GAIM_REQUEST_FIELD_STRING && |
1272 gaim_request_field_string_is_multiline(field))) | |
1272 { | 1273 { |
1273 if (col_num > 0) | 1274 if (col_num > 0) |
1274 rows++; | 1275 rows++; |
1275 | 1276 |
1276 rows += 2; | 1277 rows += 2; |
1325 gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); | 1326 gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); |
1326 | 1327 |
1327 gtk_size_group_add_widget(sg, label); | 1328 gtk_size_group_add_widget(sg, label); |
1328 | 1329 |
1329 if (type == GAIM_REQUEST_FIELD_LABEL || | 1330 if (type == GAIM_REQUEST_FIELD_LABEL || |
1331 type == GAIM_REQUEST_FIELD_LIST || | |
1330 (type == GAIM_REQUEST_FIELD_STRING && | 1332 (type == GAIM_REQUEST_FIELD_STRING && |
1331 gaim_request_field_string_is_multiline(field))) | 1333 gaim_request_field_string_is_multiline(field))) |
1332 { | 1334 { |
1333 if(col_num > 0) | 1335 if(col_num > 0) |
1334 row_num++; | 1336 row_num++; |
1373 row_num, row_num + 1, | 1375 row_num, row_num + 1, |
1374 GTK_FILL | GTK_EXPAND, | 1376 GTK_FILL | GTK_EXPAND, |
1375 GTK_FILL | GTK_EXPAND, | 1377 GTK_FILL | GTK_EXPAND, |
1376 5, 0); | 1378 5, 0); |
1377 } | 1379 } |
1378 else if (type != GAIM_REQUEST_FIELD_BOOLEAN) | 1380 else if (type == GAIM_REQUEST_FIELD_LIST) |
1381 { | |
1382 gtk_table_attach(GTK_TABLE(table), widget, | |
1383 0, 2 * cols, | |
1384 row_num, row_num + 1, | |
1385 GTK_FILL | GTK_EXPAND, | |
1386 GTK_FILL | GTK_EXPAND, | |
1387 5, 0); | |
1388 } | |
1389 else if (type == GAIM_REQUEST_FIELD_BOOLEAN) | |
1379 { | 1390 { |
1380 gtk_table_attach(GTK_TABLE(table), widget, | 1391 gtk_table_attach(GTK_TABLE(table), widget, |
1381 col_offset + 1, col_offset + 2, | 1392 col_offset, col_offset + 1, |
1382 row_num, row_num + 1, | 1393 row_num, row_num + 1, |
1383 GTK_FILL | GTK_EXPAND, | 1394 GTK_FILL | GTK_EXPAND, |
1384 GTK_FILL | GTK_EXPAND, | 1395 GTK_FILL | GTK_EXPAND, |
1385 5, 0); | 1396 5, 0); |
1386 } | 1397 } |
1387 else | 1398 else |
1388 { | 1399 { |
1389 gtk_table_attach(GTK_TABLE(table), widget, | 1400 gtk_table_attach(GTK_TABLE(table), widget, |
1390 col_offset, col_offset + 1, | 1401 1, 2 * cols, |
1391 row_num, row_num + 1, | 1402 row_num, row_num + 1, |
1392 GTK_FILL | GTK_EXPAND, | 1403 GTK_FILL | GTK_EXPAND, |
1393 GTK_FILL | GTK_EXPAND, | 1404 GTK_FILL | GTK_EXPAND, |
1394 5, 0); | 1405 5, 0); |
1395 } | 1406 } |