comparison gtk3/dw.c @ 1126:72a36ef67291

Allow GTK3 support to compile with GTK 3.0 but warn that full support requires 3.1.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 30 Aug 2011 07:29:30 +0000
parents 95d7eb4e85c6
children ed7cbdc37a75
comparison
equal deleted inserted replaced
1125:95d7eb4e85c6 1126:72a36ef67291
8109 /* Add to the grid using insert... 8109 /* Add to the grid using insert...
8110 * rows for vertical boxes and columns for horizontal. 8110 * rows for vertical boxes and columns for horizontal.
8111 */ 8111 */
8112 if(boxtype == DW_VERT) 8112 if(boxtype == DW_VERT)
8113 { 8113 {
8114 #if GTK_CHECK_VERSION(3,1,0)
8114 gtk_grid_insert_row(GTK_GRID(box), index); 8115 gtk_grid_insert_row(GTK_GRID(box), index);
8116 #else
8117 #warning Dynamic Windows GTK3 support requires 3.1 or higher for full support.
8118 #endif
8115 gtk_grid_attach(GTK_GRID(box), item, 0, index, 1, 1); 8119 gtk_grid_attach(GTK_GRID(box), item, 0, index, 1, 1);
8116 } 8120 }
8117 else 8121 else
8118 { 8122 {
8123 #if GTK_CHECK_VERSION(3,1,0)
8119 gtk_grid_insert_column(GTK_GRID(box), index); 8124 gtk_grid_insert_column(GTK_GRID(box), index);
8125 #endif
8120 gtk_grid_attach(GTK_GRID(box), item, index, 0, 1, 1); 8126 gtk_grid_attach(GTK_GRID(box), item, index, 0, 1, 1);
8121 } 8127 }
8122 g_object_set_data(G_OBJECT(box), "_dw_boxcount", GINT_TO_POINTER(boxcount + 1)); 8128 g_object_set_data(G_OBJECT(box), "_dw_boxcount", GINT_TO_POINTER(boxcount + 1));
8123 /* Set the requested size of the widget */ 8129 /* Set the requested size of the widget */
8124 if(GTK_IS_SCROLLED_WINDOW(item)) 8130 if(GTK_IS_SCROLLED_WINDOW(item))