Am Samstag, 7. Oktober 2006 08:30 schrieb Timothy Reaves: > ../../../src/frontends/controllers/BCView.h:47: error: expected > unqualified-id before '=' token > ../../../src/frontends/Alert.h:18: error: 'namespace Alert { }' > redeclared as different kind of symbol > /System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/Headers/Dialogs.h:799: > > error: previous declaration of 'DialogItemIndex Alert(SInt16, Boolean > (*)(OpaqueDialogPtr*, EventRecord*, DialogItemIndex*))'
This is a name clash that was already reported by Bennet. The attached patch should fix it, please try it out. If it does I am going to commit it. Georg
Index: src/lyxvc.C =================================================================== --- src/lyxvc.C (Revision 15264) +++ src/lyxvc.C (Arbeitskopie) @@ -37,6 +37,8 @@ using std::endl; using std::string; using std::pair; +namespace Alert = lyx::frontend::Alert; + LyXVC::LyXVC() { Index: src/lyx_cb.C =================================================================== --- src/lyx_cb.C (Revision 15264) +++ src/lyx_cb.C (Arbeitskopie) @@ -78,6 +78,7 @@ using lyx::support::unlink; using boost::shared_ptr; +namespace Alert = lyx::frontend::Alert; namespace fs = boost::filesystem; using std::back_inserter; Index: src/insets/insetbibtex.C =================================================================== --- src/insets/insetbibtex.C (Revision 15264) +++ src/insets/insetbibtex.C (Arbeitskopie) @@ -57,6 +57,7 @@ using lyx::support::subst; using lyx::support::tokenPos; using lyx::support::trim; +namespace Alert = lyx::frontend::Alert; namespace os = lyx::support::os; using std::endl; Index: src/insets/insettabular.C =================================================================== --- src/insets/insettabular.C (Revision 15264) +++ src/insets/insettabular.C (Arbeitskopie) @@ -72,6 +72,8 @@ using std::ostringstream; using std::swap; using std::vector; +namespace Alert = lyx::frontend::Alert; + namespace { Index: src/insets/insetinclude.C =================================================================== --- src/insets/insetinclude.C (Revision 15264) +++ src/insets/insetinclude.C (Arbeitskopie) @@ -81,6 +81,7 @@ using std::istringstream; using std::ostream; using std::ostringstream; +namespace Alert = lyx::frontend::Alert; namespace fs = boost::filesystem; Index: src/output.C =================================================================== --- src/output.C (Revision 15264) +++ src/output.C (Arbeitskopie) @@ -35,7 +35,7 @@ bool openFileWrite(ofstream & ofs, strin docstring const file = makeDisplayPath(fname, 50); docstring text = bformat(_("Could not open the specified " "document\n%1$s."), file); - Alert::error(_("Could not open file"), text); + lyx::frontend::Alert::error(_("Could not open file"), text); return false; } return true; Index: src/bufferlist.C =================================================================== --- src/bufferlist.C (Revision 15264) +++ src/bufferlist.C (Arbeitskopie) @@ -57,6 +57,8 @@ using std::vector; using std::back_inserter; using std::transform; +namespace Alert = lyx::frontend::Alert; + BufferList::BufferList() {} Index: src/exporter.C =================================================================== --- src/exporter.C (Revision 15264) +++ src/exporter.C (Arbeitskopie) @@ -53,6 +53,7 @@ using std::find; using std::string; using std::vector; +namespace Alert = lyx::frontend::Alert; namespace fs = boost::filesystem; namespace { Index: src/converter.C =================================================================== --- src/converter.C (Revision 15264) +++ src/converter.C (Arbeitskopie) @@ -58,6 +58,8 @@ using std::string; using std::vector; using std::distance; +namespace Alert = lyx::frontend::Alert; + namespace { @@ -449,9 +451,9 @@ bool Converters::convert(Buffer const * } else { // FIXME: this should go out of here. For example, here we cannot say if // it is a document (.lyx) or something else. Same goes for elsewhere. - Alert::error(_("Cannot convert file"), - bformat(_("An error occurred whilst running %1$s"), - lyx::from_ascii(command.substr(0, 50)))); + Alert::error(_("Cannot convert file"), + bformat(_("An error occurred whilst running %1$s"), + lyx::from_ascii(command.substr(0, 50)))); } return false; } Index: src/buffer.C =================================================================== --- src/buffer.C (Revision 15264) +++ src/buffer.C (Arbeitskopie) @@ -123,6 +123,7 @@ using lyx::support::subst; using lyx::support::tempName; using lyx::support::trim; +namespace Alert = lyx::frontend::Alert; namespace os = lyx::support::os; namespace fs = boost::filesystem; Index: src/lyxfunc.C =================================================================== --- src/lyxfunc.C (Revision 15264) +++ src/lyxfunc.C (Arbeitskopie) @@ -136,6 +136,7 @@ using std::string; using std::istringstream; using std::ostringstream; +namespace Alert = lyx::frontend::Alert; namespace biblio = lyx::biblio; namespace fs = boost::filesystem; Index: src/format.C =================================================================== --- src/format.C (Revision 15264) +++ src/format.C (Arbeitskopie) @@ -44,6 +44,7 @@ using lyx::support::token; using std::string; using std::distance; +namespace Alert = lyx::frontend::Alert; namespace fs = boost::filesystem; namespace os = lyx::support::os; Index: src/bufferparams.C =================================================================== --- src/bufferparams.C (Revision 15264) +++ src/bufferparams.C (Arbeitskopie) @@ -60,6 +60,7 @@ using std::ostream; using std::ostringstream; using std::pair; +namespace Alert = lyx::frontend::Alert; namespace biblio = lyx::biblio; Index: src/frontends/Alert.h =================================================================== --- src/frontends/Alert.h (Revision 15264) +++ src/frontends/Alert.h (Arbeitskopie) @@ -15,6 +15,8 @@ #include "support/lstrings.h" +namespace lyx { +namespace frontend { namespace Alert { /** @@ -58,5 +60,7 @@ askForText(lyx::docstring const & msg, lyx::docstring const & dflt = lyx::docstring()); } +} +} #endif // LYX_ALERT_H Index: src/frontends/qt3/validators.C =================================================================== --- src/frontends/qt3/validators.C (Revision 15264) +++ src/frontends/qt3/validators.C (Arbeitskopie) @@ -138,7 +138,7 @@ QValidator::State PathValidator::validat static int counter = 0; if (counter == 0) { - Alert::error(_("Invalid filename"), + lyx::frontend::Alert::error(_("Invalid filename"), _("LyX does not provide LateX support for file names containing any of these characters:\n") + lyx::from_utf8(printable_list(invalid_chars))); } Index: src/frontends/qt4/validators.C =================================================================== --- src/frontends/qt4/validators.C (Revision 15264) +++ src/frontends/qt4/validators.C (Arbeitskopie) @@ -138,7 +138,7 @@ QValidator::State PathValidator::validat static int counter = 0; if (counter == 0) { - Alert::error(_("Invalid filename"), + lyx::frontend::Alert::error(_("Invalid filename"), _("LyX does not provide LateX support for file names containing any of these characters:\n") + lyx::from_utf8(printable_list(invalid_chars))); } Index: src/frontends/Alert.C =================================================================== --- src/frontends/Alert.C (Revision 15264) +++ src/frontends/Alert.C (Arbeitskopie) @@ -24,6 +24,9 @@ using std::pair; using std::string; +namespace lyx { +namespace frontend { + int Alert::prompt(docstring const & title, docstring const & question, int default_button, int escape_button, docstring const & b1, docstring const & b2, docstring const & b3) @@ -98,3 +101,6 @@ pair<bool, docstring> const Alert::askFo return askForText_pimpl(msg, dflt); } + +} +} Index: src/lyxfind.C =================================================================== --- src/lyxfind.C (Revision 15264) +++ src/lyxfind.C (Arbeitskopie) @@ -137,7 +137,8 @@ bool findChange(DocIterator & cur) bool searchAllowed(BufferView * bv, string const & str) { if (str.empty()) { - Alert::error(_("Search error"), _("Search string is empty")); + lyx::frontend::Alert::error(_("Search error"), + _("Search string is empty")); return false; } return bv->buffer(); Index: src/importer.C =================================================================== --- src/importer.C (Revision 15264) +++ src/importer.C (Arbeitskopie) @@ -59,7 +59,7 @@ bool Importer::Import(LyXView * lv, stri } } if (loader_format.empty()) { - Alert::error(_("Couldn't import file"), + lyx::frontend::Alert::error(_("Couldn't import file"), bformat(_("No information for importing the format %1$s."), formats.prettyName(format))); return false; Index: src/BufferView.C =================================================================== --- src/BufferView.C (Revision 15264) +++ src/BufferView.C (Arbeitskopie) @@ -102,6 +102,8 @@ using std::mem_fun_ref; using std::string; using std::vector; +namespace Alert = lyx::frontend::Alert; + namespace { Index: src/lyx_main.C =================================================================== --- src/lyx_main.C (Revision 15264) +++ src/lyx_main.C (Arbeitskopie) @@ -77,6 +77,7 @@ using lyx::support::Systemcall; using lyx::docstring; +namespace Alert = lyx::frontend::Alert; namespace os = lyx::support::os; namespace fs = boost::filesystem; Index: src/buffer_funcs.C =================================================================== --- src/buffer_funcs.C (Revision 15264) +++ src/buffer_funcs.C (Arbeitskopie) @@ -63,6 +63,7 @@ using lyx::support::unlink; using std::min; using std::string; +namespace Alert = lyx::frontend::Alert; namespace fs = boost::filesystem; namespace {