Re: typo in gtktexttag.c - patch



On 22 Sep 2001, Owen Taylor wrote:
>
> Kristian Rietveld <kristian planet nl> writes:
>
> > Hi,
> >
> > gtk-demo gave g_warnings. I traced it down to a typo in gtktexttag.c (font
> > weight is an enum not an int). Appended patch fixes this.
> >
> > Ok to commit?
>
> Actually, it's an int with some predefined values. The getters/setters
> need to be fixed instead. (You can use a weight of 655 or whatever
> if you so desire.)

Ok, then we do it this way (don't know why cvs diff sees differences in
the above part...). The getter doesn't have this typo.

Is this one ok?

regards,


	Kris


Index: gtktexttag.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtktexttag.c,v
retrieving revision 1.46
diff -u -r1.46 gtktexttag.c
--- gtktexttag.c	2001/09/19 00:58:09	1.46
+++ gtktexttag.c	2001/09/22 14:12:46
@@ -324,14 +324,14 @@
   g_object_class_install_property (object_class,
                                    PROP_WEIGHT,
                                    g_param_spec_int ("weight",
-                                                     _("Font weight"),
-                                                     _("Font weight"),
-                                                     0,
-                                                     G_MAXINT,
-                                                     PANGO_WEIGHT_NORMAL,
-                                                     G_PARAM_READABLE | G_PARAM_WRITABLE));
+						     _("Font weight"),
+						     _("Font weight"),
+						     0,
+						     G_MAXINT,
+						     PANGO_WEIGHT_NORMAL,
+						     G_PARAM_READABLE | G_PARAM_WRITABLE));

-
+
   g_object_class_install_property (object_class,
                                    PROP_STRETCH,
                                    g_param_spec_enum ("stretch",
@@ -986,7 +986,7 @@
 	    break;
 	  case PROP_WEIGHT:
 	    pango_font_description_set_weight (text_tag->values->font,
-					       g_value_get_enum (value));
+					       g_value_get_int (value));
 	    break;
 	  case PROP_STRETCH:
 	    pango_font_description_set_stretch (text_tag->values->font,





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]