While working on my patch for M-641, I found the requirement for the selection lists to exactly match the underlying enum types annoying. It required me to display unimplemented options and I was unable to add new options in the place in the list I felt they belonged.
The patch I wrote to resolve these problems is at http://home.ix.netcom.com/~mchase/ChoiceList-mac-1.patch . This patch requires that the M-641 patch be applied first. Short Summary: Avoids displaying unimplemented tests and actions and changes the display order for tests, targets, and actions. Long Summary from patch file: # At each point where test, target, or action is passed to or from its # wxChoice control, the <type>_fromSelect() or <type>_toSelect() # functions created with ENUM_fromSelect and ENUM_toSelect is used # to make sure the wxChoice selection index is used inside the # control and the associated enum value is used everywhere else. # Define macros SKIP_UNIMPLEMENTED_LABELS, ENUM_fromSelect, and # ENUM_toSelect. # Reorder ORC_Types[], ORC_W_Names[], and OAC_Types[] and remove # alternate strings for unimplemented tests and actions. # Add ORC_T_Swap[], ORC_W_Swap[], and OAC_T_Swap[] to keep track of # the enum for each string in ORC_Types[], ORC_W_Names[], and # OAC_Types[]. # Add ORC_TypesCountS, ORC_WhereCountS, and OAC_TypesCountS to count # the number of actually used labels. The original count variables # are left alone so they can still be used in compile time checks. # Use ENUM_fromSelect and ENUM_toSelect to create translation # functions for MFDialogTest, MFDialogTarget, and MFDialogAction. # In wxOneFilterDialog:: # Add SKIP_UNIMPLEMENTED_LABELS to wxOneFilterDialog() to remove # unimplemented tests and actions from the label and swap # arrays. This is not necessary for targets, because all # targets are implemented. # # Tidying up: # Remove unused macros FILTER_NAME, FILTER_CRITERIUM, # FILTER_ACTION, and FILTER_ACTIVE. # Replace x->Select() with x->SetSelection(). -- 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: 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
