aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@nuclecu.unam.mx>1998-05-26 11:51:49 +0800
committerArturo Espinosa <unammx@src.gnome.org>1998-05-26 11:51:49 +0800
commit9dd60a1845bdb3c0f3a5acd7f0475bfc5f0e8707 (patch)
tree3f44ba888a7d32ef13c2d5465749d178a4594422
parent63057dd048e894ccb4ed34fe2e4b975995823618 (diff)
downloadgsoc2013-evolution-9dd60a1845bdb3c0f3a5acd7f0475bfc5f0e8707.tar
gsoc2013-evolution-9dd60a1845bdb3c0f3a5acd7f0475bfc5f0e8707.tar.gz
gsoc2013-evolution-9dd60a1845bdb3c0f3a5acd7f0475bfc5f0e8707.tar.bz2
gsoc2013-evolution-9dd60a1845bdb3c0f3a5acd7f0475bfc5f0e8707.tar.lz
gsoc2013-evolution-9dd60a1845bdb3c0f3a5acd7f0475bfc5f0e8707.tar.xz
gsoc2013-evolution-9dd60a1845bdb3c0f3a5acd7f0475bfc5f0e8707.tar.zst
gsoc2013-evolution-9dd60a1845bdb3c0f3a5acd7f0475bfc5f0e8707.zip
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
-rw-r--r--calendar/ChangeLog6
-rw-r--r--calendar/gncal-full-day.c18
-rw-r--r--calendar/gui/gncal-full-day.c18
-rw-r--r--calendar/gui/main.c2
-rw-r--r--calendar/main.c2
5 files changed, 34 insertions, 12 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 930e23585a..38dd97b5b7 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -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.
diff --git a/calendar/gncal-full-day.c b/calendar/gncal-full-day.c
index 41d217cb6e..618d1c039d 100644
--- a/calendar/gncal-full-day.c
+++ b/calendar/gncal-full-day.c
@@ -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);
diff --git a/calendar/gui/gncal-full-day.c b/calendar/gui/gncal-full-day.c
index 41d217cb6e..618d1c039d 100644
--- a/calendar/gui/gncal-full-day.c
+++ b/calendar/gui/gncal-full-day.c
@@ -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);
diff --git a/calendar/gui/main.c b/calendar/gui/main.c
index dec25e737c..bdb6a0d1c3 100644
--- a/calendar/gui/main.c
+++ b/calendar/gui/main.c
@@ -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)
diff --git a/calendar/main.c b/calendar/main.c
index dec25e737c..bdb6a0d1c3 100644
--- a/calendar/main.c
+++ b/calendar/main.c
@@ -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)