aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-cell-popup.c
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/table/e-cell-popup.c')
-rw-r--r--widgets/table/e-cell-popup.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/widgets/table/e-cell-popup.c b/widgets/table/e-cell-popup.c
index 96eebfb6f0..8b7ed04679 100644
--- a/widgets/table/e-cell-popup.c
+++ b/widgets/table/e-cell-popup.c
@@ -42,7 +42,7 @@
static void e_cell_popup_class_init (GtkObjectClass *object_class);
static void e_cell_popup_init (ECellPopup *ecp);
-static void e_cell_popup_destroy (GtkObject *object);
+static void e_cell_popup_dispose (GObject *object);
static ECellView* ecp_new_view (ECell *ecell,
@@ -122,7 +122,7 @@ e_cell_popup_class_init (GtkObjectClass *object_class)
{
ECellClass *ecc = (ECellClass *) object_class;
- object_class->destroy = e_cell_popup_destroy;
+ G_OBJECT_CLASS (object_class)->dispose = e_cell_popup_dispose;
ecc->new_view = ecp_new_view;
ecc->kill_view = ecp_kill_view;
@@ -171,13 +171,15 @@ e_cell_popup_new (void)
* GtkObject::destroy method
*/
static void
-e_cell_popup_destroy (GtkObject *object)
+e_cell_popup_dispose (GObject *object)
{
ECellPopup *ecp = E_CELL_POPUP (object);
- gtk_object_unref (GTK_OBJECT (ecp->child));
+ if (ecp->child)
+ gtk_object_unref (GTK_OBJECT (ecp->child));
+ ecp->child = NULL;
- GTK_OBJECT_CLASS (parent_class)->destroy (object);
+ G_OBJECT_CLASS (parent_class)->dispose (object);
}
@@ -277,11 +279,6 @@ ecp_draw (ECellView *ecv, GdkDrawable *drawable,
if (flags & E_CELL_CURSOR)
ecp->popup_arrow_shown = show_popup_arrow;
-#if 0
- g_print ("In ecp_draw row:%i col: %i %i,%i %i,%i Show Arrow:%i\n",
- row, view_col, x1, y1, x2, y2, show_popup_arrow);
-#endif
-
if (show_popup_arrow) {
e_cell_draw (ecp_view->child_view, drawable, model_col,
view_col, row, flags,
@@ -500,7 +497,7 @@ e_cell_popup_do_popup (ECellPopupView *ecp_view,
ecp->popup_cell_view = ecp_view;
- popup_func = E_CELL_POPUP_CLASS (GTK_OBJECT (ecp)->klass)->popup;
+ popup_func = E_CELL_POPUP_CLASS (GTK_OBJECT_GET_CLASS (ecp))->popup;
ecp->popup_view_col = view_col;
ecp->popup_row = row;