diff options
Diffstat (limited to 'lib/widgets/ephy-tree-model-node.c')
-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) { |