The View

25 Sep 2006

Spent a bit of time fiddling with EWL today. Took a look at the tooltip issue.
Passed it over to RbdPngn as I hate fill
policies and it appears to be a fill policy issue.

Added a touch of caching to the icon theme code that’s in CVS. This plugs a bit
of a leak we’ve had since ecore_desktop switched over to returning char *’s
instead of const char *’s. The cache should invalidate itself when the icon
theme changes.

But, enough with the preamble. The other change today was a nice API breaking
one. I bit the bullet and implemented Ewl_MVC which handles all of the
Model-View-Controller stuff that was currently spread out through the Ewl_Tree2,
Ewl_Combo and Ewl_List code.

What does this mean for you, the EWL connoisseur?

Basically, if you use Ewl_List, Ewl_Tree2 or Ewl_Combo I just broke your code.
On the upside it’s easy to fix.

If you’re using any of those widgets you’ve probably used the _view_set(),
_model_set(), _data_set() or _dirty_set() calls. All of these calls
(and their _get() counterparts) have been moved into Ewl_MVC. The Ewl_List,
Ewl_Combo and Ewl_Tree2 widgets all inherit from Ewl_MVC (which inherits from
Ewl_Box in turn).

To fix your code all you need to do is change the above calls to be
ewl_mvc_view_set(), ewl_mvc_model_set(), ewl_mvc_data_set() or
ewl_mvc_dirty_set().

That should clear everything up.

I’m hoping to make a couple more additions to the Ewl_MVC widget once I get a
chance. The big one is to add the selection code in there as well. All of the
current MVC widgets handle selection. For combo it’s only single select but for
the other two it’s single or multi-select.

Hopefully we can extract this common code out and get it centralized into the
Ewl_MVC widget.

As usual, any bugs should be reported to the mailing list or logged to
xcomputerman.com/bugs (or just send me an
email.