2003-12-12 Radek Doulik <rodo@ximian.com>

* gtk/Gtk.metadata: hide TextTag.Weight property and implement it
	in TextTag.custom. TextTag Weight property in gtk is of type int,
	but we want it to be Pango.Weight enum

2003-12-10  Radek Doulik  <rodo@ximian.com>

	* glue/program.c (get_default): moved check after strspec is set
	so we don't check uninitialized value

svn path=/trunk/gtk-sharp/; revision=21068
This commit is contained in:
Radek Doulik 2003-12-12 16:45:51 +00:00
parent ba1d3996a4
commit 74cc769b7f
6 changed files with 37 additions and 5 deletions

View file

@ -1,3 +1,14 @@
2003-12-12 Radek Doulik <rodo@ximian.com>
* gtk/Gtk.metadata: hide TextTag.Weight property and implement it
in TextTag.custom. TextTag Weight property in gtk is of type int,
but we want it to be Pango.Weight enum
2003-12-10 Radek Doulik <rodo@ximian.com>
* glue/program.c (get_default): moved check after strspec is set
so we don't check uninitialized value
2003-12-10 Mike Kestner <mkestner@ximian.com> 2003-12-10 Mike Kestner <mkestner@ximian.com>
* generator/CallbackGen.cs : kill ref_owned generation * generator/CallbackGen.cs : kill ref_owned generation

View file

@ -24,9 +24,9 @@ get_default (GObjectClass *klass, const gchar *property)
gchar *ret; gchar *ret;
g_return_val_if_fail (spec != NULL, NULL); g_return_val_if_fail (spec != NULL, NULL);
strspec = G_PARAM_SPEC_STRING (spec);
g_return_val_if_fail (strspec != NULL, NULL); g_return_val_if_fail (strspec != NULL, NULL);
strspec = G_PARAM_SPEC_STRING (spec);
ret = g_strdup (strspec->default_value); ret = g_strdup (strspec->default_value);
//g_param_spec_unref (spec); //g_param_spec_unref (spec);

View file

@ -178,7 +178,7 @@
<attr path="/api/namespace/object[@cname='GtkTextLayout']/method[@name='GetIterAtLine']/*/*[@type='GtkTextIter*']" name="pass_as">out</attr> <attr path="/api/namespace/object[@cname='GtkTextLayout']/method[@name='GetIterAtLine']/*/*[@type='GtkTextIter*']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GtkText']/signal[@name='SetScrollAdjustments']" name="name">ScrollAdjustmentsSet</attr> <attr path="/api/namespace/object[@cname='GtkText']/signal[@name='SetScrollAdjustments']" name="name">ScrollAdjustmentsSet</attr>
<attr path="/api/namespace/object[@cname='GtkTextTag']/method[@name='Event']" name="name">ProcessEvent</attr> <attr path="/api/namespace/object[@cname='GtkTextTag']/method[@name='Event']" name="name">ProcessEvent</attr>
<attr path="/api/namespace/object[@cname='GtkTextTag']/property[@name='Weight']" name="type">PangoWeight</attr> <attr path="/api/namespace/object[@cname='GtkTextTag']/property[@name='Weight']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkTextTag']/signal[@name='Event']" name="name">TextEvent</attr> <attr path="/api/namespace/object[@cname='GtkTextTag']/signal[@name='Event']" name="name">TextEvent</attr>
<attr path="/api/namespace/object[@cname='GtkTextView']/method[@name='GetIterAtLocation']/*/*[@type='GtkTextIter*']" name="pass_as">out</attr> <attr path="/api/namespace/object[@cname='GtkTextView']/method[@name='GetIterAtLocation']/*/*[@type='GtkTextIter*']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GtkTextView']/method[@name='GetLineAtY']/*/*[@type='GtkTextIter*']" name="pass_as">out</attr> <attr path="/api/namespace/object[@cname='GtkTextView']/method[@name='GetLineAtY']/*/*[@type='GtkTextIter*']" name="pass_as">out</attr>

21
gtk/TextTag.custom Normal file
View file

@ -0,0 +1,21 @@
//
// Gtk.TextTag.custom - Gtk TextTag class customizations
//
// Author: Radek Doulik (rodo@ximian.com)
//
// Copyright (C) 2002 Ximian, Inc.
//
// This code is inserted after the automatically generated code.
//
public Pango.Weight Weight {
get {
GLib.Value val = new GLib.Value ();
GetProperty ("weight", val);
Pango.Weight ret = (Pango.Weight) (int) val;
return ret;
}
set {
SetProperty ("weight", new GLib.Value ((int) value));
}
}

View file

@ -7292,7 +7292,7 @@
<property name="Family" cname="family" type="gchar*" readable="true" writeable="true" /> <property name="Family" cname="family" type="gchar*" readable="true" writeable="true" />
<property name="Style" cname="style" type="PangoStyle" readable="true" writeable="true" /> <property name="Style" cname="style" type="PangoStyle" readable="true" writeable="true" />
<property name="Variant" cname="variant" type="PangoVariant" readable="true" writeable="true" /> <property name="Variant" cname="variant" type="PangoVariant" readable="true" writeable="true" />
<property name="Weight" cname="weight" readable="true" writeable="true" type="PangoWeight" /> <property name="Weight" cname="weight" readable="true" writeable="true" type="PangoWeight" hidden="1" />
<property name="Stretch" cname="stretch" type="PangoStretch" readable="true" writeable="true" /> <property name="Stretch" cname="stretch" type="PangoStretch" readable="true" writeable="true" />
<property name="Size" cname="size" type="gint" readable="true" writeable="true" /> <property name="Size" cname="size" type="gint" readable="true" writeable="true" />
<property name="Scale" cname="scale" type="gdouble" readable="true" writeable="true" /> <property name="Scale" cname="scale" type="gdouble" readable="true" writeable="true" />

View file

@ -132,7 +132,7 @@ namespace GtkDemo
*/ */
TextTag tag = new TextTag("heading"); TextTag tag = new TextTag("heading");
tag.FontDesc.Weight = Pango.Weight.Bold; tag.Weight = Pango.Weight.Bold;
tag.Size = (int) Pango.Scale.PangoScale * 15; tag.Size = (int) Pango.Scale.PangoScale * 15;
buffer.TagTable.Add(tag); buffer.TagTable.Add(tag);
@ -141,7 +141,7 @@ namespace GtkDemo
buffer.TagTable.Add(tag); buffer.TagTable.Add(tag);
tag = new TextTag("bold"); tag = new TextTag("bold");
tag.FontDesc.Weight = Pango.Weight.Bold; tag.Weight = Pango.Weight.Bold;
buffer.TagTable.Add(tag); buffer.TagTable.Add(tag);
tag = new TextTag("big"); tag = new TextTag("big");