2 * \file ControlCredits.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
15 #pragma implementation
18 #include "ControlCredits.h"
21 #include "BufferView.h"
23 #include "support/filetools.h" // FileSearch
25 // needed for the browser
26 extern string system_lyxdir;
29 ControlCredits::ControlCredits(LyXView & lv, Dialogs & d)
30 : ControlDialog<ControlConnectBI>(lv, d)
32 d_.showCredits.connect(SigC::slot(this, &ControlCredits::show));
36 std::stringstream & ControlCredits::getCredits(std::stringstream & ss) const
38 string const name = FileSearch(system_lyxdir, "CREDITS");
40 bool found(!name.empty());
43 std::ifstream in(name.c_str());
47 in.seekg(0, std::ios::beg); // rewind to the beginning
55 ss << _("ERROR: LyX wasn't able to read CREDITS file\n")
56 << _("Please install correctly to estimate the great\n")
57 << _("amount of work other people have done for the LyX project.");