Attached is my patch to fix the compaq cxx problems I created in the RadioButtonGroup class. -- Baruch Even http://techst02.technion.ac.il/~sbaruch/ (My Site) http://rpghost.com/jindor/ (My brothers AD&D site) " Learn to laugh ... it's the path to true love! " - The Angel in the movie Michael
Index: ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/ChangeLog,v retrieving revision 1.459 diff -u -r1.459 ChangeLog --- ChangeLog 2000/07/31 13:36:02 1.459 +++ ChangeLog 2000/07/31 16:50:30 @@ -1,3 +1,8 @@ +2000-07-31 Baruch Even <[EMAIL PROTECTED]> + + * src/frontends/xforms/RadioButtonGroup.C: Changed to use home-brew + templates to satisfy compaq cxx. + 2000-07-31 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> * src/frontends/xforms/FormGraphics.C (apply): add some Index: po/POTFILES.in =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/po/POTFILES.in,v retrieving revision 1.51 diff -u -r1.51 POTFILES.in --- po/POTFILES.in 2000/07/31 12:30:07 1.51 +++ po/POTFILES.in 2000/07/31 16:50:31 @@ -26,7 +26,6 @@ src/filedlg.C src/FontLoader.C src/form1.C -src/frontends/gnome/Menubar_pimpl.C src/frontends/xforms/FormCitation.C src/frontends/xforms/form_citation.C src/frontends/xforms/FormCopyright.C @@ -37,12 +36,6 @@ src/frontends/xforms/form_preferences.C src/frontends/xforms/FormPrint.C src/frontends/xforms/form_print.C -src/frontends/xforms/forms/form_citation.C -src/frontends/xforms/forms/form_copyright.C -src/frontends/xforms/forms/form_preferences.C -src/frontends/xforms/forms/form_print.C -src/frontends/xforms/forms/form_tabular.C -src/frontends/xforms/forms/form_url.C src/frontends/xforms/FormTabular.C src/frontends/xforms/form_tabular.C src/frontends/xforms/FormUrl.C Index: src/frontends/xforms/Makefile.am =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/Makefile.am,v retrieving revision 1.7 diff -u -r1.7 Makefile.am --- src/frontends/xforms/Makefile.am 2000/07/31 12:30:08 1.7 +++ src/frontends/xforms/Makefile.am 2000/07/31 16:50:37 @@ -11,10 +11,6 @@ ETAGS_ARGS = --lang=c++ libxforms_la_SOURCES = \ Dialogs.C \ - FormCitation.C \ - FormCitation.h \ - form_citation.C \ - form_citation.h \ FormCopyright.C \ FormCopyright.h \ form_copyright.C \ @@ -31,6 +27,14 @@ FormPrint.h \ form_print.C \ form_print.h \ + FormGraphics.C \ + FormGraphics.h \ + form_graphics.C \ + form_graphics.h \ + FormCitation.C \ + FormCitation.h \ + form_citation.C \ + form_citation.h \ FormTabular.C \ FormTabular.h \ form_tabular.C \ Index: src/frontends/xforms/RadioButtonGroup.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/RadioButtonGroup.C,v retrieving revision 1.2 diff -u -r1.2 RadioButtonGroup.C --- src/frontends/xforms/RadioButtonGroup.C 2000/07/31 13:36:03 1.2 +++ src/frontends/xforms/RadioButtonGroup.C 2000/07/31 16:50:37 @@ -23,24 +23,17 @@ #include <algorithm> #include <iterator> using std::find_if; +using std::bind2nd; using std::endl; void RadioButtonGroup::registerRadioButton(FL_OBJECT *button, int value) { -#if 0 - bvec.push_back(button); - vvec.push_back(value); -#endif map.push_back( ButtonValuePair(button, value) ); } void RadioButtonGroup::reset() { -#if 0 - bvec.clear(); - vvec.clear(); -#endif map.clear(); } @@ -54,7 +47,7 @@ template <typename T> struct equal_to_second_in_pair { typedef bool result_type; - typedef T first_argument_type; + typedef T first_argument_type; typedef typename T::second_type second_argument_type; bool operator() ( @@ -67,37 +60,11 @@ void RadioButtonGroup::setButton(int value) { -#if 0 - ValueVector::iterator vit = - find_if(vvec.begin(), vvec.end(), - bind2nd(equal_to<int>(), value)); - - if (vit == vvec.end()) { - lyxerr << "BUG: Requested value in RadioButtonGroup doesn't exists" - << endl; - return; - } - - unsigned n = std::distance(vvec.begin(), vit); - - fl_set_button(bvec[n], 1); -#endif - - ButtonValueMap::const_iterator it = -#if 0 find_if(map.begin(), map.end(), bind2nd(equal_to_second_in_pair<ButtonValuePair>(), value)); -#else - std::find_if(map.begin(), map.end(), - std::compose1( - std::bind2nd(std::equal_to<int>(), value) - , - std::select2nd<ButtonValuePair>() - ) - ); -#endif + // If we found nothing, report it and return if (it == map.end()) { lyxerr << "BUG: Requested value in RadioButtonGroup doesn't exists" @@ -118,21 +85,6 @@ int RadioButtonGroup::getButton() { -#if 0 - ButtonVector::const_iterator bit = bvec.begin(); - ValueVector::const_iterator vit = vvec.begin(); - - while (bit != bvec.end()) { - if (fl_get_button(*bit)) - return *vit; - - bit++; - vit++; - } - - return 0; -#endif - // Find the first button that is active ButtonValueMap::iterator it = find_if(map.begin(), map.end(),