[Mono-list] GTK# Patch for TreeStore, ListStore, and TextIter
Kristian Rietveld
kris@gtk.org
21 Nov 2002 01:12:33 +0100
On Wed, 2002-11-20 at 20:56, Daniel Morgan wrote:
> Hey Mike,
>
> I have a patch for gtk-sharp/sources/Gtk.metadata.
>
> The patch has 3 fixes:
>
> 1. for TreeStore method SetColumnTypes, make the int types parameter an
> array.
> 2. for ListStore method SetColumnTypes, make the int types parameter an
> array.
> 3. for TextIter method ForwardSearch, make the TextIter parameters
> match_start and
> match_end to be out.
>
> For 3., I'm sure there are other "search" methods that need fixing, but I
> want to see how this fix works first.
>
> Are these okay?
>
> Thanks,
> Daniel
> ----
Hello,
Miguel asked me to review your patch. My comments are below
> Index: Gtk.metadata
> ===================================================================
> RCS file: /cvs/public/gtk-sharp/sources/Gtk.metadata,v
> retrieving revision 1.26
> diff -u -r1.26 Gtk.metadata
> --- Gtk.metadata 10 Nov 2002 10:03:51 -0000 1.26
> +++ Gtk.metadata 20 Nov 2002 19:35:53 -0000
> @@ -30,6 +30,25 @@
> </attribute>
> </data>
> </rule>
> +
> +<rule>
> + <class name="GtkTextIter">
> + <method>ForwardSearch</method>
> + </class>
> + <data>
> + <attribute target="param">
> + <filter level="name">match_start</filter>
> + <name>pass_as</name>
> + <value>out</value>
> + </attribute>
> + <attribute target="param">
> + <filter level="name">match_end</filter>
> + <name>pass_as</name>
> + <value>out</value>
> + </attribute>
> + </data>
> +</rule>
> +
This fix looks fine, I think you immediately can also commit a likewise
fix for BackwardSearch. (and yes, there certainly are more textiter
methods which need fixing ...)
> <rule>
> <class name="GtkEditable">
> <method>InsertText</method>
> @@ -59,6 +78,30 @@
> </attribute>
> </data>
> </rule>
> +<rule>
> + <class name="GtkListStore">
> + <method>SetColumnTypes</method>
> + </class>
> + <data>
> + <attribute target="param">
> + <filter level="name">types</filter>
> + <name>array</name>
> + <value>true</value>
> + </data>
> +</rule>
> +
> +<rule>
> + <class name="GtktTreeStore">
^
> + <method>SetColumnTypes</method>
> + </class>
> + <data>
> + <attribute target="param">
> + <filter level="name">types</filter>
> + <name>array</name>
> + <value>true</value>
> + </data>
> +</rule>
> +
I'm not sure about these. I'm feeling that they are wrong. I guess they
need the bit of var_arg magic like the {List,Tree}Store constructors
have.
A good way to test your changes to the metadata file is to regenerate
the autogenned sources and look how the generated functions look like.
regards,
Kris
(I'm feeling that I'm not being clear. If so, please tell me and I will
try to rewrite this message :)
> <rule>
> <class name="GtkTreeModelSort">
> <method>ConvertChildIterToIter</method>