* 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. svn path=/trunk/gtk-sharp/; revision=48680
This commit is contained in:
parent
b0f83bc0ad
commit
ba1eeecbfb
4 changed files with 34 additions and 0 deletions
14
ChangeLog
14
ChangeLog
|
@ -1,3 +1,17 @@
|
|||
2005-08-22 Dan Winship <danw@novell.com>
|
||||
|
||||
* 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 <danw@novell.com>
|
||||
|
||||
* generator/CallbackGen.cs (Validate, MarshalType): if validation
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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; }
|
||||
}
|
||||
|
|
|
@ -262,8 +262,10 @@
|
|||
<attr path="/api/namespace/object[@cname='GtkDialog']/method[@name='SetDefaultResponse']/*/*[@name='response_id']" name="type">GtkResponseType</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkDialog']/method[@name='SetResponseSensitive']/*/*[@name='response_id']" name="type">GtkResponseType</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkDialog']/signal[@name='Response']/*/*[@name='response_id']" name="type">GtkResponseType</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkEntry']/method[@name='SetEditable']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkEntry']/method[@name='SetPosition']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkEntry']/method[@name='SelectRegion']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkEntry']/property[@name='Editable']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkEntry']/signal[@name='Activate']" name="name">Activated</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkEntry']/signal[@name='CopyClipboard']" name="name">ClipboardCopied</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkEntry']/signal[@name='CutClipboard']" name="name">ClipboardCut</attr>
|
||||
|
@ -384,6 +386,7 @@
|
|||
<attr path="/api/namespace/object[@cname='GtkMenuShell']/signal[@name='Deactivate']" name="name">Deactivated</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkMessageDialog']/constructor[@cname='gtk_message_dialog_new']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkMessageDialog']/constructor[@cname='gtk_message_dialog_new_with_markup']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkNotebook']/property[@name='Homogeneous']" name="deprecated">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkObject']/constructor[@cname='gtk_object_new']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkObject']/method[@name='Destroy']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkObject']/method[@name='Get']" name="hidden">1</attr>
|
||||
|
|
Loading…
Reference in a new issue