Mercurial > dwindows
comparison dwtest.c @ 1791:ed8851658015
Set status text fields in the test program to auto height... because they were too small on Mac.... this caused me to notice a bug in the calculation of (status) text widgets when the text is empty; this also contains a fix for that bug.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sun, 05 Aug 2012 13:02:39 +0000 |
parents | c5ea64e8b436 |
children | 9304241b7b33 |
comparison
equal
deleted
inserted
replaced
1790:209c57a14b09 | 1791:ed8851658015 |
---|---|
1006 dw_box_pack_start( notebookbox2, pagebox, 0, 0, TRUE, TRUE, 0); | 1006 dw_box_pack_start( notebookbox2, pagebox, 0, 0, TRUE, TRUE, 0); |
1007 /* now a status area under this box */ | 1007 /* now a status area under this box */ |
1008 hbox = dw_box_new(DW_HORZ, 1 ); | 1008 hbox = dw_box_new(DW_HORZ, 1 ); |
1009 dw_box_pack_start( notebookbox2, hbox, 100, 20, TRUE, FALSE, 1); | 1009 dw_box_pack_start( notebookbox2, hbox, 100, 20, TRUE, FALSE, 1); |
1010 status1 = dw_status_text_new("", 0); | 1010 status1 = dw_status_text_new("", 0); |
1011 dw_box_pack_start( hbox, status1, 100, 20, TRUE, FALSE, 1); | 1011 dw_box_pack_start( hbox, status1, 100, -1, TRUE, FALSE, 1); |
1012 status2 = dw_status_text_new("", 0); | 1012 status2 = dw_status_text_new("", 0); |
1013 dw_box_pack_start( hbox, status2, 100, 20, TRUE, FALSE, 1); | 1013 dw_box_pack_start( hbox, status2, 100, -1, TRUE, FALSE, 1); |
1014 /* a box with combobox and button */ | 1014 /* a box with combobox and button */ |
1015 hbox = dw_box_new(DW_HORZ, 1 ); | 1015 hbox = dw_box_new(DW_HORZ, 1 ); |
1016 dw_box_pack_start( notebookbox2, hbox, 100, 25, TRUE, FALSE, 1); | 1016 dw_box_pack_start( notebookbox2, hbox, 100, 25, TRUE, FALSE, 1); |
1017 rendcombo = dw_combobox_new( "Shapes Double Buffered", 0 ); | 1017 rendcombo = dw_combobox_new( "Shapes Double Buffered", 0 ); |
1018 dw_box_pack_start( hbox, rendcombo, 80, 25, TRUE, FALSE, 0); | 1018 dw_box_pack_start( hbox, rendcombo, 80, 25, TRUE, FALSE, 0); |
1132 tree = dw_tree_new(101); | 1132 tree = dw_tree_new(101); |
1133 dw_box_pack_start( notebookbox3, tree, 500, 200, TRUE, TRUE, 1); | 1133 dw_box_pack_start( notebookbox3, tree, 500, 200, TRUE, TRUE, 1); |
1134 | 1134 |
1135 /* and a status area to see whats going on */ | 1135 /* and a status area to see whats going on */ |
1136 tree_status = dw_status_text_new("", 0); | 1136 tree_status = dw_status_text_new("", 0); |
1137 dw_box_pack_start( notebookbox3, tree_status, 100, 20, TRUE, FALSE, 1); | 1137 dw_box_pack_start( notebookbox3, tree_status, 100, -1, TRUE, FALSE, 1); |
1138 | 1138 |
1139 /* set up our signal trappers... */ | 1139 /* set up our signal trappers... */ |
1140 dw_signal_connect(tree, DW_SIGNAL_ITEM_CONTEXT, DW_SIGNAL_FUNC(item_context_cb), DW_POINTER(tree_status)); | 1140 dw_signal_connect(tree, DW_SIGNAL_ITEM_CONTEXT, DW_SIGNAL_FUNC(item_context_cb), DW_POINTER(tree_status)); |
1141 dw_signal_connect(tree, DW_SIGNAL_ITEM_SELECT, DW_SIGNAL_FUNC(item_select_cb), DW_POINTER(tree_status)); | 1141 dw_signal_connect(tree, DW_SIGNAL_ITEM_SELECT, DW_SIGNAL_FUNC(item_select_cb), DW_POINTER(tree_status)); |
1142 | 1142 |
1173 container = dw_container_new(100, TRUE); | 1173 container = dw_container_new(100, TRUE); |
1174 dw_box_pack_start( notebookbox4, container, 500, 200, TRUE, FALSE, 1); | 1174 dw_box_pack_start( notebookbox4, container, 500, 200, TRUE, FALSE, 1); |
1175 | 1175 |
1176 /* and a status area to see whats going on */ | 1176 /* and a status area to see whats going on */ |
1177 container_status = dw_status_text_new("", 0); | 1177 container_status = dw_status_text_new("", 0); |
1178 dw_box_pack_start( notebookbox4, container_status, 100, 20, TRUE, FALSE, 1); | 1178 dw_box_pack_start( notebookbox4, container_status, 100, -1, TRUE, FALSE, 1); |
1179 | 1179 |
1180 titles[0] = "Type"; | 1180 titles[0] = "Type"; |
1181 titles[1] = "Size"; | 1181 titles[1] = "Size"; |
1182 titles[2] = "Time"; | 1182 titles[2] = "Time"; |
1183 titles[3] = "Date"; | 1183 titles[3] = "Date"; |