aboutsummaryrefslogtreecommitdiffstats
path: root/lib/widgets/ephy-tree-model-node.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@src.gnome.org>2003-09-02 07:20:17 +0800
committerChristian Persch <chpe@src.gnome.org>2003-09-02 07:20:17 +0800
commit73a95385f4034998cc78199dc8bb9ee22d90d6aa (patch)
tree499d78ab52e8937f672e3659105dda083a34c988 /lib/widgets/ephy-tree-model-node.c
parent3375c1878c4c0ebf4f5067d128024ea484208f62 (diff)
downloadgsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.tar
gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.tar.gz
gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.tar.bz2
gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.tar.lz
gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.tar.xz
gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.tar.zst
gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.zip
Mega-patch, changelog too long to paste here.
Diffstat (limited to 'lib/widgets/ephy-tree-model-node.c')
-rw-r--r--lib/widgets/ephy-tree-model-node.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/lib/widgets/ephy-tree-model-node.c b/lib/widgets/ephy-tree-model-node.c
index 563853016..2f1acb5a1 100644
--- a/lib/widgets/ephy-tree-model-node.c
+++ b/lib/widgets/ephy-tree-model-node.c
@@ -85,6 +85,8 @@ static void root_destroy_cb (EphyNode *node,
static inline GtkTreePath *get_path_real (EphyTreeModelNode *model,
EphyNode *node);
+#define EPHY_TREE_MODEL_NODE_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_TREE_MODEL_NODE, EphyTreeModelNodePrivate))
+
struct EphyTreeModelNodePrivate
{
EphyNode *root;
@@ -176,6 +178,8 @@ ephy_tree_model_node_class_init (EphyTreeModelNodeClass *klass)
"Filter object",
EPHY_TYPE_NODE_FILTER,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+
+ g_type_class_add_private (object_class, sizeof (EphyTreeModelNodePrivate));
}
static void
@@ -189,8 +193,9 @@ ephy_tree_model_node_init (EphyTreeModelNode *model)
}
while (model->stamp == 0);
- model->priv = g_new0 (EphyTreeModelNodePrivate, 1);
+ model->priv = EPHY_TREE_MODEL_NODE_GET_PRIVATE (model);
+ /* FIXME: huh? */
dummy = gtk_tree_view_new ();
gtk_widget_destroy (dummy);
@@ -202,19 +207,10 @@ ephy_tree_model_node_init (EphyTreeModelNode *model)
static void
ephy_tree_model_node_finalize (GObject *object)
{
- EphyTreeModelNode *model;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (EPHY_IS_TREE_MODEL_NODE (object));
-
- model = EPHY_TREE_MODEL_NODE (object);
-
- g_return_if_fail (model->priv != NULL);
+ EphyTreeModelNode *model = EPHY_TREE_MODEL_NODE (object);
g_ptr_array_free (model->priv->columns, TRUE);
- g_free (model->priv);
-
G_OBJECT_CLASS (parent_class)->finalize (object);
}