On Wed, 04 Jul 2012, Carlos R. Mafra escribió:

> On Tue,  3 Jul 2012 at 19:35:37 +0200, Rodolfo García Peñas wrote:
> > 
> > The function wIconCreate has now a new interface:
> > 
> > -WIcon * wIconCreate(WWindow *wwin);
> > +WIcon *wIconCreate(WWindow *wwin, WScreen *scr, char *command,
> > +                  char *instance, char *class, int tile_type);
> > 
> > This new interface is easy to set, because the screen, instance and class
> > are included in the WWindow struct. Only command and tile_type are added.
> > 
> > This change is done to join the functions wIconCreate and
> > wIconCreateWithIconFile.
> 
> 
> > -           wwin->icon = wIconCreate(wwin);
> > +           wwin->icon = wIconCreate(wwin, wwin->screen_ptr, NULL, 
> > wwin->wm_instance,
> > +                                    wwin->wm_class, TILE_NORMAL);
> > +
> 
> 
> > -   aicon->icon = wIconCreate(leader_win);
> > +   aicon->icon = wIconCreate(leader_win, scr, NULL, 
> > leader_win->wm_instance, leader_win->wm_class, TILE_NORMAL);
> 
> There must be another way. This is simply too ugly to live.

Sure, I was thinking on it after sent the patches. I just sent patches with the 
same idea, using intermediate functions, to provide the same "old" functions 
and inteface to the new unified function.
 
> If you want the icon for a window 'wwin' you should simply
> say wIconCreate(wwin). That's it, direct and simple.
> 
> You are proposing to pollute the call with all this other stuff that
> can be obtained trivially from wwin. That makes the interface more
> complicated. No.

I agree.

-- 
||// //\\// Rodolfo "kix" Garcia
||\\// //\\ http://www.kix.es/


-- 
To unsubscribe, send mail to [email protected].

Reply via email to