aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-cell-date-edit.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-09-11 20:05:14 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-09-11 21:03:45 +0800
commit4c13763c5eab1013f6abab234f77fa06e4502652 (patch)
treece46ba39f33e8b81447c084164de83b90b042aa7 /widgets/table/e-cell-date-edit.c
parentbc9ece413fce4941a74a13619815a0869c1d2e99 (diff)
downloadgsoc2013-evolution-4c13763c5eab1013f6abab234f77fa06e4502652.tar
gsoc2013-evolution-4c13763c5eab1013f6abab234f77fa06e4502652.tar.gz
gsoc2013-evolution-4c13763c5eab1013f6abab234f77fa06e4502652.tar.bz2
gsoc2013-evolution-4c13763c5eab1013f6abab234f77fa06e4502652.tar.lz
gsoc2013-evolution-4c13763c5eab1013f6abab234f77fa06e4502652.tar.xz
gsoc2013-evolution-4c13763c5eab1013f6abab234f77fa06e4502652.tar.zst
gsoc2013-evolution-4c13763c5eab1013f6abab234f77fa06e4502652.zip
Convert ECell from a GtkObject to a GObject.
To eliminate the floating-reference-on-finalize run-time warnings.
Diffstat (limited to 'widgets/table/e-cell-date-edit.c')
-rw-r--r--widgets/table/e-cell-date-edit.c39
1 files changed, 18 insertions, 21 deletions
diff --git a/widgets/table/e-cell-date-edit.c b/widgets/table/e-cell-date-edit.c
index cab6c816ee..c15cccef73 100644
--- a/widgets/table/e-cell-date-edit.c
+++ b/widgets/table/e-cell-date-edit.c
@@ -48,7 +48,6 @@
/* This depends on ECalendar which is why I didn't put it in gal. */
#include <misc/e-calendar.h>
-static void e_cell_date_edit_destroy (GtkObject *object);
static void e_cell_date_edit_get_property (GObject *object,
guint property_id,
GValue *value,
@@ -57,6 +56,7 @@ static void e_cell_date_edit_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
+static void e_cell_date_edit_dispose (GObject *object);
static gint e_cell_date_edit_do_popup (ECellPopup *ecp,
GdkEvent *event,
@@ -117,15 +117,12 @@ static void
e_cell_date_edit_class_init (ECellDateEditClass *class)
{
GObjectClass *object_class;
- GtkObjectClass *gtk_object_class;
ECellPopupClass *ecpc;
object_class = G_OBJECT_CLASS (class);
object_class->get_property = e_cell_date_edit_get_property;
object_class->set_property = e_cell_date_edit_set_property;
-
- gtk_object_class = GTK_OBJECT_CLASS (class);
- gtk_object_class->destroy = e_cell_date_edit_destroy;
+ object_class->dispose = e_cell_date_edit_dispose;
ecpc = E_CELL_POPUP_CLASS (class);
ecpc->popup = e_cell_date_edit_do_popup;
@@ -355,22 +352,6 @@ e_cell_date_edit_new (void)
return g_object_new (e_cell_date_edit_get_type (), NULL);
}
-/*
- * GtkObject::destroy method
- */
-static void
-e_cell_date_edit_destroy (GtkObject *object)
-{
- ECellDateEdit *ecde = E_CELL_DATE_EDIT (object);
-
- e_cell_date_edit_set_get_time_callback (ecde, NULL, NULL, NULL);
-
- gtk_widget_destroy (ecde->popup_window);
- ecde->popup_window = NULL;
-
- GTK_OBJECT_CLASS (e_cell_date_edit_parent_class)->destroy (object);
-}
-
static void
e_cell_date_edit_get_property (GObject *object,
guint property_id,
@@ -480,6 +461,22 @@ e_cell_date_edit_set_property (GObject *object,
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
}
+static void
+e_cell_date_edit_dispose (GObject *object)
+{
+ ECellDateEdit *ecde = E_CELL_DATE_EDIT (object);
+
+ e_cell_date_edit_set_get_time_callback (ecde, NULL, NULL, NULL);
+
+ if (ecde->popup_window != NULL) {
+ gtk_widget_destroy (ecde->popup_window);
+ ecde->popup_window = NULL;
+ }
+
+ /* Chain up to parent's dispose() method. */
+ G_OBJECT_CLASS (e_cell_date_edit_parent_class)->dispose (object);
+}
+
static gint
e_cell_date_edit_do_popup (ECellPopup *ecp,
GdkEvent *event,