On Monday 05 Apr 2004 3:51 pm, Martin Mathieson wrote:
> > > (2) I've become accustomed to the display filter syntax checking
> > > colouring. The attached patch to color_dlg.c adds this, but it
> > > looks a little odd as it doesn't apply to a new or existing
> > > filter until you edit them (existing ones start with the chosen
> > > color scheme of the rule, new ones appear with the string
> > > "filter" showing plainly).
> >
> > I'm having trouble parsing the phrase "display filter syntax
> > checking colouring". Could you explain what the patch does?
>
> This clumsy phrase refers to the neat syntax checking that now
> appears 'live' in most places where you can edit display filters.
> The background to the control changes between green and red to
> indicate at all times whether or not the expression being edited is
> valid or not.
>
> The patch just adds the line
>
> SIGNAL_CONNECT(*colorize_filter_text, "changed",
> filter_te_syntax_check_cb, NULL);
>
> to cause this routine to be used in the dialog for editing colouring
> rules.
I see, thanks.
I assume by your description of the caveats that you're changing the
dialog that has the list of filters. I'm not sure I like the idea,
since the background is already coloured by the filter colouring. That
is useful to check that the colour combination you have chosen is both
readable and not glaring, and also as a reference to colours you have
already used.
On the other hand the 'edit color filter' dialog (which appears when you
hit Edit) could keep the name of the filter in the filter colours and
colour the filter string as you suggest. My apologies if that is what
you did.
Whichever it is, I would like to see the initial colour of existing
filters set consistently. That's probably only another line or two of
code.
(I probably sound unreasonably proprietorial; I did add some code to
that dialog, but I wasn't the last to do so and to be fair there are
probably other opinions out there.)
--
Richard Urwin