commit 64102792936026d283525be65ff9335f1e0b03a8
parent 8270f8f05380bd654fa6e7a20676c6e46485a27d
Author: Colin Leroy <colin@colino.net>
Date: Tue, 26 Aug 2008 09:31:35 +0000
2008-08-26 [colin] 3.5.0cvs74
* src/gtk/gtkcmctree.c
Fix missing inits on old glib
Diffstat:
4 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,8 @@
+2008-08-26 [colin] 3.5.0cvs74
+
+ * src/gtk/gtkcmctree.c
+ Fix missing inits on old glib
+
2008-08-26 [wwp] 3.5.0cvs73
* src/common/utils.c
diff --git a/PATCHSETS b/PATCHSETS
@@ -3485,3 +3485,4 @@
( cvs diff -u -r 1.1.2.3 -r 1.1.2.4 src/gtk/gtkcmctree.c; ) > 3.5.0cvs71.patchset
( cvs diff -u -r 1.1.2.23 -r 1.1.2.24 src/image_viewer.c; ) > 3.5.0cvs72.patchset
( cvs diff -u -r 1.36.2.143 -r 1.36.2.144 src/common/utils.c; ) > 3.5.0cvs73.patchset
+( cvs diff -u -r 1.1.2.4 -r 1.1.2.5 src/gtk/gtkcmctree.c; ) > 3.5.0cvs74.patchset
diff --git a/configure.ac b/configure.ac
@@ -11,7 +11,7 @@ MINOR_VERSION=5
MICRO_VERSION=0
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=73
+EXTRA_VERSION=74
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
diff --git a/src/gtk/gtkcmctree.c b/src/gtk/gtkcmctree.c
@@ -681,12 +681,30 @@ gtk_cmctree_set_arg (GObject *object,
switch (arg_id)
{
case ARG_N_COLUMNS: /* construct-only arg, only set at construction time */
+#if !GLIB_CHECK_VERSION(2,10,0)
+ g_return_if_fail (clist->row_mem_chunk == NULL);
+#endif
clist->columns = MAX (1, g_value_get_uint (value));
+#if !GLIB_CHECK_VERSION(2,10,0)
+ clist->row_mem_chunk = g_mem_chunk_new ("ctree row mem chunk",
+ sizeof (GtkCMCTreeRow),
+ sizeof (GtkCMCTreeRow)
+ * CLIST_OPTIMUM_SIZE,
+ G_ALLOC_AND_FREE);
+ clist->cell_mem_chunk = g_mem_chunk_new ("ctree cell mem chunk",
+ sizeof (GtkCMCell) * clist->columns,
+ sizeof (GtkCMCell) * clist->columns
+ * CLIST_OPTIMUM_SIZE,
+ G_ALLOC_AND_FREE);
+#endif
ctree->tree_column = CLAMP (ctree->tree_column, 0, clist->columns);
break;
case ARG_TREE_COLUMN: /* construct-only arg, only set at construction time */
ctree->tree_column = g_value_get_uint (value);
- ctree->tree_column = CLAMP (ctree->tree_column, 0, clist->columns);
+#if !GLIB_CHECK_VERSION(2,10,0)
+ if (clist->row_mem_chunk)
+#endif
+ ctree->tree_column = CLAMP (ctree->tree_column, 0, clist->columns);
break;
case ARG_INDENT:
gtk_cmctree_set_indent (ctree, g_value_get_uint (value));