aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2002-06-05 22:37:38 +0800
committerChris Lahey <clahey@src.gnome.org>2002-06-05 22:37:38 +0800
commit4ea52e5e61cbd750f37b07f4aad0c92ede66556c (patch)
tree706cf2e82b5b1f6456903c471a758daf0285bce6
parentefb514d63c2a9e66c366d5ffe13b84932581ec18 (diff)
downloadgsoc2013-evolution-4ea52e5e61cbd750f37b07f4aad0c92ede66556c.tar
gsoc2013-evolution-4ea52e5e61cbd750f37b07f4aad0c92ede66556c.tar.gz
gsoc2013-evolution-4ea52e5e61cbd750f37b07f4aad0c92ede66556c.tar.bz2
gsoc2013-evolution-4ea52e5e61cbd750f37b07f4aad0c92ede66556c.tar.lz
gsoc2013-evolution-4ea52e5e61cbd750f37b07f4aad0c92ede66556c.tar.xz
gsoc2013-evolution-4ea52e5e61cbd750f37b07f4aad0c92ede66556c.tar.zst
gsoc2013-evolution-4ea52e5e61cbd750f37b07f4aad0c92ede66556c.zip
Added debugging printfs.
2002-06-05 Christopher James Lahey <clahey@ximian.com> * e-tree-model.c (d): Added debugging printfs. * e-tree-sorted.c (ets_proxy_node_changed, ets_proxy_node_data_changed, ets_proxy_node_col_changed, ets_proxy_node_inserted): Added a bunch of e_tree_model_no_change signals where appropriate. * e-tree-table-adapter.c (etta_proxy_node_changed): Added an e_table_model_no_change signal where appropriate. svn path=/trunk/; revision=17116
-rw-r--r--widgets/table/e-tree-model.c20
-rw-r--r--widgets/table/e-tree-sorted.c16
-rw-r--r--widgets/table/e-tree-table-adapter.c4
3 files changed, 38 insertions, 2 deletions
diff --git a/widgets/table/e-tree-model.c b/widgets/table/e-tree-model.c
index 13f203974f..725b4f02fd 100644
--- a/widgets/table/e-tree-model.c
+++ b/widgets/table/e-tree-model.c
@@ -42,6 +42,8 @@
#define PARENT_TYPE (gtk_object_get_type())
+#define d(x)
+
static GtkObjectClass *parent_class;
enum {
@@ -212,6 +214,8 @@ e_tree_model_pre_change (ETreeModel *tree_model)
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
+ d(g_print("Emitting pre_change on model 0x%p, a %s.\n", tree_model, gtk_type_name (GTK_OBJECT(tree_model)->klass->type)));
+
gtk_signal_emit (GTK_OBJECT (tree_model),
e_tree_model_signals [PRE_CHANGE]);
}
@@ -231,6 +235,8 @@ e_tree_model_no_change (ETreeModel *tree_model)
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
+ d(g_print("Emitting no_change on model 0x%p, a %s.\n", tree_model, gtk_type_name (GTK_OBJECT(tree_model)->klass->type)));
+
gtk_signal_emit (GTK_OBJECT (tree_model),
e_tree_model_signals [NO_CHANGE]);
}
@@ -250,6 +256,8 @@ e_tree_model_node_changed (ETreeModel *tree_model, ETreePath node)
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
+ d(g_print("Emitting node_changed on model 0x%p, a %s.\n", tree_model, gtk_type_name (GTK_OBJECT(tree_model)->klass->type)));
+
gtk_signal_emit (GTK_OBJECT (tree_model),
e_tree_model_signals [NODE_CHANGED], node);
}
@@ -269,6 +277,8 @@ e_tree_model_node_data_changed (ETreeModel *tree_model, ETreePath node)
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
+ d(g_print("Emitting node_data_changed on model 0x%p, a %s.\n", tree_model, gtk_type_name (GTK_OBJECT(tree_model)->klass->type)));
+
gtk_signal_emit (GTK_OBJECT (tree_model),
e_tree_model_signals [NODE_DATA_CHANGED], node);
}
@@ -288,6 +298,8 @@ e_tree_model_node_col_changed (ETreeModel *tree_model, ETreePath node, int col)
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
+ d(g_print("Emitting node_col_changed on model 0x%p, a %s.\n", tree_model, gtk_type_name (GTK_OBJECT(tree_model)->klass->type)));
+
gtk_signal_emit (GTK_OBJECT (tree_model),
e_tree_model_signals [NODE_COL_CHANGED], node, col);
}
@@ -308,6 +320,8 @@ e_tree_model_node_inserted (ETreeModel *tree_model,
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
+ d(g_print("Emitting node_inserted on model 0x%p, a %s.\n", tree_model, gtk_type_name (GTK_OBJECT(tree_model)->klass->type)));
+
gtk_signal_emit (GTK_OBJECT (tree_model),
e_tree_model_signals [NODE_INSERTED],
parent_node, inserted_node);
@@ -327,6 +341,8 @@ e_tree_model_node_removed (ETreeModel *tree_model, ETreePath parent_node, ETree
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
+ d(g_print("Emitting node_removed on model 0x%p, a %s.\n", tree_model, gtk_type_name (GTK_OBJECT(tree_model)->klass->type)));
+
gtk_signal_emit (GTK_OBJECT (tree_model),
e_tree_model_signals [NODE_REMOVED],
parent_node, removed_node, old_position);
@@ -345,6 +361,8 @@ e_tree_model_node_deleted (ETreeModel *tree_model, ETreePath deleted_node)
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
+ d(g_print("Emitting node_deleted on model 0x%p, a %s.\n", tree_model, gtk_type_name (GTK_OBJECT(tree_model)->klass->type)));
+
gtk_signal_emit (GTK_OBJECT (tree_model),
e_tree_model_signals [NODE_DELETED],
deleted_node);
@@ -363,6 +381,8 @@ e_tree_model_node_request_collapse (ETreeModel *tree_model, ETreePath collapsed
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
+ d(g_print("Emitting node_request_collapse on model 0x%p, a %s.\n", tree_model, gtk_type_name (GTK_OBJECT(tree_model)->klass->type)));
+
gtk_signal_emit (GTK_OBJECT (tree_model),
e_tree_model_signals [NODE_REQUEST_COLLAPSE],
collapsed_node);
diff --git a/widgets/table/e-tree-sorted.c b/widgets/table/e-tree-sorted.c
index 16ee5160eb..7069369a38 100644
--- a/widgets/table/e-tree-sorted.c
+++ b/widgets/table/e-tree-sorted.c
@@ -1024,13 +1024,19 @@ ets_proxy_node_changed (ETreeModel *etm, ETreePath node, ETreeSorted *ets)
}
ets->priv->root = new_path(NULL, node);
e_tree_model_node_changed(E_TREE_MODEL(ets), ets->priv->root);
+ return;
} else {
ETreeSortedPath *path = find_path(ets, node);
if (path) {
free_children(path);
- if (!reposition_path(ets, path))
+ if (!reposition_path(ets, path)) {
e_tree_model_node_changed(E_TREE_MODEL(ets), path);
+ } else {
+ e_tree_model_no_change(E_TREE_MODEL(ets));
+ }
+ } else {
+ e_tree_model_no_change(E_TREE_MODEL(ets));
}
}
}
@@ -1043,6 +1049,8 @@ ets_proxy_node_data_changed (ETreeModel *etm, ETreePath node, ETreeSorted *ets)
if (path) {
if (!reposition_path(ets, path))
e_tree_model_node_data_changed(E_TREE_MODEL(ets), path);
+ else
+ e_tree_model_no_change(E_TREE_MODEL(ets));
} else
e_tree_model_no_change(E_TREE_MODEL(ets));
}
@@ -1058,6 +1066,8 @@ ets_proxy_node_col_changed (ETreeModel *etm, ETreePath node, int col, ETreeSorte
changed = reposition_path(ets, path);
if (!changed)
e_tree_model_node_col_changed(E_TREE_MODEL(ets), path, col);
+ else
+ e_tree_model_no_change(E_TREE_MODEL(ets));
} else
e_tree_model_no_change(E_TREE_MODEL(ets));
}
@@ -1122,7 +1132,11 @@ ets_proxy_node_inserted (ETreeModel *etm, ETreePath parent, ETreePath child, ETr
if (child) {
ets->priv->root = new_path(NULL, child);
e_tree_model_node_inserted(E_TREE_MODEL(ets), NULL, ets->priv->root);
+ } else {
+ e_tree_model_no_change(E_TREE_MODEL(ets));
}
+ } else {
+ e_tree_model_no_change(E_TREE_MODEL(ets));
}
}
diff --git a/widgets/table/e-tree-table-adapter.c b/widgets/table/e-tree-table-adapter.c
index a710c51f65..cd376e40e0 100644
--- a/widgets/table/e-tree-table-adapter.c
+++ b/widgets/table/e-tree-table-adapter.c
@@ -675,8 +675,10 @@ etta_proxy_node_changed (ETreeModel *etm, ETreePath path, ETreeTableAdapter *ett
int old_size;
ETreeTableAdapterNode *node;
- if (row == -1)
+ if (row == -1) {
+ e_table_model_no_change(E_TABLE_MODEL(etta));
return;
+ }
size = array_size_from_path(etta, path);