From 74cc769b7fe1e76abcb7de69aa17e45c373b82c0 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Fri, 12 Dec 2003 16:45:51 +0000 Subject: [PATCH] 2003-12-12 Radek Doulik * 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 * 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 --- ChangeLog | 11 +++++++++++ glue/program.c | 2 +- gtk/Gtk.metadata | 2 +- gtk/TextTag.custom | 21 +++++++++++++++++++++ gtk/gtk-api.xml | 2 +- sample/GtkDemo/DemoTextView.cs | 4 ++-- 6 files changed, 37 insertions(+), 5 deletions(-) create mode 100644 gtk/TextTag.custom diff --git a/ChangeLog b/ChangeLog index 0e9710bb5..cba850d09 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2003-12-12 Radek Doulik + + * 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 + + * glue/program.c (get_default): moved check after strspec is set + so we don't check uninitialized value + 2003-12-10 Mike Kestner * generator/CallbackGen.cs : kill ref_owned generation diff --git a/glue/program.c b/glue/program.c index 5c9d4a6ea..8fad6b6e6 100644 --- a/glue/program.c +++ b/glue/program.c @@ -24,9 +24,9 @@ get_default (GObjectClass *klass, const gchar *property) gchar *ret; g_return_val_if_fail (spec != NULL, NULL); + strspec = G_PARAM_SPEC_STRING (spec); g_return_val_if_fail (strspec != NULL, NULL); - strspec = G_PARAM_SPEC_STRING (spec); ret = g_strdup (strspec->default_value); //g_param_spec_unref (spec); diff --git a/gtk/Gtk.metadata b/gtk/Gtk.metadata index 47b78b3e5..ddf4395f5 100644 --- a/gtk/Gtk.metadata +++ b/gtk/Gtk.metadata @@ -178,7 +178,7 @@ out ScrollAdjustmentsSet ProcessEvent - PangoWeight + 1 TextEvent out out diff --git a/gtk/TextTag.custom b/gtk/TextTag.custom new file mode 100644 index 000000000..384b20eeb --- /dev/null +++ b/gtk/TextTag.custom @@ -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)); + } + } \ No newline at end of file diff --git a/gtk/gtk-api.xml b/gtk/gtk-api.xml index 6ee167863..f5dbb0ba4 100644 --- a/gtk/gtk-api.xml +++ b/gtk/gtk-api.xml @@ -7292,7 +7292,7 @@ - +