aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ephy-node.c10
-rw-r--r--lib/ephy-node.h2
-rw-r--r--lib/widgets/ephy-tree-model-node.c12
3 files changed, 14 insertions, 10 deletions
diff --git a/lib/ephy-node.c b/lib/ephy-node.c
index aaea35ef2..91110b565 100644
--- a/lib/ephy-node.c
+++ b/lib/ephy-node.c
@@ -122,7 +122,7 @@ callback (long id, EphyNodeSignalData *data, gpointer *user_data)
switch (data->type)
{
- case EPHY_NODE_DESTROYED:
+ case EPHY_NODE_DESTROY:
case EPHY_NODE_RESTORED:
data->callback (data->node, data->data);
break;
@@ -281,6 +281,12 @@ ephy_node_dispose (EphyNode *node)
{
guint i;
+ write_lock_to_read_lock (node);
+
+ ephy_node_emit_signal (node, EPHY_NODE_DESTROY);
+
+ read_lock_to_write_lock (node);
+
lock_gdk ();
/* remove from DAG */
@@ -302,8 +308,6 @@ ephy_node_dispose (EphyNode *node)
g_static_rw_lock_writer_unlock (node->lock);
- ephy_node_emit_signal (node, EPHY_NODE_DESTROYED);
-
g_hash_table_foreach (node->signals,
(GHFunc) unref_signal_objects,
node);
diff --git a/lib/ephy-node.h b/lib/ephy-node.h
index 5a6853f4e..a473c9abb 100644
--- a/lib/ephy-node.h
+++ b/lib/ephy-node.h
@@ -30,7 +30,7 @@ typedef struct EphyNode EphyNode;
typedef enum
{
- EPHY_NODE_DESTROYED, /* RBNode *node */
+ EPHY_NODE_DESTROY, /* RBNode *node */
EPHY_NODE_RESTORED, /* RBNode *node */
EPHY_NODE_CHILD_ADDED, /* RBNode *node, RBNode *child */
EPHY_NODE_CHILD_CHANGED, /* RBNode *node, RBNode *child */
diff --git a/lib/widgets/ephy-tree-model-node.c b/lib/widgets/ephy-tree-model-node.c
index cf92167d2..563853016 100644
--- a/lib/widgets/ephy-tree-model-node.c
+++ b/lib/widgets/ephy-tree-model-node.c
@@ -80,8 +80,8 @@ static void root_children_reordered_cb (EphyNode *node,
static inline void ephy_tree_model_node_update_node (EphyTreeModelNode *model,
EphyNode *node,
int idx);
-static void root_destroyed_cb (EphyNode *node,
- EphyTreeModelNode *model);
+static void root_destroy_cb (EphyNode *node,
+ EphyTreeModelNode *model);
static inline GtkTreePath *get_path_real (EphyTreeModelNode *model,
EphyNode *node);
@@ -267,8 +267,8 @@ ephy_tree_model_node_set_property (GObject *object,
(EphyNodeCallback) root_children_reordered_cb,
G_OBJECT (model));
ephy_node_signal_connect_object (model->priv->root,
- EPHY_NODE_DESTROYED,
- (EphyNodeCallback) root_destroyed_cb,
+ EPHY_NODE_DESTROY,
+ (EphyNodeCallback) root_destroy_cb,
G_OBJECT (model));
break;
@@ -726,8 +726,8 @@ root_children_reordered_cb (EphyNode *node,
}
static void
-root_destroyed_cb (EphyNode *node,
- EphyTreeModelNode *model)
+root_destroy_cb (EphyNode *node,
+ EphyTreeModelNode *model)
{
model->priv->root = NULL;