2 * \file ControlAboutlyx.C
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
7 * \author Angus Leeming
9 * Full author contact details are available in file CREDITS.
14 #include "ControlAboutlyx.h"
18 #include "support/filetools.h" // FileSearch
19 #include "support/package.h"
25 using std::ostringstream;
31 using support::fileSearch;
32 using support::makeDisplayPath;
33 using support::package;
38 ControlAboutlyx::ControlAboutlyx(Dialog & parent)
39 : Dialog::Controller(parent)
43 void ControlAboutlyx::getCredits(ostream & ss) const
45 string const name = fileSearch(package().system_support(), "CREDITS");
47 bool found(!name.empty());
50 std::ifstream in(name.c_str());
57 ss << lyx::to_utf8(_("ERROR: LyX wasn't able to read CREDITS file\n"))
58 << lyx::to_utf8(_("Please install correctly to estimate the great\n"))
59 << lyx::to_utf8(_("amount of work other people have done for the LyX project."));
64 string const ControlAboutlyx::getCopyright() const
66 return lyx::to_utf8(_("LyX is Copyright (C) 1995 by Matthias Ettrich,\n1995-2001 LyX Team"));
70 string const ControlAboutlyx::getLicense() const
72 return lyx::to_utf8(_("This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version."));
76 string const ControlAboutlyx::getDisclaimer() const
78 return lyx::to_utf8(_("LyX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\nSee the GNU General Public License for more details.\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA."));
82 string const ControlAboutlyx::getVersion() const
86 ss << lyx::to_utf8(_("LyX Version "))
91 << lyx::to_utf8(_("Library directory: "))
92 << lyx::to_utf8(makeDisplayPath(package().system_support()))
94 << lyx::to_utf8(_("User directory: "))
95 << lyx::to_utf8(makeDisplayPath(package().user_support()));
100 } // namespace frontend