Fix the gc destruction in the unrealization code and fix the pixmap

1998-05-25  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* gncal-full-day.c (gncal_full_day_unrealize): Fix the gc
	destruction in the unrealization code and fix the pixmap unrefing.

	* main.c (close_cmd): Remove a bad hack that disabled calendar
	widget destruction.

svn path=/trunk/; revision=238
This commit is contained in:
Miguel de Icaza
1998-05-26 03:51:49 +00:00
committed by Arturo Espinosa
parent 63057dd048
commit 9dd60a1845
5 changed files with 34 additions and 12 deletions

View File

@ -1,5 +1,11 @@
1998-05-25 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gncal-full-day.c (gncal_full_day_unrealize): Fix the gc
destruction in the unrealization code and fix the pixmap unrefing.
* main.c (close_cmd): Remove a bad hack that disabled calendar
widget destruction.
* calobj.c (ical_object_generate_events): Fix for the weekly event
generation. Was reported on the bug tracking system.

View File

@ -1150,12 +1150,20 @@ gncal_full_day_unrealize (GtkWidget *widget)
gdk_cursor_destroy (fullday->beam_cursor);
fullday->beam_cursor = NULL;
gdk_gc_destroy (fullday->bell_gc);
gdk_gc_destroy (fullday->recur_gc);
gdk_pixmap_unref (pixmap_bell);
gdk_pixmap_unref (pixmap_recur);
if (fullday->bell_gc)
gdk_gc_destroy (fullday->bell_gc);
if (fullday->recur_gc)
gdk_gc_destroy (fullday->recur_gc);
if (pixmap_bell){
gdk_pixmap_unref (pixmap_bell);
pixmap_bell = NULL;
}
pixmap_bell = NULL;
if (pixmap_recur){
gdk_pixmap_unref (pixmap_recur);
pixmap_recur = NULL;
}
if (GTK_WIDGET_CLASS (parent_class)->unrealize)
(* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);

View File

@ -1150,12 +1150,20 @@ gncal_full_day_unrealize (GtkWidget *widget)
gdk_cursor_destroy (fullday->beam_cursor);
fullday->beam_cursor = NULL;
gdk_gc_destroy (fullday->bell_gc);
gdk_gc_destroy (fullday->recur_gc);
gdk_pixmap_unref (pixmap_bell);
gdk_pixmap_unref (pixmap_recur);
if (fullday->bell_gc)
gdk_gc_destroy (fullday->bell_gc);
if (fullday->recur_gc)
gdk_gc_destroy (fullday->recur_gc);
if (pixmap_bell){
gdk_pixmap_unref (pixmap_bell);
pixmap_bell = NULL;
}
pixmap_bell = NULL;
if (pixmap_recur){
gdk_pixmap_unref (pixmap_recur);
pixmap_recur = NULL;
}
if (GTK_WIDGET_CLASS (parent_class)->unrealize)
(* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);

View File

@ -173,7 +173,7 @@ close_cmd (GtkWidget *widget, GnomeCalendar *gcal)
calendar_save (gcal->cal, gcal->cal->filename);
}
/* gtk_widget_destroy (GTK_WIDGET (gcal)); */
gtk_widget_destroy (GTK_WIDGET (gcal));
active_calendars--;
if (active_calendars == 0)

View File

@ -173,7 +173,7 @@ close_cmd (GtkWidget *widget, GnomeCalendar *gcal)
calendar_save (gcal->cal, gcal->cal->filename);
}
/* gtk_widget_destroy (GTK_WIDGET (gcal)); */
gtk_widget_destroy (GTK_WIDGET (gcal));
active_calendars--;
if (active_calendars == 0)