2 * \file ControlAboutlyx.C
3 * Copyright 2001 The LyX Team.
4 * See the file COPYING.
6 * \author Edwin Leuven, leuven@fee.uva.nl
7 * \author Angus Leeming, a.leeming@.ac.uk
14 #pragma implementation
18 #include "ButtonControllerBase.h"
19 #include "ControlAboutlyx.h"
23 #include "BufferView.h"
25 #include "support/filetools.h" // FileSearch
28 // needed for the browser
29 extern string system_lyxdir;
30 extern string user_lyxdir;
32 ControlAboutlyx::ControlAboutlyx(LyXView & lv, Dialogs & d)
33 : ControlDialog<ControlConnectBI>(lv, d)
35 d_.showAboutlyx.connect(SigC::slot(this, &ControlAboutlyx::show));
39 stringstream & ControlAboutlyx::getCredits(stringstream & ss) const
41 string const name = FileSearch(system_lyxdir, "CREDITS");
43 bool found(!name.empty());
46 std::ifstream in(name.c_str());
50 in.seekg(0, std::ios::beg); // rewind to the beginning
58 ss << _("ERROR: LyX wasn't able to read CREDITS file\n")
59 << _("Please install correctly to estimate the great\n")
60 << _("amount of work other people have done for the LyX project.");
66 string const ControlAboutlyx::getCopyright() const
68 return _("LyX is Copyright (C) 1995 by Matthias Ettrich,\n1995-2001 LyX Team");
71 string const ControlAboutlyx::getLicense() const
73 return _("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 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.");
81 string const ControlAboutlyx::getVersion() const
85 ss << _("LyX Version ")
90 << ("Library directory: ")
91 << MakeDisplayPath(system_lyxdir)
93 << _("User directory: ")
94 << MakeDisplayPath(user_lyxdir);
96 return ss.str().c_str();