[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Implementing plugins in the GTK frontend



On Mon, Jan 30, 2006 at 02:23:55AM +0100, Attilio Fiandrotti wrote:
> today i carefully red the plugins documentation and i finally understood
> they are meant to replace a question handler basing on the question's
> "type" and not "tag" field.. doh! :(
> I suppose i won't be able to move out of the GTK frontend the handlers
> for "countrychooser/country-name" nor "partman/choose_partition" unless
> a plugin system per-question-tag is implemented or the countrychooser
> and partman are modified to ask a, respectively, "country-name" and
> "choose_partition" type of questions.

IMHO, it's usually a bad idea to do anything on the basis of question
names in cdebconf; question names belong to the package asking the
questions, not to cdebconf or even to cdebconf plugins, and might change
at any time. That said, I suppose if the plugins were added to the
source packages owning the questions (which is the right way to do it
anyway), then it would be OK to make them per-question-name.

My intention when designing the plugins interface was to have packages
check for a plugin capability using CAPB, and if they find that the
plugin they want is present then they can ask a *different* question
with a suitable type. (You can't change the types for
countrychooser/country-name or partman/choose_partition because then
other frontends wouldn't know what to do with them, but you can modify
localechooser and partman-base to ask different questions if some
appropriate plugin is there.)

-- 
Colin Watson                                       [cjwatson@debian.org]



Reply to: