mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
fix compilation
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1804 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
8a4455d459
commit
37fbae1415
@ -14,6 +14,8 @@ src/FontLoader.C
|
||||
src/form1.C
|
||||
src/frontends/controllers/ButtonController.h
|
||||
src/frontends/controllers/ControlCharacter.C
|
||||
src/frontends/controllers/ControlCopyright.C
|
||||
src/frontends/controllers/ControlCredits.C
|
||||
src/frontends/gnome/FormCitation.C
|
||||
src/frontends/gnome/FormCopyright.C
|
||||
src/frontends/gnome/FormError.C
|
||||
|
@ -1,3 +1,8 @@
|
||||
2001-03-22 Lars Gullik Bjønnes <larsbj@trylle.birdstep.com>
|
||||
|
||||
* ControlCredits.C: remove using that is only used once, use
|
||||
std::ios instead of std::iosbase, add som annoying comments.
|
||||
|
||||
2001-03-22 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* lots of header files: improved explanatory notes.
|
||||
|
@ -7,14 +7,13 @@
|
||||
* \author Angus Leeming, a.leeming@.ac.uk
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <fstream>
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation
|
||||
#endif
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "ControlCredits.h"
|
||||
#include "Dialogs.h"
|
||||
#include "LyXView.h"
|
||||
@ -22,40 +21,40 @@
|
||||
#include "gettext.h"
|
||||
#include "support/filetools.h" // FileSearch
|
||||
|
||||
using SigC::slot;
|
||||
using std::getline;
|
||||
using std::ifstream;
|
||||
using std::ios_base;
|
||||
using std::vector;
|
||||
// needed for the browser
|
||||
extern string system_lyxdir;
|
||||
|
||||
|
||||
ControlCredits::ControlCredits(LyXView & lv, Dialogs & d)
|
||||
: ControlDialog<ControlConnectBI>(lv, d)
|
||||
{
|
||||
d_.showCredits.connect(slot(this, &ControlCredits::show));
|
||||
d_.showCredits.connect(SigC::slot(this, &ControlCredits::show));
|
||||
}
|
||||
|
||||
|
||||
// needed for the browser
|
||||
extern string system_lyxdir;
|
||||
|
||||
vector<string> const ControlCredits::getCredits() const
|
||||
{
|
||||
vector<string> data;
|
||||
std::vector<string> data;
|
||||
|
||||
string const name = FileSearch(system_lyxdir, "CREDITS");
|
||||
|
||||
bool found = (!name.empty());
|
||||
|
||||
#warning what are you really doing here... (Lgb)
|
||||
// why not just send a stringstream to the calling func?
|
||||
// then the reader would look like:
|
||||
// stringstream ss;
|
||||
// ss << in.rdbuf();
|
||||
if (found) {
|
||||
ifstream in(name.c_str());
|
||||
std::ifstream in(name.c_str());
|
||||
found = (in.get());
|
||||
|
||||
if (found) {
|
||||
in.seekg(0, ios_base::beg); // rewind to the beginning
|
||||
in.seekg(0, std::ios::beg); // rewind to the beginning
|
||||
|
||||
for(;;) {
|
||||
string line;
|
||||
getline(in, line);
|
||||
std::getline(in, line);
|
||||
if (!in.good()) break;
|
||||
data.push_back(line);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user