#include "gettext.h"
#include "importer.h"
#include "kbmap.h"
-#include "lastfiles.h"
+#include "session.h"
#include "LyXAction.h"
#include "lyx_main.h" // for lastfiles
#include "lyxfunc.h"
using lyx::support::compare_ascii_no_case;
using lyx::support::contains;
-using lyx::support::MakeDisplayPath;
+using lyx::support::makeDisplayPath;
using lyx::support::token;
using boost::bind;
void expandLastfiles(Menu & tomenu, LyXView const * view)
{
- LastFiles const & lastfiles = LyX::cref().lastfiles();
+ lyx::Session::LastFiles const & lf = LyX::cref().session().lastFiles();
+ lyx::Session::LastFiles::const_iterator lfit = lf.begin();
int ii = 1;
- LastFiles::const_iterator lfit = lastfiles.begin();
- LastFiles::const_iterator end = lastfiles.end();
- for (; lfit != end && ii < 10; ++lfit, ++ii) {
+ for (; lfit != lf.end() && ii < 10; ++lfit, ++ii) {
string const label = convert<string>(ii) + ". "
- + MakeDisplayPath((*lfit), 30)
+ + makeDisplayPath((*lfit), 30)
+ '|' + convert<string>(ii);
tomenu.add(MenuItem(MenuItem::Command, label, FuncRequest(LFUN_FILE_OPEN, (*lfit))), view);
}
Strings::const_iterator docit = names.begin();
Strings::const_iterator end = names.end();
for (; docit != end; ++docit, ++ii) {
- string label = MakeDisplayPath(*docit, 20);
+ string label = makeDisplayPath(*docit, 20);
if (ii < 10)
label = convert<string>(ii) + ". " + label + '|' + convert<string>(ii);
tomenu.add(MenuItem(MenuItem::Command, label, FuncRequest(LFUN_SWITCHBUFFER, *docit)), view);
action = LFUN_IMPORT;
break;
case MenuItem::ViewFormats:
- formats = Exporter::GetExportableFormats(*view->buffer(), true);
+ formats = Exporter::getExportableFormats(*view->buffer(), true);
action = LFUN_PREVIEW;
break;
case MenuItem::UpdateFormats:
- formats = Exporter::GetExportableFormats(*view->buffer(), true);
+ formats = Exporter::getExportableFormats(*view->buffer(), true);
action = LFUN_UPDATE;
break;
default:
- formats = Exporter::GetExportableFormats(*view->buffer(), false);
+ formats = Exporter::getExportableFormats(*view->buffer(), false);
action = LFUN_EXPORT;
}
sort(formats.begin(), formats.end(), compare_format());