[Gtk-sharp-list] [PATCH] Glade.Parser API problem.

Francis Brosnan Blazquez francis at aspl.es
Fri Aug 26 06:05:59 EDT 2005


Hi,

While using Glade.Parser class I have found some problems at the
generated Glade.Parser API. Glade.Interface, Glade.WidgetInfo and
Glade.ChildInfo classes/structures doesn't provide full access to all
elements defined inside a glade file.

As an example, Glade.Interface class have a property named "toplevels".
This property should provide access to all toplevel elements defined for
a given glade file. But currently it only provides access to the first
element.

This problem is also found on properties defined on Glade.WidgetInfo and
Glade.ChildInfo classes.

I've added a bug report providing patches for gtk# 1.0 and gtk# 1.9
branches:

http://bugzilla.ximian.com/show_bug.cgi?id=75907

The approach I have followed to solve this problem is to provide new
methods to enable access to child info.

For Glade.Interface:
	public Glade.WidgetInfo GetNthChild (int pos);

For Glade.WidgetInfo:
	public Glade.Property        GetNthProperty (int pos);
	public Glade.Property        GetNthAtkProperty (int pos);
	public Glade.SignalInfo      GetNthSignalInfo (int pos);
	public Glade.AtkActionInfo   GetNthAtkActionInfo (int pos);
	public Glade.AtkRelationInfo GetNthAtkRelationInfo (int pos);
	public Glade.AccelInfo       GetNthAccelInfo (int pos);
	public Glade.ChildInfo       GetNthChildInfo (int pos);

For Glade.ChildInfo:
	public Glade.Property        GetNthProperty (int pos);


Cheers,


-- 
Francis Brosnan Blazquez <francis at aspl.es>
Advanced Software Production Line, S.L.



More information about the Gtk-sharp-list mailing list