diff --git a/po/POTFILES.in b/po/POTFILES.in index 45f164bf6a..d6b8043520 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -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 diff --git a/src/frontends/controllers/ChangeLog b/src/frontends/controllers/ChangeLog index 10458537b9..e45a64fc9b 100644 --- a/src/frontends/controllers/ChangeLog +++ b/src/frontends/controllers/ChangeLog @@ -1,3 +1,8 @@ +2001-03-22 Lars Gullik Bjønnes + + * 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 * lots of header files: improved explanatory notes. diff --git a/src/frontends/controllers/ControlCredits.C b/src/frontends/controllers/ControlCredits.C index 22db81a77c..67e344010d 100644 --- a/src/frontends/controllers/ControlCredits.C +++ b/src/frontends/controllers/ControlCredits.C @@ -7,14 +7,13 @@ * \author Angus Leeming, a.leeming@.ac.uk */ +#include #include #ifdef __GNUG__ #pragma implementation #endif -#include - #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(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 const ControlCredits::getCredits() const { - vector data; + std::vector 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); }