diff options
author | Xan Lopez <xan@src.gnome.org> | 2003-04-26 00:06:19 +0800 |
---|---|---|
committer | Xan Lopez <xan@src.gnome.org> | 2003-04-26 00:06:19 +0800 |
commit | 98f768009939e3b06f2777ccb4307245f0637f36 (patch) | |
tree | fdfac352ab0901919cb99d5caf4d72d40622ed3f /lib/widgets | |
parent | 942e954a637fe6a462f3337c2aef8fa683877976 (diff) | |
download | gsoc2013-epiphany-98f768009939e3b06f2777ccb4307245f0637f36.tar gsoc2013-epiphany-98f768009939e3b06f2777ccb4307245f0637f36.tar.gz gsoc2013-epiphany-98f768009939e3b06f2777ccb4307245f0637f36.tar.bz2 gsoc2013-epiphany-98f768009939e3b06f2777ccb4307245f0637f36.tar.lz gsoc2013-epiphany-98f768009939e3b06f2777ccb4307245f0637f36.tar.xz gsoc2013-epiphany-98f768009939e3b06f2777ccb4307245f0637f36.tar.zst gsoc2013-epiphany-98f768009939e3b06f2777ccb4307245f0637f36.zip |
Implement ephy_node_reorder_children (from Rhythmbox).
Implement ephy_node_reorder_children (from Rhythmbox).
Diffstat (limited to 'lib/widgets')
-rw-r--r-- | lib/widgets/ephy-tree-model-node.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/widgets/ephy-tree-model-node.c b/lib/widgets/ephy-tree-model-node.c index 180e24879..6ea3544e9 100644 --- a/lib/widgets/ephy-tree-model-node.c +++ b/lib/widgets/ephy-tree-model-node.c @@ -74,6 +74,9 @@ static void root_child_added_cb (EphyNode *node, static void root_child_changed_cb (EphyNode *node, EphyNode *child, EphyTreeModelNode *model); +static void root_children_reordered_cb (EphyNode *node, + int *new_order, + EphyTreeModelNode *model); static inline void ephy_tree_model_node_update_node (EphyTreeModelNode *model, EphyNode *node, int idx); @@ -264,6 +267,11 @@ ephy_tree_model_node_set_property (GObject *object, G_OBJECT (model), 0); g_signal_connect_object (G_OBJECT (model->priv->root), + "children_reordered", + G_CALLBACK (root_children_reordered_cb), + G_OBJECT (model), + 0); + g_signal_connect_object (G_OBJECT (model->priv->root), "destroyed", G_CALLBACK (root_destroyed_cb), G_OBJECT (model), @@ -715,6 +723,14 @@ root_child_changed_cb (EphyNode *node, } static void +root_children_reordered_cb (EphyNode *node, + int *new_order, + EphyTreeModelNode *model) +{ + gtk_tree_model_rows_reordered (GTK_TREE_MODEL (model), NULL, NULL, new_order); +} + +static void root_destroyed_cb (EphyNode *node, EphyTreeModelNode *model) { |