aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-cell-vbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/table/e-cell-vbox.c')
-rw-r--r--widgets/table/e-cell-vbox.c28
1 files changed, 11 insertions, 17 deletions
diff --git a/widgets/table/e-cell-vbox.c b/widgets/table/e-cell-vbox.c
index 4327722b64..f915c3e0dd 100644
--- a/widgets/table/e-cell-vbox.c
+++ b/widgets/table/e-cell-vbox.c
@@ -42,9 +42,7 @@
#include "e-cell-vbox.h"
#include "e-table-item.h"
-#define PARENT_TYPE e_cell_get_type ()
-
-static ECellClass *parent_class;
+G_DEFINE_TYPE (ECellVbox, e_cell_vbox, E_CELL_TYPE)
#define INDENT_AMOUNT 16
@@ -114,8 +112,8 @@ ecv_realize (ECellView *ecell_view)
for (i = 0; i < vbox_view->subcell_view_count; i++)
e_cell_realize (vbox_view->subcell_views[i]);
- if (parent_class->realize)
- (* parent_class->realize) (ecell_view);
+ if (E_CELL_CLASS (e_cell_vbox_parent_class)->realize)
+ (* E_CELL_CLASS (e_cell_vbox_parent_class)->realize) (ecell_view);
}
/*
@@ -131,8 +129,8 @@ ecv_unrealize (ECellView *ecv)
for (i = 0; i < vbox_view->subcell_view_count; i++)
e_cell_unrealize (vbox_view->subcell_views[i]);
- if (parent_class->unrealize)
- (* parent_class->unrealize) (ecv);
+ if (E_CELL_CLASS (e_cell_vbox_parent_class)->unrealize)
+ (* E_CELL_CLASS (e_cell_vbox_parent_class)->unrealize) (ecv);
}
/*
@@ -411,7 +409,7 @@ ecv_dispose (GObject *object)
ecv->subcells = NULL;
ecv->subcell_count = 0;
- G_OBJECT_CLASS (parent_class)->dispose (object);
+ G_OBJECT_CLASS (e_cell_vbox_parent_class)->dispose (object);
}
static void
@@ -421,13 +419,14 @@ ecv_finalize (GObject *object)
g_free (ecv->model_cols);
- G_OBJECT_CLASS (parent_class)->finalize (object);
+ G_OBJECT_CLASS (e_cell_vbox_parent_class)->finalize (object);
}
static void
-e_cell_vbox_class_init (GObjectClass *object_class)
+e_cell_vbox_class_init (ECellVboxClass *klass)
{
- ECellClass *ecc = (ECellClass *) object_class;
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ ECellClass *ecc = E_CELL_CLASS (klass);
object_class->dispose = ecv_dispose;
object_class->finalize = ecv_finalize;
@@ -451,21 +450,16 @@ e_cell_vbox_class_init (GObjectClass *object_class)
ecc->get_bg_color = ecv_get_bg_color;
#endif
- parent_class = g_type_class_ref (PARENT_TYPE);
-
gal_a11y_e_cell_registry_add_cell_type (NULL, E_CELL_VBOX_TYPE, gal_a11y_e_cell_vbox_new);
}
static void
-e_cell_vbox_init (GtkObject *object)
+e_cell_vbox_init (ECellVbox *ecv)
{
- ECellVbox *ecv = E_CELL_VBOX (object);
-
ecv->subcells = NULL;
ecv->subcell_count = 0;
}
-E_MAKE_TYPE(e_cell_vbox, "ECellVbox", ECellVbox, e_cell_vbox_class_init, e_cell_vbox_init, PARENT_TYPE)
/**
* e_cell_vbox_new: