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

Re: Reworking the GTK+ cdebconf frontend



On Mon, Jul 02, 2007 at 10:45:47AM +0200, Attilio Fiandrotti wrote:
> We must decide anyway how kbd-chooser and the GTK frontend should 
> communicate (although it's one-way signaling, from kbd-chooser to the 
> GTK frontend).
> 
> Options are
> 
> 1) by mean of a debconf question (debconf abuse?)

See other option 4.

> 2) by mean of a named pipe or a socket (probably the simplest option)

Named pipe won't fit, see mkfifo(2):

  Once you have created a FIFO special file in this way, any process can
  open it for reading or writing, in the same way as an ordinary file.
  However, it has to be open at both ends simultaneously before you can
  proceed to do any input or output operations on it.  Opening a FIFO
  for reading normally blocks until some other process opens the same
  FIFO for writing, and vice versa.

> 3) by mean of a special question type the GTK frontend handles from 
> within a plugin.

Why not!  I'm all in favor of adding new plugins with enhanced graphical
prompts.  For kbd-chooser, we could show a graphical view of the keymap
which could be lovely.

> In the latter case, we could move all the DirectFB specific code 
> currently embedded in the frontend into a separate plugin, which can be 
> disabled when building aganst X11 targets.
> 
> Of course i can take care of the GTK frontend-side implementation of the 
> mechanism.
> 
> Any other option ?

Well, I see another option which does not need any change outside the
code of the GTK+ frontend, but might not be as efficient as a real
signal mechanism:

4) The frontend could save the value of "debian-installer/keymap" and
   test if there was any change on each GO.  If the value has changed,
   it reloads the keymap and save this new value internally.

This does not look so different from 1) and does not need a new debconf
question.

5) Unix signal: kbd-chooser send a SIGHUP to the cdebconf process.

Is there any limitation on signal handling in the GTK+ DirectFB port?  

Cheers,
-- 
Jérémy Bobbio                        .''`. 
lunar@debian.org                    : :Ⓐ  :  # apt-get install anarchism
                                    `. `'` 
                                      `-   

Attachment: signature.asc
Description: Digital signature


Reply to: