# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1381257039 0 # Node ID 0f3df50bfc4f584d62eb24fb577193d40fb78585 # Parent fef27d31269642be32dbfd38dfbb64844e2def77 Untested GTK3 change to use the new gtk_grid_remove_*() which were introduced in version 3.10. I don't have 3.10 installed yet, but will test this code soon. These allow me to remove a crude work-around in earlier versions that skipped over empty grid spaces. In 3.10 and later the grid should contract and remove the unused rows/columns. Might need a similar change in dw_box_unpack(). diff -r fef27d312696 -r 0f3df50bfc4f gtk3/dw.c --- a/gtk3/dw.c Wed Sep 11 17:40:21 2013 +0000 +++ b/gtk3/dw.c Tue Oct 08 18:30:39 2013 +0000 @@ -2460,6 +2460,34 @@ { /* Get the number of items in the box... */ int boxcount = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(box), "_dw_boxcount")); +#if GTK_CHECK_VERSION(3,10,0) + int boxtype = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(box), "_dw_boxtype")); + int z; + + /* Figure out where in the grid this widget is and remove that row/column */ + if(boxtype == DW_VERT) + { + for(z=0;z 0) { @@ -8713,6 +8741,7 @@ warn = TRUE; } +#if !GTK_CHECK_VERSION(3,10,0) /* Do some sanity bounds checking */ if(index < 0) index = 0; @@ -8740,6 +8769,7 @@ index++; } } +#endif g_object_set_data(G_OBJECT(item), "_dw_table", box); /* Set the expand attribute on the widgets now instead of the container */ @@ -8892,6 +8922,7 @@ int boxtype = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(box), "_dw_boxtype")); GtkWidget *item; +#if !GTK_CHECK_VERSION(3,10,0) /* Fix the index by taking into account empty cells */ if(boxtype == DW_VERT) { @@ -8915,6 +8946,7 @@ } item = gtk_grid_get_child_at(GTK_GRID(box), index, 0); } +#endif if(boxcount > 0) {