aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ephy-node.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2004-02-11 22:38:12 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2004-02-11 22:38:12 +0800
commit79ccb3d443d31072de5718da6a3883aa35df9211 (patch)
tree27bba5a8d7442f6a0ae896e5f582721fbb3bc499 /lib/ephy-node.c
parentf842ea4bfff7c63fbc4f21d6c21e2b6ede6d35d0 (diff)
downloadgsoc2013-epiphany-79ccb3d443d31072de5718da6a3883aa35df9211.tar
gsoc2013-epiphany-79ccb3d443d31072de5718da6a3883aa35df9211.tar.gz
gsoc2013-epiphany-79ccb3d443d31072de5718da6a3883aa35df9211.tar.bz2
gsoc2013-epiphany-79ccb3d443d31072de5718da6a3883aa35df9211.tar.lz
gsoc2013-epiphany-79ccb3d443d31072de5718da6a3883aa35df9211.tar.xz
gsoc2013-epiphany-79ccb3d443d31072de5718da6a3883aa35df9211.tar.zst
gsoc2013-epiphany-79ccb3d443d31072de5718da6a3883aa35df9211.zip
Pass the property id to the changed signal.
2004-02-11 Marco Pesenti Gritti <marco@gnome.org> * lib/ephy-node.c: (callback), (child_changed), (ephy_node_set_property): Pass the property id to the changed signal. * lib/ephy-node.h: Cleanup. * embed/ephy-history.c: (hosts_changed_cb), (pages_changed_cb): * lib/widgets/ephy-location-entry.c: (completion_func): * lib/widgets/ephy-tree-model-node.c: (root_child_changed_cb): * src/bookmarks/ephy-bookmark-action.c: (bookmarks_child_changed_cb): * src/bookmarks/ephy-bookmarks-menu.c: (topic_child_changed_cb): * src/bookmarks/ephy-topic-action.c: (topic_child_changed_cb): * src/ephy-completion-model.c: (root_child_changed_cb): * src/ephy-location-action.c: (actions_child_changed_cb): Fixup changed signals signature. * src/bookmarks/ephy-bookmarks.c: (update_bookmark_keywords), (bookmarks_changed_cb), (bookmark_is_categorized), (topics_removed_cb), (ephy_bookmarks_set_keyword), (ephy_bookmarks_unset_keyword): Cleanup keywords building, normalize and case fold it, add the title words as keywords too.
Diffstat (limited to 'lib/ephy-node.c')
-rw-r--r--lib/ephy-node.c35
1 files changed, 31 insertions, 4 deletions
diff --git a/lib/ephy-node.c b/lib/ephy-node.c
index c99ea9a0a..b8d5f8959 100644
--- a/lib/ephy-node.c
+++ b/lib/ephy-node.c
@@ -50,6 +50,12 @@ typedef struct
guint index;
} EphyNodeParent;
+typedef struct
+{
+ EphyNode *node;
+ guint property_id;
+} EphyNodeChange;
+
struct EphyNode
{
int ref_count;
@@ -106,8 +112,25 @@ callback (long id, EphyNodeSignalData *data, gpointer *dummy)
break;
case EPHY_NODE_CHILD_ADDED:
+ {
+ EphyNode *node;
+
+ node = va_arg (valist, EphyNode *);
+
+ data->callback (data->node, node, data->data);
+ }
+ break;
+
case EPHY_NODE_CHILD_CHANGED:
- data->callback (data->node, va_arg (valist, EphyNode *), data->data);
+ {
+ EphyNode *node;
+ guint property_id;
+
+ node = va_arg (valist, EphyNode *);
+ property_id = va_arg (valist, guint);
+
+ data->callback (data->node, node, property_id, data->data);
+ }
break;
case EPHY_NODE_CHILD_REMOVED:
@@ -365,9 +388,10 @@ ephy_node_unref (EphyNode *node)
static void
child_changed (gulong id,
EphyNodeParent *node_info,
- EphyNode *node)
+ EphyNodeChange *change)
{
- ephy_node_emit_signal (node_info->node, EPHY_NODE_CHILD_CHANGED, node);
+ ephy_node_emit_signal (node_info->node, EPHY_NODE_CHILD_CHANGED,
+ change->node, change->property_id);
}
static inline void
@@ -396,6 +420,7 @@ ephy_node_set_property (EphyNode *node,
const GValue *value)
{
GValue *new;
+ EphyNodeChange change;
g_return_if_fail (EPHY_IS_NODE (node));
g_return_if_fail (property_id >= 0);
@@ -409,9 +434,11 @@ ephy_node_set_property (EphyNode *node,
real_set_property (node, property_id, new);
+ change.node = node;
+ change.property_id = property_id;
g_hash_table_foreach (node->parents,
(GHFunc) child_changed,
- node);
+ &change);
}
gboolean