On Mon, 14 Oct 2002 17:41:11 -0700 (PDT) Michael A Chase <[EMAIL PROTECTED]> wrote:
MAC> I just uploaded my candidate patch to MAC> http://home.ix.netcom.com/~mchase/M-641-mac-1.patch . It's about 38K, MAC> so I wanted some comments before I sent it to the list or Bugzilla. Sorry as usual for the delay with replying -- OTOH you did fix a few bugs apparently while I was going to reply to your previous message ;-) MAC> There is a more detailed list of the changes at the top of the patch. Ok, pasting it in here: # In include/MFilter.h: # Add enum values ORC_T_HasFlag, OAC_T_SetFlag, OAC_T_ClearFlag, adn OAC_T_SetScore # Add enum types MFDialogHasFlag and MFDialogSetFlag. # Rename enum value OAC_T_ChangeScore to OAC_T_AddScore. Ok. # Add declarations for FilterTestImplemented(), FilterActionNeedsArg(), FilterActionUsesColour(), # FilterActionUsesFolder(), FilterActionMsgFlag(), and FilterActionImplemented(). Is there any reason why the first and the last of those take an int and not a corresponding enum? # In src/classes/MFilter.cpp: # Add ORC_T_HasFlag entry to ORC_T_Names[]. # Add comments giving enum symbols for ORC_T_Flags[], ORC_W_Names[], OAC_T_Names[] # Add bits OAC_F_Colour, OAC_F_Folder, OAC_F_MsgFlag, and OAC_F_Unimplemented to OAC_T_Flags[]. # Add checks for USE_PYTHON, USE_HEADER_SCORE. # Add FilterTestImplemented(), FilterActionNeedsArg(), FilterActionUsesColour(), FilterActionUsesFolder(), # FilterActionMsgFlag(), and FilterActionImplemented() to report bits in ORC_T_Flags[] and OAC_T_Flags[]. # Replace bit tests against OAC_T_Flags[] with function calls. Ok. # In src/gui/wxFilterDialog.cpp: # Add comments giving enum symbols for ORC_Types[], ORC_Where[], ORC_Logical[], and OAC_Types[]. # Add ORC_Msg_Flag[] and OAC_Msg_Flag. # Add checks for USE_PYTHON, USE_HEADER_SCORE. # In OneCritControl:: # Change GetArgument to include m_Msg_Flag. # Add m_Msg_Flag. Could you please do something equivalent to "%s/m_Msg_Flag/m_choiceFlags/g" in your editor? I prefer to name the GUI controls with the prefix corresponding to their type -- the existing code there doesn't do it and I don't really want to change it but I'd like the new code to follow this convention. # Change UpdateUI() to use FilterTest*() functions so it is controlled by ORC_T_Flags[]. # ??? Remove code to clear argument string??? # Change SetValues() to handle m_Msg_Flag. # In OneActionControl:: # Change SetValues() to handle m_Msg_Flag. # Change Get_Argument() to include m_Msg_Flag. # Add m_Msg_Flag. # Change UpdateUI() to use FilterAction*() functions so it is controlled by OAC_T_Flags[]. # ??? Add code to clear argument string??? # Add call to DoUpdateUI() to wxOneFilterDialog::TransferDataToWindow(). # # In src/modules/Filters.cpp: # Add func_hasflag(), func_setscore(), func_do_setflag(), func_setflag(), and func_clearflag(). # Add new functions to list of builtin functions. Very good. Thanks a lot for the detailed description of the changes, it makes it so much easier to read the patch! MAC> > If I hide the argument instead of just disabling it, I should be able to MAC> > remove the code for clearing the argument when it is not being used; that MAC> > would allow the value to persist even if the user temporarily stops at a MAC> > test or action that is unimplemented or doesn't use the argument. I MAC> > changed the UpdateUI() methods to always enable/disable and show/hide the MAC> > argument, where, and buttons based on the test or action. Is this MAC> > acceptable, or shold I leave the unused controls visible but disabled as MAC> > long as their realestate isn't being used by another control? MAC> MAC> I left the argument erase code in, but could remove it very easily. I MAC> think hiding the controls is better than blotting out the string. I'll have to look at it to understand which is better. I think what you did should be ok. MAC> > The searched flag doesn't appear to be useable. It doesn't show up in the MAC> > folder view when I set it. I haven't completed testing, but it also MAC> > doesn't appear to get set when I set it. I'm considering just not making MAC> > it available, but if it will become useful, I should include it. Should MAC> > I? MAC> MAC> I am still puzzled by this one. I have left "S" in for now, but could MAC> remove it easily. The enum values don't appear anywhere outside MAC> wxFilterDialog.cpp, so there won't be much impact either way. There is no "Searched" flag, it's really a pseudo flag conjured out of thin air by mail_search(). I don't think it makes sense to support it here. OTOH, when we have support for the user-defined flags (something which most IMAP servers can do and which could be implemented with the local files quite easily), it would be nice to have support for them here -- but it's for the future. Let me know if/when you're going to update the patch to incorporate the minor changes I mentioned and I'll apply it (you can leave it on the web, I'll fetch it from there). Thanks! VZ ------------------------------------------------------- This sf.net email is sponsored by: viaVerio will pay you up to $1,000 for every account that you consolidate with us. http://ad.doubleclick.net/clk;4749864;7604308;v? http://www.viaverio.com/consolidator/osdn.cfm _______________________________________________ Mahogany-Developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/mahogany-developers