On Mon, 2 Sep 2002 15:38:10 +0200 (CET) Vadim Zeitlin
<[EMAIL PROTECTED]> wrote:
The attached patch probably shouldn't be applied since I haven't made the
GUI changes you suggested yet, but I wanted to show you what I have so far
to make sure I'm not too far off base.
> I think you only need 2 new OAC_T_* values, e.g. OAC_T_SetFlag and
> OAC_T_ClearFlag -- or maybe just one if you can combine both actions
> somehow. You're right that the encoded Settings string uses these values
> (which is why you shouldn't change their numeric values!) but ORC_T_ is for
> the new tests, so why do you need it?
As long as I was messing with the flags, I thought being able to test them
would be handy too, so I added a flag("x") test (ORC_T_FlagSet).
For actions, I added OAC_T_SetFlag, OAC_T_ClearFlag, and OAC_T_SetScore.
I also changed OAC_T_ChangeScore to OAC_T_AddScore to be more consistent.
To help me keep things straight, I added the ORC_T_*, ORC_W_*, ORC_L_*, and
OAC_T_* names as comments to the associated arrays in
src/classes/MFilter.cpp and src/gui/wxFiltersDialog.cpp.
> It's not clear what clearing 'N' flag would do and also note that you
> cannot change 'R' flag at all. So "N" is really just the same as "U".
The attached patch only changes one flag at a time from 'UDAS*'. It does
test "R" for whatever it's worth.
> It would indeed be nice to use USE_HEADER_SCORE everywhere. The only
> subtlety is that the values of the enum elements should not be changed (see
> above) somehow. The easiest way to do it would probably be to keep them in
> the enum but put some special marker (e.g. empty string) in the
> corresponding arrays #ifndef USE_HEADER_SCORE and recognize this marker in
> the GUI code by simply skipping the corresponding fields.
I couldn't find where in the GUI code an unused array entry would be
skipped. In src/gui/wxFiltersDialog.cpp, it looks like the entire *_tTypes
arrays get passed to wxChoice(). I haven't figured out yet how m_Type or
m_Where could tell the GUI not to display certain of their elements. It
looks like a validator might do the trick, but that's probably more work
than it's worth and I'm not sure whether that would throw off the selection
indexes.
I put in the code to substitute "" for unimplemented functions, but I don't
think that will do what we want either.
I added a bit in ORC_T_Flags[] and OAC_T_Flags[] so it will be easier to
identify which tests and actions aren't implemented.
I have not tried to compile the changed code, so there may be some syntax
errors. At this point, I'm more interested in having you take a look at
what I'm trying to see if it makes any sense. I'll be tackling the GUI
code tomorrow now that I think I understand what needs to be added.
--
Mac :})
** I normally forward private questions to the appropriate mail list. **
Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Mahogany-Developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-developers