[Gtk-sharp-list] TreeView.ScrollToCell bug/patch

Lee Mallabone gnome@fonicmonkey.net
25 Mar 2003 08:02:22 +0000


--=-l5PYudMvIT47g0Nh3iPc
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

On Tue, 2003-03-25 at 04:57, Mike Kestner wrote:
> If we aren't going to be fascist about error checking like that, it
> would probably be better to just mark both parameters with the null_ok
> attribute via metadata and let the generator produce the null handling
> code.

I think it would be nice to throw an explicit exception for bad
constructor usage, but it seems a bit like overkill at the moment.

> With one of the above corrections, yes.  If you choose to stick with the
> .custom, you can also kill the inline doc comment and just add them
> directly to the ECMA-XML docs.

I've updated the patch (attached) to just use the metadata for null_ok marking. If no one has any problems with it, I'll commit later today.

Regards,

Lee.


--=-l5PYudMvIT47g0Nh3iPc
Content-Disposition: attachment; filename=treeview2.diff
Content-Type: text/x-patch; name=treeview2.diff; charset=ANSI_X3.4-1968
Content-Transfer-Encoding: 7bit

Index: sources/Gtk.metadata
===================================================================
RCS file: /cvs/public/gtk-sharp/sources/Gtk.metadata,v
retrieving revision 1.45
diff -u -r1.45 Gtk.metadata
--- sources/Gtk.metadata	25 Mar 2003 00:47:12 -0000	1.45
+++ sources/Gtk.metadata	25 Mar 2003 08:17:53 -0000
@@ -1825,6 +1825,23 @@
   </data>
 </rule>
 <rule>
+  <class name="GtkTreeView">
+    <method>ScrollToCell</method>
+  </class>
+  <data>
+    <attribute target="param">
+      <filter level="type">GtkTreeViewColumn*</filter>
+      <name>null_ok</name>
+      <value>1</value>
+    </attribute>
+    <attribute target="param">
+      <filter level="type">GtkTreePath*</filter>
+      <name>null_ok</name>
+      <value>1</value>
+    </attribute>
+  </data>
+</rule>
+<rule>
   <class name="GtkProgressBar">
     <constructor>gtk_progress_bar_new_with_adjustment</constructor>
   </class>
Index: api/gtk-api.xml
===================================================================
RCS file: /cvs/public/gtk-sharp/api/gtk-api.xml,v
retrieving revision 1.27
diff -u -r1.27 gtk-api.xml
--- api/gtk-api.xml	25 Mar 2003 00:47:12 -0000	1.27
+++ api/gtk-api.xml	25 Mar 2003 08:17:57 -0000
@@ -8276,8 +8276,8 @@
       <method name="ScrollToCell" cname="gtk_tree_view_scroll_to_cell">
         <return-type type="void"/>
         <parameters>
-          <parameter type="GtkTreePath*" name="path"/>
-          <parameter type="GtkTreeViewColumn*" name="column"/>
+          <parameter type="GtkTreePath*" name="path" null_ok="1"/>
+          <parameter type="GtkTreeViewColumn*" name="column" null_ok="1"/>
           <parameter type="gboolean" name="use_align"/>
           <parameter type="gfloat" name="row_align"/>
           <parameter type="gfloat" name="col_align"/>
@@ -11862,7 +11862,6 @@
       </parameters>
     </callback>
     <object name="HTML" cname="GtkHTML" parent="GtkLayout">
-      <field cname="editor_bindings" type="GtkBindingSet*"/>
       <field cname="iframe_parent" type="GtkWidget*"/>
       <field cname="frame" type="HTMLObject*"/>
       <field cname="editor_api" type="GtkHTMLEditorAPI*"/>
@@ -12026,6 +12025,10 @@
           <parameter type="GtkHTMLCommandType" name="com_type"/>
         </parameters>
       </signal>
+      <property name="Editable" cname="editable" type="gboolean" doc-string=" _(Whether the html can be edited)" readable="true" writeable="true"/>
+      <property name="Title" cname="title" type="gchar*" doc-string=" _(The title of the current document)" readable="true" writeable="true"/>
+      <property name="DocumentBase" cname="document_base" type="gchar*" doc-string=" _(The base URL for relative references)" readable="true" writeable="true"/>
+      <property name="TargetBase" cname="target_base" type="gchar*" doc-string=" _(The base URL of the targe frame)" readable="true" writeable="true"/>
       <method name="AllowSelection" cname="gtk_html_allow_selection">
         <return-type type="void"/>
         <parameters>

--=-l5PYudMvIT47g0Nh3iPc--