Re: GTK fe: multiselect handler and hw-detect/select-modules problem
On Mon, May 23, 2005 at 10:08:54PM +0200, Attilio Fiandrotti wrote:
> at lines 645-647 in gtk.c we can find
>
> defcount = strchoicesplit(question_getvalue(q, ""), defvals, count);
> if (defcount <= 0)
> return DC_NOTOK;
>
> here i suppose we check thet a multiselect question without options is
> not displayed, but i think this should be changed to
>
> defcount = strchoicesplit(question_getvalue(q, ""), defvals, count);
> if (defcount < 0)
> return DC_NOTOK;
> else if (defcount == 0)
> return DC_OK;
>
> to prevent multiselect questions with no options (that, although
> illogical, should be correctly handled ) from crashing the frontend.
> This is exactly the case of hw-detect/select-modules if there are noa
> vailable modules to be loaded.
I actually made hw-detect >= 1.16 not ask that question if it would be
zero-length.
You say it crashes the frontend, but doesn't it just return an error?
I'm ambivalent about whether or not that's the right thing to do ...
(Either way, all cdebconf frontends should do the same thing in this
regard, so if this behaviour changes it should change in newt, text,
etc. too.)
--
Colin Watson [cjwatson@debian.org]
Reply to: