2009-09-23 Mike Kestner <mkestner@novell.com>
* generator/ReturnValue.cs: support metadata override of default return values. Based on a patch from Sebastian Dröge. [Fixes #541299] svn path=/trunk/gtk-sharp/; revision=142516
This commit is contained in:
parent
0eece4438f
commit
c5c48dfd1c
2 changed files with 9 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2009-09-23 Mike Kestner <mkestner@novell.com>
|
||||
|
||||
* generator/ReturnValue.cs: support metadata override of default return
|
||||
values. Based on a patch from Sebastian Dröge. [Fixes #541299]
|
||||
|
||||
2009-09-22 Brad Taylor <brad@getcoded.net>
|
||||
|
||||
* glib/Idle.cs:
|
||||
|
|
|
@ -32,6 +32,7 @@ namespace GtkSharp.Generation {
|
|||
bool elements_owned;
|
||||
bool owned;
|
||||
string ctype = String.Empty;
|
||||
string default_value = String.Empty;
|
||||
string element_ctype = String.Empty;
|
||||
|
||||
public ReturnValue (XmlElement elem)
|
||||
|
@ -42,6 +43,7 @@ namespace GtkSharp.Generation {
|
|||
elements_owned = elem.GetAttribute ("elements_owned") == "true";
|
||||
owned = elem.GetAttribute ("owned") == "true";
|
||||
ctype = elem.GetAttribute("type");
|
||||
default_value = elem.GetAttribute ("default_value");
|
||||
element_ctype = elem.GetAttribute ("element_type");
|
||||
}
|
||||
}
|
||||
|
@ -66,6 +68,8 @@ namespace GtkSharp.Generation {
|
|||
|
||||
public string DefaultValue {
|
||||
get {
|
||||
if (default_value != null && default_value.Length > 0)
|
||||
return default_value;
|
||||
if (IGen == null)
|
||||
return String.Empty;
|
||||
return IGen.DefaultValue;
|
||||
|
|
Loading…
Reference in a new issue