diff options
author | Marco Pesenti Gritti <marco@it.gnome.org> | 2003-05-27 03:02:39 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <mpeseng@src.gnome.org> | 2003-05-27 03:02:39 +0800 |
commit | 5ff8f7cb898f02ddf1f2dfe0370e90c1c8d3e061 (patch) | |
tree | f1a60e760e06a39a3966e301fc520e90aed00263 /lib | |
parent | 70183cca32190c0d2b038441c01bd927e11b8148 (diff) | |
download | gsoc2013-epiphany-5ff8f7cb898f02ddf1f2dfe0370e90c1c8d3e061.tar gsoc2013-epiphany-5ff8f7cb898f02ddf1f2dfe0370e90c1c8d3e061.tar.gz gsoc2013-epiphany-5ff8f7cb898f02ddf1f2dfe0370e90c1c8d3e061.tar.bz2 gsoc2013-epiphany-5ff8f7cb898f02ddf1f2dfe0370e90c1c8d3e061.tar.lz gsoc2013-epiphany-5ff8f7cb898f02ddf1f2dfe0370e90c1c8d3e061.tar.xz gsoc2013-epiphany-5ff8f7cb898f02ddf1f2dfe0370e90c1c8d3e061.tar.zst gsoc2013-epiphany-5ff8f7cb898f02ddf1f2dfe0370e90c1c8d3e061.zip |
s/DESTROYED/DESTROY which is more useulf
2003-05-26 Marco Pesenti Gritti <marco@it.gnome.org>
* lib/ephy-node.c: (callback), (ephy_node_dispose):
* lib/ephy-node.h:
s/DESTROYED/DESTROY which is more useulf
* lib/widgets/ephy-tree-model-node.c:
(ephy_tree_model_node_set_property), (root_destroy_cb):
* src/bookmarks/ephy-bookmarks-editor.c:
(ephy_bookmarks_editor_update_menu):
* src/bookmarks/ephy-bookmarks.c: (ephy_bookmarks_init_defaults),
(ephy_bookmarks_set_toolbars_model), (ephy_bookmarks_set_property),
(ephy_bookmarks_get_property), (ephy_bookmarks_class_init),
(bookmarks_removed_cb), (topics_removed_cb), (ephy_bookmarks_init),
(ephy_bookmarks_finalize):
* src/ephy-shell.c: (ephy_shell_get_toolbars_model):
* src/ephy-toolbars-model.c: (impl_add_item),
(ephy_toolbars_model_set_bookmarks),
(ephy_toolbars_model_set_property),
(ephy_toolbars_model_get_property),
(ephy_toolbars_model_class_init), (ephy_toolbars_model_init),
(ephy_toolbars_model_finalize), (ephy_toolbars_model_new):
* src/ephy-toolbars-model.h:
* src/toolbar.c: (topic_destroy_cb), (bookmark_destroy_cb),
(toolbar_ensure_action), (toolbar_init):
Better way to remove unrefed bookmarks from the toolbar.
Ref bookmarks in toolbars model and weak reaf toolbars model
in bookmarks. So setting defaults really works.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ephy-node.c | 10 | ||||
-rw-r--r-- | lib/ephy-node.h | 2 | ||||
-rw-r--r-- | lib/widgets/ephy-tree-model-node.c | 12 |
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; |