diff options
author | Seth Alves <alves@src.gnome.org> | 2000-04-26 03:50:54 +0800 |
---|---|---|
committer | Seth Alves <alves@src.gnome.org> | 2000-04-26 03:50:54 +0800 |
commit | ae6031ecceb5dc02d5dafad6b31378021f358338 (patch) | |
tree | 61634b1c9d49973a69e27bd6d5baa953aca4404f /calendar/gui/gnome-cal.c | |
parent | abc010d5a55c5715a6aa8deff0e7adeb316ca3a5 (diff) | |
download | gsoc2013-evolution-ae6031ecceb5dc02d5dafad6b31378021f358338.tar.gz gsoc2013-evolution-ae6031ecceb5dc02d5dafad6b31378021f358338.tar.zst gsoc2013-evolution-ae6031ecceb5dc02d5dafad6b31378021f358338.zip |
hook for widget destroy -- used to unref the CalClient so wombat knows we
* gui/gnome-cal.c (gnome_calendar_destroy): hook for widget
destroy -- used to unref the CalClient so wombat knows we are gone.
(gnome_calendar_class_init): added a class init for this widget.
svn path=/trunk/; revision=2613
Diffstat (limited to 'calendar/gui/gnome-cal.c')
-rw-r--r-- | calendar/gui/gnome-cal.c | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index 0627d1bd89..763fd5eac4 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -30,6 +30,9 @@ +static void gnome_calendar_class_init (GnomeCalendar *class); +static void gnome_calendar_destroy (GtkObject *object); + static void gnome_calendar_update_view_times (GnomeCalendar *gcal, GtkWidget *page); static void gnome_calendar_update_gtk_calendar (GnomeCalendar *gcal); @@ -40,6 +43,8 @@ static void gnome_calendar_on_month_changed (GtkCalendar *calendar, static GtkVBoxClass *parent_class; + + guint gnome_calendar_get_type (void) { @@ -49,7 +54,7 @@ gnome_calendar_get_type (void) "GnomeCalendar", sizeof(GnomeCalendar), sizeof(GnomeCalendarClass), - (GtkClassInitFunc) NULL, + (GtkClassInitFunc) gnome_calendar_class_init, (GtkObjectInitFunc) NULL, (GtkArgSetFunc) NULL, (GtkArgGetFunc) NULL, @@ -65,6 +70,33 @@ gnome_calendar_get_type (void) return gnome_calendar_type; } + +static void +gnome_calendar_class_init (GnomeCalendar *class) +{ + GtkObjectClass *object_class; + object_class = (GtkObjectClass *) class; + object_class->destroy = gnome_calendar_destroy; +} + + +static void +gnome_calendar_destroy (GtkObject *object) +{ + GnomeCalendar *gcal; + + g_return_if_fail (object != NULL); + g_return_if_fail (GNOME_IS_CALENDAR (object)); + + gcal = GNOME_CALENDAR (object); + + gtk_object_unref (GTK_OBJECT (gcal->client)); + + if (GTK_OBJECT_CLASS (parent_class)->destroy) + (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); +} + + static void setup_widgets (GnomeCalendar *gcal) { |