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
13 #pragma implementation
18 #include "ControlCredits.h"
21 #include "BufferView.h"
23 #include "support/filetools.h" // FileSearch
31 ControlCredits::ControlCredits(LyXView & lv, Dialogs & d)
32 : ControlDialog<ControlConnectBI>(lv, d)
34 d_.showCredits.connect(slot(this, &ControlCredits::show));
38 // needed for the browser
39 extern string system_lyxdir;
41 vector<string> const ControlCredits::getCredits() const
45 string const name = FileSearch(system_lyxdir, "CREDITS");
47 bool found = (!name.empty());
50 ifstream in(name.c_str());
54 in.seekg(0, ios_base::beg); // rewind to the beginning
59 if (!in.good()) break;
66 data.push_back(_("ERROR: LyX wasn't able to read CREDITS file"));
67 data.push_back(_("Please install correctly to estimate the great"));
68 data.push_back(_("amount of work other people have done for the LyX project."));