mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-23 17:35:33 +00:00
2003-01-01 Alp Toker <alp@atoker.com>
* glade/XML.custom: Determine name of GladeWidget if none specified * glade/GladeWidgetAttribute.cs: ditto svn path=/trunk/gtk-sharp/; revision=10049
This commit is contained in:
parent
3841924432
commit
9f6872634a
|
@ -1,3 +1,8 @@
|
|||
2003-01-01 Alp Toker <alp@atoker.com>
|
||||
|
||||
* glade/XML.custom: Determine name of GladeWidget if none specified
|
||||
* glade/GladeWidgetAttribute.cs: ditto
|
||||
|
||||
2003-01-01 Rachel Hestilow <hestilow@ximian.com>
|
||||
|
||||
* glade/XML.custom: New method BindFields.
|
||||
|
|
|
@ -11,16 +11,28 @@ namespace Glade {
|
|||
public class GladeWidgetAttribute : Attribute
|
||||
{
|
||||
private string name;
|
||||
private bool specified;
|
||||
|
||||
public GladeWidgetAttribute (string name)
|
||||
{
|
||||
specified = true;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public GladeWidgetAttribute ()
|
||||
{
|
||||
specified = false;
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return name; }
|
||||
}
|
||||
|
||||
public bool Specified
|
||||
{
|
||||
get { return specified; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -268,7 +268,8 @@
|
|||
// The widget to field binding must be 1:1, so only check
|
||||
// the first attribute.
|
||||
GladeWidgetAttribute widget = (GladeWidgetAttribute) attrs[0];
|
||||
field.SetValue (target, GetWidget (widget.Name), flags, null, null);
|
||||
if (widget.Specified) field.SetValue (target, GetWidget (widget.Name), flags, null, null);
|
||||
else field.SetValue (target, GetWidget (field.Name), flags, null, null);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue