#include <cstdlib>
#include "LString.h"
+#include "support/lstrings.h"
#include "lyx_main.h"
#include FORMS_H_LOCATION
#include "lyx.h"
#include "combox.h"
#include "bufferlist.h"
#include "support/filetools.h"
-#include "pathstack.h"
+#include "support/path.h"
#include "filedlg.h"
#include "lyx_gui_misc.h"
#include "LyXView.h" // only because of form_main
path = buffer->tmppath;
}
if (!buffer->isDviClean()) {
- PathPush(path);
+ Path p(path);
ret = MenuRunLaTeX(buffer);
- PathPop();
}
return ret;
}
if (lyxrc->use_tempdir || (IsDirWriteable(path) < 1)) {
path = buffer->tmppath;
}
- PathPush(path);
+ Path p(path);
cmd = command + ' ' + SpaceLess(name);
Systemcalls one;
result = one.startscript(wait ? Systemcalls::Wait
: Systemcalls::DontWait, cmd);
}
- PathPop();
return (result==0);
}
if (lyxrc->use_tempdir || (IsDirWriteable(path) < 1)){
path = buffer->tmppath;
}
- PathPush(path);
+ Path p(path);
bool ret = RunScript(buffer, wait, command);
AllowInput();
- PathPop();
return ret;
}
if (lyxrc->use_tempdir || (IsDirWriteable(path) < 1)){
path = buffer->tmppath;
}
- PathPush(path);
+ Path p(path);
bool ret = RunScript(buffer, false, lyxrc->view_ps_command, ps);
- PathPop();
AllowInput();
return ret;
}
if (lyxrc->use_tempdir || (IsDirWriteable(path) < 1)) {
path = buffer->tmppath;
}
- PathPush(path);
+ Path p(path);
if (!lyxrc->fax_program.empty()) {
string help2 = lyxrc->fax_program;
subst(help2, "$$FName",ps);
Systemcalls one(Systemcalls::System, help2);
} else
send_fax(ps,lyxrc->fax_command);
- PathPop();
}
if (lyxrc->use_tempdir || (IsDirWriteable(path) < 1)){
path = buffer->tmppath;
}
- PathPush(path);
+ Path p(path);
// Run dvi-viewer
string command = lyxrc->view_dvi_command + paper ;
bool ret = RunScript(buffer, false, command);
- PathPop();
return ret;
}
void LayoutsCB(int sel, void *)
{
- string tmp;
- tmp += sel;
+ string tmp = tostr(sel);
current_view->getOwner()->getLyXFunc()->Dispatch(LFUN_LAYOUTNO,
tmp.c_str());
}
if (lyxrc->use_tempdir || (IsDirWriteable(path) < 1)) {
path = current_view->currentBuffer()->tmppath;
}
- PathPush (path);
+ Path p(path);
if (flag != -1) {
if (!current_view->available())
break;
}
- PathPop();
AllowInput();
current_view->currentBuffer()->redraw();
if (lyxrc->use_tempdir || (IsDirWriteable(path) < 1)) {
path = current_view->currentBuffer()->tmppath;
}
- PathPush (path);
+ Path p(path);
if (!current_view->available())
return 0;
break;
}
- PathPop();
AllowInput();
current_view->currentBuffer()->redraw();
if (lyxrc->use_tempdir || (IsDirWriteable(path) < 1)){
path = buffer->tmppath;
}
- PathPush(path);
+ Path p(path);
bool result;
if (!lyxrc->print_spool_command.empty() &&
}
} else
result = RunScript(buffer, false, command);
- PathPop();
if (!result)
WriteAlert(_("Error:"),
minibuffer->Set(_("Running configure..."));
// Run configure in user lyx directory
- PathPush(user_lyxdir);
+ Path p(user_lyxdir);
Systemcalls one(Systemcalls::System,
AddName(system_lyxdir,"configure"));
- PathPop();
+ p.pop();
minibuffer->Set(_("Reloading configuration..."));
lyxrc->Read(LibFileSearch(string(), "lyxrc.defaults"));
WriteAlert(_("The system has been reconfigured."),