aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorSeth Alves <alves@src.gnome.org>2000-04-26 03:50:54 +0800
committerSeth Alves <alves@src.gnome.org>2000-04-26 03:50:54 +0800
commitae6031ecceb5dc02d5dafad6b31378021f358338 (patch)
tree61634b1c9d49973a69e27bd6d5baa953aca4404f /calendar/gui
parentabc010d5a55c5715a6aa8deff0e7adeb316ca3a5 (diff)
downloadgsoc2013-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')
-rw-r--r--calendar/gui/calendar-commands.c10
-rw-r--r--calendar/gui/gnome-cal.c34
2 files changed, 33 insertions, 11 deletions
diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c
index 4820c2892e..254030c675 100644
--- a/calendar/gui/calendar-commands.c
+++ b/calendar/gui/calendar-commands.c
@@ -338,16 +338,6 @@ close_cmd (BonoboUIHandler *uih, void *user_data, const char *path)
GnomeCalendar *gcal = GNOME_CALENDAR (user_data);
all_calendars = g_list_remove (all_calendars, gcal);
- /* DELETE
- FIXME -- what do i do here?
- if (gcal->cal->modified){
- if (!gcal->cal->filename)
- save_calendar_cmd (widget, gcal);
- else
- calendar_save (gcal->cal, gcal->cal->filename);
- }
- */
-
gtk_widget_destroy (GTK_WIDGET (gcal));
active_calendars--;
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)
{