diff --git a/ChangeLog b/ChangeLog index bb78fcfbe..b005be7dc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2005-08-22 Dan Winship + + * generator/Property.cs (Generate): Mark properties [Obsolete] if + they or their accessors are marked deprecated. (Affects + Gtk.Entry.Editable, Gtk.FontSelection.Font, + Gtk.Notebook.*TabBorder, Gtk.Object.UserData, and a bunch of old + Gtk.ProgressBar properties). + + * gtk/Gtk.metadata: Hide Entry.Editable. Mark Notebook.Homogeneous + deprecated. + + * gtk/Entry.custom: Implement Editable property with an Obsolete + pointing to IsEditable. + 2005-08-22 Dan Winship * generator/CallbackGen.cs (Validate, MarshalType): if validation diff --git a/generator/Property.cs b/generator/Property.cs index 59fa17894..f3524bfc0 100644 --- a/generator/Property.cs +++ b/generator/Property.cs @@ -55,6 +55,13 @@ namespace GtkSharp.Generation { } } + bool IsDeprecated { + get { + return !container_type.IsDeprecated && + elem.GetAttribute ("deprecated") == "1"; + } + } + protected virtual string PropertyAttribute (string qpname) { return "[GLib.Property (" + qpname + ")]"; } @@ -118,6 +125,10 @@ namespace GtkSharp.Generation { GenerateImports (gen_info, indent); + if (IsDeprecated || + (Getter != null && Getter.IsDeprecated) || + (Setter != null && Setter.IsDeprecated)) + sw.WriteLine (indent + "[Obsolete]"); sw.WriteLine (indent + PropertyAttribute (qpname)); sw.WriteLine (indent + "public " + modifiers + CSType + " " + name + " {"); indent += "\t"; diff --git a/gtk/Entry.custom b/gtk/Entry.custom index 36088a7a8..f2f46304d 100644 --- a/gtk/Entry.custom +++ b/gtk/Entry.custom @@ -32,3 +32,9 @@ public Entry(string initialText): this() { Text = initialText; } + +[Obsolete("Replaced by IsEditable property")] +public bool Editable { + get { return IsEditable; } + set { IsEditable = value; } +} diff --git a/gtk/Gtk.metadata b/gtk/Gtk.metadata index 7324929c4..2ffc1469c 100644 --- a/gtk/Gtk.metadata +++ b/gtk/Gtk.metadata @@ -262,8 +262,10 @@ GtkResponseType GtkResponseType GtkResponseType + 1 1 1 + 1 Activated ClipboardCopied ClipboardCut @@ -384,6 +386,7 @@ Deactivated 1 1 + 1 1 1 1