[MonoDevelop] Patch for a simple (bug? feature?) in stetic

Lluis Sanchez lluis at ximian.com
Sun Jun 11 14:49:33 EDT 2006


El dg 11 de 06 del 2006 a les 19:57 +0200, en/na ml va escriure:
> Case is as following stetic forces generating the code on every single
> property in class
> 
> even when it is Read Only, which would probably be better fixed with
> actually correcting discovery on IsWritable on some property.
> 
> Case not really taken in question is that some properties MUSTN'T be
> touched in any way in code generation.

Can you explain better this case? If you don't want a property to be
touched by code generation you can override GeneratePropertySet in the
wrapper and do nothing for that particular property. On the other hand,
wrapper properties won't be generated, unless there is a property with
the same name in the widget.

> 
> This patch provides with ability to set avoid-init and CodeGenerator
> skips this property:
> 
>   <object label="Data Bin" type="Gtk.DataBindings.DataBin"
> palette-category="container">
>     <itemgroups>
>       <itemgroup ref="Gtk.Widget" />
>       <itemgroup label="DataBin Properties">
>         <property name="InheritedDataSource" />
>         <property name="DenyParentBoundaries" />
>         <property name="InheritedBoundaryDataSource" />
>         <property name="BoundaryMappings" />
>         <property name="Adaptor" avoid-init="true" />
>         <property name="DataSource" avoid-init="true" />
>         <property name="BoundaryDataSource" avoid-init="true" />
>       </itemgroup>
>     </itemgroups>
>     <signals>
>       <itemgroup ref="Gtk.Widget" />
>     </signals>
>   </object>
> 
> Second thing I noticed, Control Groups in Widget Palette are hardcoded.
> Is this the only option?

Right now, yes. I think it makes sense to allow adding new categories in
a more extensible way, but I haven't spent much time on this since there
are other more important things to finish.

> 
> I'm implementing DataBindings for gtk widgets and it would be much more
> sane approach where adaptable controls are separated from non-adaptable.
> So far I just hardcoded Groups in Palette.cs like this
> 
> public Palette () : base (false, 0)
> {
>   groups = new Hashtable ();
>   Registry.RegistryChanged += OnRegistryChanged;
>   ShowGroup ("window", "Windows");
>   ShowGroup ("widget", "Widgets");
>   ShowGroup ("datawidget", "Data Widgets");
>   ShowGroup ("container", "Containers");
>   ShowGroup ("datacontainer", "Data Containers");
>   //ShowGroup ("toolbaritem", "Toolbar Items");
>   ShowGroup ("actions", "Actions");
> }
> 
> My question is as follows, is there any better approach than hardcoding
> in stetic?
> 
> m.
> _______________________________________________
> Monodevelop-list mailing list
> Monodevelop-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monodevelop-list



More information about the Monodevelop-list mailing list