}
-QString Dialog::bufferFilepath() const
+QString Dialog::bufferFilePath() const
{
return toqstr(buffer().filePath());
}
//@{
bool isBufferAvailable() const;
bool isBufferReadonly() const;
- QString bufferFilepath() const;
+ QString bufferFilePath() const;
//@}
/// The type of the current buffer.
QString const label1 = qt_("Documents|#o#O");
QString const dir1 = toqstr(lyxrc.document_path);
QStringList const filter(qt_("BibTeX Databases (*.bib)"));
- return browseRelFile(in_name, bufferFilepath(),
+ return browseRelFile(in_name, bufferFilePath(),
qt_("Select a BibTeX database to add"), filter, false, label1, dir1);
}
QString const label1 = qt_("Documents|#o#O");
QString const dir1 = toqstr(lyxrc.document_path);
QStringList const filter(qt_("BibTeX Styles (*.bst)"));
- return browseRelFile(in_name, bufferFilepath(),
+ return browseRelFile(in_name, bufferFilePath(),
qt_("Select a BibTeX style"), filter, false, label1, dir1);
}
QString filename;
if (lyxview().documentBufferView()) {
- QString path = bufferFilepath();
+ QString path = bufferFilePath();
filename = browseRelFile(in_name, path, title, filters, false,
qt_("Documents|#o#O"), toqstr(lyxrc.document_path));
} else {
if (FileName::isAbsolute(file))
fname.set(file);
else if (lyxview().documentBufferView())
- fname = support::makeAbsPath(file, fromqstr(bufferFilepath()));
+ fname = support::makeAbsPath(file, fromqstr(bufferFilePath()));
if (fname.empty()
|| (!fname.exists() && !theBufferList().getBuffer(fname))) {
QString const label1 = qt_("Layouts|#o#O");
QString const dir1 = toqstr(lyxrc.document_path);
QStringList const filter(qt_("LyX Layout (*.layout)"));
- QString file = browseRelFile(QString(), bufferFilepath(),
+ QString file = browseRelFile(QString(), bufferFilePath(),
qt_("Local layout file"), filter, false,
label1, dir1);
return;
FileName layoutFile = support::makeAbsPath(fromqstr(file),
- fromqstr(bufferFilepath()));
+ fromqstr(bufferFilePath()));
int const ret = Alert::prompt(_("Local layout file"),
_("The layout file you have selected is a local layout\n"
if (filename.empty())
return;
- FileName const abs_file(support::makeAbsPath(filename, fromqstr(bufferFilepath())));
+ FileName const abs_file(support::makeAbsPath(filename, fromqstr(bufferFilePath())));
// try to get it from the file, if possible
string bb = readBB_from_PSFile(abs_file);
void GuiExternal::updateContents()
{
string const name =
- params_.filename.outputFileName(fromqstr(bufferFilepath()));
+ params_.filename.outputFileName(fromqstr(bufferFilePath()));
fileED->setText(toqstr(name));
int index = 0;
void GuiExternal::applyView()
{
- params_.filename.set(fromqstr(fileED->text()), fromqstr(bufferFilepath()));
+ params_.filename.set(fromqstr(fileED->text()), fromqstr(bufferFilePath()));
params_.settemplate(getTemplate(externalCO->currentIndex()).lyxName);
params_.draft = draftCB->isChecked();
QString const & template_name) const
{
QString const title = qt_("Select external file");
- QString const bufpath = bufferFilepath();
+ QString const bufpath = bufferFilePath();
QStringList const filter = templateFilters(template_name);
QString const label1 = qt_("Documents|#o#O");
// set the right default unit
Length::UNIT const defaultUnit = Length::defaultUnit();
- //lyxerr << bufferFilepath();
+ //lyxerr << bufferFilePath();
string const name =
- igp.filename.outputFileName(fromqstr(bufferFilepath()));
+ igp.filename.outputFileName(fromqstr(bufferFilePath()));
filename->setText(toqstr(name));
// set the bounding box values
{
InsetGraphicsParams & igp = params_;
- igp.filename.set(fromqstr(filename->text()), fromqstr(bufferFilepath()));
+ igp.filename.set(fromqstr(filename->text()), fromqstr(bufferFilePath()));
// the bb section
igp.bb.erase();
if (!clip.isDirectory())
clipdir = addName(package().system_support().absFileName(), "clipart");
- return browseRelFile(in_name, bufferFilepath(),
+ return browseRelFile(in_name, bufferFilePath(),
title, fileFilters(QString()), false,
qt_("Clipart|#C#c"), toqstr(clipdir),
qt_("Documents|#o#O"), toqstr(lyxrc.document_path));
string GuiGraphics::readBoundingBox(string const & file)
{
- FileName const abs_file = support::makeAbsPath(file, fromqstr(bufferFilepath()));
+ FileName const abs_file = support::makeAbsPath(file, fromqstr(bufferFilePath()));
// try to get it from the file, if possible. Zipped files are
// unzipped in the readBB_from_PSFile-Function
bool GuiGraphics::isFileNameValid(string const & fname) const
{
// It may be that the filename is relative.
- return support::makeAbsPath(fname, fromqstr(bufferFilepath())).isReadableFile();
+ return support::makeAbsPath(fname, fromqstr(bufferFilePath())).isReadableFile();
}
void GuiPrint::browseClicked()
{
QString file =
- browseRelFile(QString(), bufferFilepath(), qt_("Print to file"),
+ browseRelFile(QString(), bufferFilePath(), qt_("Print to file"),
QStringList(qt_("PostScript files (*.ps)")), true);
if (!file.isEmpty()) {
fileED->setText(file);