? gtk+.kdevprj
? gtk+.kdevses
? temp.patch
? treemodel_marshaller.patch
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtk+/ChangeLog,v
retrieving revision 1.4688
diff -u -p -r1.4688 ChangeLog
--- ChangeLog	7 Dec 2003 22:53:21 -0000	1.4688
+++ ChangeLog	8 Dec 2003 00:12:31 -0000
@@ -1,3 +1,12 @@
+2003-12-07  Murray Cumming  <murrayc@usa.net>
+
+	* gtk/gtktreemodel.c:
+	(row_inserted_marshal, row_deleted_marshal, rows_reorderered_marshal)
+	Actually call the default signal handlers instead of calling the
+	marshallers themselves in an endless loop. These default signal handler
+	callbacks are not actually set so this is only noticed by gtkmm at
+	the moment.
+
 Sun Dec  7 23:45:40 2003  Matthias Clasen  <maclas@gmx.de>
 
 	* gtk/gtkicontheme.c (gtk_icon_theme_has_icon): Don't crash if
Index: gtk/gtktreemodel.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtktreemodel.c,v
retrieving revision 1.106
diff -u -p -r1.106 gtktreemodel.c
--- gtk/gtktreemodel.c	16 Aug 2003 14:39:33 -0000	1.106
+++ gtk/gtktreemodel.c	8 Dec 2003 00:12:33 -0000
@@ -206,25 +206,28 @@ row_inserted_marshal (GClosure          
                       gpointer           marshal_data)
 {
   GtkTreeModelIface *iface;
-  gpointer callback;
+
+  void (* row_inserted_callback) (GtkTreeModel *tree_model,
+                                  GtkTreePath *path,
+                                  GtkTreeIter *iter) = 0;
+            
   GObject *model = g_value_get_object (param_values + 0);
+  GtkTreePath *path = (GtkTreePath *)g_value_get_boxed (param_values + 1);
+  GtkTreeIter *iter = (GtkTreeIter *)g_value_get_boxed (param_values + 2);
 
   /* first, we need to update internal row references */
   gtk_tree_row_ref_inserted ((RowRefList *)g_object_get_data (model, ROW_REF_DATA_STRING),
-                             (GtkTreePath *)g_value_get_boxed (param_values + 1),
-                             (GtkTreeIter *)g_value_get_boxed (param_values + 2));
-
+                             path, iter);
+                               
   /* fetch the interface ->row_inserted implementation */
   iface = GTK_TREE_MODEL_GET_IFACE (model);
-  callback = G_STRUCT_MEMBER (gpointer, iface,
+  row_inserted_callback = G_STRUCT_MEMBER (gpointer, iface,
                               G_STRUCT_OFFSET (GtkTreeModelIface,
                                                row_inserted));
-  if (callback)
-    closure->marshal (closure,
-                      return_value,
-                      n_param_values, param_values,
-                      invocation_hint,
-                      callback);
+
+  /* Call that default signal handler, it if has been set */                                                         
+  if (row_inserted_callback)
+    row_inserted_callback (GTK_TREE_MODEL (model), path, iter);
 }
 
 static void
@@ -236,24 +239,25 @@ row_deleted_marshal (GClosure          *
                      gpointer           marshal_data)
 {
   GtkTreeModelIface *iface;
-  gpointer callback;
+  void (* row_deleted_callback) (GtkTreeModel *tree_model,
+                                 GtkTreePath  *path) = 0;                                 
   GObject *model = g_value_get_object (param_values + 0);
+  GtkTreePath *path = (GtkTreePath *)g_value_get_boxed (param_values + 1);
+ 
 
   /* first, we need to update internal row references */
   gtk_tree_row_ref_deleted ((RowRefList *)g_object_get_data (model, ROW_REF_DATA_STRING),
-                            (GtkTreePath *)g_value_get_boxed (param_values + 1));
+                            path);
 
-  /* emit signal */
+  /* fetch the interface ->row_deleted implementation */
   iface = GTK_TREE_MODEL_GET_IFACE (model);
-  callback = G_STRUCT_MEMBER (gpointer, iface,
+  row_deleted_callback = G_STRUCT_MEMBER (gpointer, iface,
                               G_STRUCT_OFFSET (GtkTreeModelIface,
                                                row_deleted));
-  if (callback)
-    closure->marshal (closure,
-                      return_value,
-                      n_param_values, param_values,
-                      invocation_hint,
-                      callback);
+                              
+  /* Call that default signal handler, it if has been set */
+  if (row_deleted_callback)
+    row_deleted_callback (GTK_TREE_MODEL (model), path);
 }
 
 static void
@@ -265,26 +269,29 @@ rows_reordered_marshal (GClosure        
                         gpointer           marshal_data)
 {
   GtkTreeModelIface *iface;
-  gpointer callback;
+  void (* rows_reordered_callback) (GtkTreeModel *tree_model,
+                                    GtkTreePath  *path,
+                                    GtkTreeIter  *iter,
+                                    gint         *new_order);
+            
   GObject *model = g_value_get_object (param_values + 0);
-
+  GtkTreePath *path = (GtkTreePath *)g_value_get_boxed (param_values + 1);
+  GtkTreeIter *iter = (GtkTreeIter *)g_value_get_boxed (param_values + 2);
+  gint *new_order = (gint *)g_value_get_pointer (param_values + 3);
+  
   /* first, we need to update internal row references */
   gtk_tree_row_ref_reordered ((RowRefList *)g_object_get_data (model, ROW_REF_DATA_STRING),
-                              (GtkTreePath *)g_value_get_boxed (param_values + 1),
-                              (GtkTreeIter *)g_value_get_boxed (param_values + 2),
-                              (gint *)g_value_get_pointer (param_values + 3));
+                              path, iter, new_order);
 
-  /* emit signal */
+  /* fetch the interface ->rows_reordered implementation */
   iface = GTK_TREE_MODEL_GET_IFACE (model);
-  callback = G_STRUCT_MEMBER (gpointer, iface,
+  rows_reordered_callback = G_STRUCT_MEMBER (gpointer, iface,
                               G_STRUCT_OFFSET (GtkTreeModelIface,
                                                rows_reordered));
-  if (callback)
-    closure->marshal (closure,
-                      return_value,
-                      n_param_values, param_values,
-                      invocation_hint,
-                      callback);
+
+  /* Call that default signal handler, it if has been set */
+  if (rows_reordered_callback)
+    rows_reordered_callback (GTK_TREE_MODEL (model), path, iter, new_order);
 }
 
 /**
