comparison gtk/dw.c @ 1540:282727422698

Default scrolled items to 500x200 on GTK2.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Thu, 12 Jan 2012 18:56:30 +0000
parents 5facb5380944
children 6edf3fce77f2
comparison
equal deleted inserted replaced
1539:b7136c130a66 1540:282727422698
10113 gtk_object_set_data(GTK_OBJECT(item), "_dw_table", box); 10113 gtk_object_set_data(GTK_OBJECT(item), "_dw_table", box);
10114 if(index < boxcount) 10114 if(index < boxcount)
10115 gtk_container_forall(GTK_CONTAINER(box),_rearrange_table, GINT_TO_POINTER(boxtype == DW_VERT ? index : -(index+1))); 10115 gtk_container_forall(GTK_CONTAINER(box),_rearrange_table, GINT_TO_POINTER(boxtype == DW_VERT ? index : -(index+1)));
10116 gtk_table_attach(GTK_TABLE(box), item, x, x + 1, y, y + 1, hsize ? DW_EXPAND : 0, vsize ? DW_EXPAND : 0, pad, pad); 10116 gtk_table_attach(GTK_TABLE(box), item, x, x + 1, y, y + 1, hsize ? DW_EXPAND : 0, vsize ? DW_EXPAND : 0, pad, pad);
10117 gtk_object_set_data(GTK_OBJECT(box), "_dw_boxcount", GINT_TO_POINTER(boxcount + 1)); 10117 gtk_object_set_data(GTK_OBJECT(box), "_dw_boxcount", GINT_TO_POINTER(boxcount + 1));
10118 gtk_widget_set_usize(item, width, height); 10118 {
10119 int thiswidth = width, thisheight = height;
10120
10121 /* If it is a scrolled item and not expandable...
10122 * set the default size to 500x200.
10123 */
10124 if(GTK_IS_SCROLLED_WINDOW(item))
10125 {
10126 if(thiswidth < 1 && !hsize)
10127 thiswidth = 500;
10128 if(thisheight < 1 && !vsize)
10129 thisheight = 200;
10130 }
10131 gtk_widget_set_usize(item, thiswidth, thisheight);
10132 }
10119 if(GTK_IS_RADIO_BUTTON(item)) 10133 if(GTK_IS_RADIO_BUTTON(item))
10120 { 10134 {
10121 GSList *group; 10135 GSList *group;
10122 GtkWidget *groupstart = (GtkWidget *)gtk_object_get_data(GTK_OBJECT(box), "_dw_group"); 10136 GtkWidget *groupstart = (GtkWidget *)gtk_object_get_data(GTK_OBJECT(box), "_dw_group");
10123 10137