aboutsummaryrefslogtreecommitdiffstats
path: root/lib/widgets/ephy-node-view.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/widgets/ephy-node-view.c')
-rw-r--r--lib/widgets/ephy-node-view.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/lib/widgets/ephy-node-view.c b/lib/widgets/ephy-node-view.c
index 9677d8384..9c40f8f06 100644
--- a/lib/widgets/ephy-node-view.c
+++ b/lib/widgets/ephy-node-view.c
@@ -46,6 +46,9 @@ static void ephy_node_view_get_property (GObject *object,
GValue *value,
GParamSpec *pspec);
+
+#define EPHY_NODE_VIEW_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_NODE_VIEW, EphyNodeViewPrivate))
+
struct EphyNodeViewPrivate
{
EphyNode *root;
@@ -197,19 +200,14 @@ ephy_node_view_class_init (EphyNodeViewClass *klass)
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE,
0);
+
+ g_type_class_add_private (object_class, sizeof (EphyNodeViewPrivate));
}
static void
ephy_node_view_finalize (GObject *object)
{
- EphyNodeView *view;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (EPHY_IS_NODE_VIEW (object));
-
- view = EPHY_NODE_VIEW (object);
-
- g_return_if_fail (view->priv != NULL);
+ EphyNodeView *view = EPHY_NODE_VIEW (object);
g_object_unref (G_OBJECT (view->priv->sortmodel));
g_object_unref (G_OBJECT (view->priv->filtermodel));
@@ -220,8 +218,6 @@ ephy_node_view_finalize (GObject *object)
gtk_target_list_unref (view->priv->source_target_list);
}
- g_free (view->priv);
-
G_OBJECT_CLASS (parent_class)->finalize (object);
}
@@ -1304,7 +1300,8 @@ ephy_node_view_add_column (EphyNodeView *view,
static void
ephy_node_view_init (EphyNodeView *view)
{
- view->priv = g_new0 (EphyNodeViewPrivate, 1);
+ view->priv = EPHY_NODE_VIEW_GET_PRIVATE (view);
+
view->priv->editable_renderer = NULL;
view->priv->editing = TRUE;
view->priv->searchable_data_column = -1;