2008-08-26 [colin] 3.5.0cvs74
authorColin Leroy <colin@colino.net>
Tue, 26 Aug 2008 09:31:35 +0000 (09:31 +0000)
committerColin Leroy <colin@colino.net>
Tue, 26 Aug 2008 09:31:35 +0000 (09:31 +0000)
* src/gtk/gtkcmctree.c
Fix missing inits on old glib

ChangeLog
PATCHSETS
configure.ac
src/gtk/gtkcmctree.c

index 68f6e9c..cd93c14 100644 (file)
--- 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
 2008-08-26 [wwp]       3.5.0cvs73
 
        * src/common/utils.c
index 4846587..6334c21 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( 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.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
index a10b11b..00f88ec 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=5
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=73
+EXTRA_VERSION=74
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 5ba1d07..af72598 100644 (file)
@@ -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 */
   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));
       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);
       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));
       break;
     case ARG_INDENT:
       gtk_cmctree_set_indent (ctree, g_value_get_uint (value));