Re: GTK+ 1.2.10 style bug
- From: "Joe.C" <joe animeta com>
- To: Owen Taylor <otaylor redhat com>
- Cc: gtk-devel-list gnome org
- Subject: Re: GTK+ 1.2.10 style bug
- Date: Thu, 06 Sep 2001 20:48:08 +0800
Owen Taylor wrote:
> There are various problems in that area of code ... I have the
> following patch in the current gtk+-1.2.10 SRPM, but it seems
> that you are reporting something beyond this. If you could
> file your bug in bugzilla.gnome.org I'd appreciate.
I've filed the bug.
And here's my proposed patch. It is against 1.2.10.
Joe.C
*** gtkstyle.c.org Thu Sep 6 20:21:13 2001
--- gtkstyle.c Thu Sep 6 20:22:26 2001
***************
*** 584,592 ****
gtk_gc_release (style->mid_gc[i]);
gtk_gc_release (style->text_gc[i]);
gtk_gc_release (style->base_gc[i]);
-
- if (style->bg_pixmap[i] && style->bg_pixmap[i] != (GdkPixmap*) GDK_PARENT_RELATIVE)
- gdk_pixmap_unref (style->bg_pixmap[i]);
}
gdk_colormap_free_colors (style->colormap, style->fg, 5);
--- 584,589 ----
***************
*** 670,676 ****
for (i = 0; i < 5; i++)
{
! if (style->rc_style && style->rc_style->bg_pixmap_name[i])
style->bg_pixmap[i] = gtk_rc_load_image (style->colormap,
&style->bg[i],
style->rc_style->bg_pixmap_name[i]);
--- 667,673 ----
for (i = 0; i < 5; i++)
{
! if (!style->bg_pixmap[i] && style->rc_style && style->rc_style->bg_pixmap_name[i])
style->bg_pixmap[i] = gtk_rc_load_image (style->colormap,
&style->bg[i],
style->rc_style->bg_pixmap_name[i]);
***************
*** 726,731 ****
--- 723,730 ----
static void
gtk_style_destroy (GtkStyle *style)
{
+ gint i;
+
g_return_if_fail (style->attach_count == 0);
if (style->styles)
***************
*** 749,754 ****
--- 748,759 ----
{
style->engine->destroy_style (style);
gtk_theme_engine_unref (style->engine);
+ }
+
+ for (i = 0; i < 5; i++)
+ {
+ if (style->bg_pixmap[i] && style->bg_pixmap[i] != (GdkPixmap*) GDK_PARENT_RELATIVE)
+ gdk_pixmap_unref (style->bg_pixmap[i]);
}
gdk_font_unref (style->font);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]