mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-08 07:53:17 +02:00
2008-09-16 Jeffrey Stedfast <fejj@novell.com>
* generator/Property.cs (IsDeprecated): Allow "1" or "true". * generator/Method.cs (.ctor): Allow "1" or "true". * generator/ClassBase.cs: Allow a value of "true" to work the same as "1" for the deprecated and abstract attributes. svn path=/trunk/gtk-sharp/; revision=113238
This commit is contained in:
parent
2afce85920
commit
ccb3ac6a13
@ -68,10 +68,15 @@ namespace GtkSharp.Generation {
|
||||
|
||||
protected ClassBase (XmlElement ns, XmlElement elem) : base (ns, elem) {
|
||||
|
||||
if (elem.HasAttribute ("deprecated"))
|
||||
deprecated = elem.GetAttribute ("deprecated") == "1";
|
||||
if (elem.HasAttribute ("abstract"))
|
||||
isabstract = elem.GetAttribute ("abstract") == "1";
|
||||
if (elem.HasAttribute ("deprecated")) {
|
||||
string attr = elem.GetAttribute ("deprecated");
|
||||
deprecated = attr == "1" || attr == "true";
|
||||
}
|
||||
|
||||
if (elem.HasAttribute ("abstract")) {
|
||||
string attr = elem.GetAttribute ("abstract");
|
||||
isabstract = attr == "1" || attr == "true";
|
||||
}
|
||||
|
||||
foreach (XmlNode node in elem.ChildNodes) {
|
||||
if (!(node is XmlElement)) continue;
|
||||
|
@ -39,8 +39,12 @@ namespace GtkSharp.Generation {
|
||||
public Method (XmlElement elem, ClassBase container_type) : base (elem, container_type)
|
||||
{
|
||||
this.retval = new ReturnValue (elem["return-type"]);
|
||||
if (!container_type.IsDeprecated && elem.HasAttribute ("deprecated"))
|
||||
deprecated = elem.GetAttribute ("deprecated") == "1";
|
||||
|
||||
if (!container_type.IsDeprecated && elem.HasAttribute ("deprecated")) {
|
||||
string attr = elem.GetAttribute ("deprecated");
|
||||
deprecated = attr == "1" || attr == "true";
|
||||
}
|
||||
|
||||
if (Name == "GetType")
|
||||
Name = "GetGType";
|
||||
}
|
||||
|
@ -58,7 +58,8 @@ namespace GtkSharp.Generation {
|
||||
bool IsDeprecated {
|
||||
get {
|
||||
return !container_type.IsDeprecated &&
|
||||
elem.GetAttribute ("deprecated") == "1";
|
||||
(elem.GetAttribute ("deprecated") == "1" ||
|
||||
elem.GetAttribute ("deprecated") == "true");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user