Commit 5ff10fe6 authored by Christian Hergert's avatar Christian Hergert

tree: code style cleanup

parent 878b0c01
......@@ -1050,8 +1050,8 @@ dzl_tree_node_show_popover (DzlTreeNode *self,
{
GdkRectangle cell_area;
GdkRectangle visible_rect;
DzlTree *tree;
PopupRequest *popreq;
DzlTree *tree;
g_return_if_fail (DZL_IS_TREE_NODE (self));
g_return_if_fail (GTK_IS_POPOVER (popover));
......@@ -1080,7 +1080,7 @@ dzl_tree_node_show_popover (DzlTreeNode *self,
path = dzl_tree_node_get_path (self);
gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (tree), path, NULL, FALSE, 0, 0);
gtk_tree_path_free (path);
g_clear_pointer (&path, gtk_tree_path_free);
/*
* FIXME: Time period comes from gtk animation duration.
......@@ -1096,14 +1096,14 @@ dzl_tree_node_show_popover (DzlTreeNode *self,
g_timeout_add (300,
dzl_tree_node_show_popover_timeout_cb,
popreq);
return;
}
else
{
dzl_tree_node_show_popover_timeout_cb (popreq);
}
dzl_tree_node_show_popover_timeout_cb (g_steal_pointer (&popreq));
}
gboolean
gboolean
_dzl_tree_node_is_dummy (DzlTreeNode *self)
{
g_return_val_if_fail (DZL_IS_TREE_NODE (self), FALSE);
......
......@@ -534,7 +534,6 @@ dzl_tree_add (DzlTree *self,
gboolean prepend)
{
DzlTreePrivate *priv = dzl_tree_get_instance_private (self);
GtkTreePath *path;
GtkTreeIter *parentptr = NULL;
GtkTreeIter iter;
GtkTreeIter parent;
......@@ -550,9 +549,12 @@ dzl_tree_add (DzlTree *self,
if (node != priv->root)
{
GtkTreePath *path;
path = dzl_tree_node_get_path (node);
gtk_tree_model_get_iter (GTK_TREE_MODEL (priv->store), &parent, path);
parentptr = &parent;
g_clear_pointer (&path, gtk_tree_path_free);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment