From: Pavel Sanda Date: Wed, 21 Apr 2010 01:19:30 +0000 (+0000) Subject: Dialog::bufferFilepath -> Dialog::bufferFilePath X-Git-Tag: 2.0.0~3384 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=61fa96cbae28945398bb35b2c81b7ccdc0d5b742;p=features.git Dialog::bufferFilepath -> Dialog::bufferFilePath git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34241 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/qt4/Dialog.cpp b/src/frontends/qt4/Dialog.cpp index abc6007deb..6280ea1b68 100644 --- a/src/frontends/qt4/Dialog.cpp +++ b/src/frontends/qt4/Dialog.cpp @@ -91,7 +91,7 @@ bool Dialog::isBufferReadonly() const } -QString Dialog::bufferFilepath() const +QString Dialog::bufferFilePath() const { return toqstr(buffer().filePath()); } diff --git a/src/frontends/qt4/Dialog.h b/src/frontends/qt4/Dialog.h index 34232d29a2..10d1af5a8f 100644 --- a/src/frontends/qt4/Dialog.h +++ b/src/frontends/qt4/Dialog.h @@ -235,7 +235,7 @@ public: //@{ bool isBufferAvailable() const; bool isBufferReadonly() const; - QString bufferFilepath() const; + QString bufferFilePath() const; //@} /// The type of the current buffer. diff --git a/src/frontends/qt4/GuiBibtex.cpp b/src/frontends/qt4/GuiBibtex.cpp index 09aa18cc5b..7109bea2b1 100644 --- a/src/frontends/qt4/GuiBibtex.cpp +++ b/src/frontends/qt4/GuiBibtex.cpp @@ -435,7 +435,7 @@ QString GuiBibtex::browseBib(QString const & in_name) const 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); } @@ -445,7 +445,7 @@ QString GuiBibtex::browseBst(QString const & in_name) const 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); } diff --git a/src/frontends/qt4/GuiCompare.cpp b/src/frontends/qt4/GuiCompare.cpp index 0913959746..79a6832f0d 100644 --- a/src/frontends/qt4/GuiCompare.cpp +++ b/src/frontends/qt4/GuiCompare.cpp @@ -159,7 +159,7 @@ QString GuiCompare::browse(QString const & in_name) const 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 { @@ -274,7 +274,7 @@ Buffer const * GuiCompare::bufferFromFileName(string const & file) const 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))) { diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index 21a3e8f5c2..8b5134a6ea 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -1639,7 +1639,7 @@ void GuiDocument::browseLayout() 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); @@ -1647,7 +1647,7 @@ void GuiDocument::browseLayout() 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" diff --git a/src/frontends/qt4/GuiExternal.cpp b/src/frontends/qt4/GuiExternal.cpp index 8f3402f209..5991654500 100644 --- a/src/frontends/qt4/GuiExternal.cpp +++ b/src/frontends/qt4/GuiExternal.cpp @@ -296,7 +296,7 @@ void GuiExternal::getbbClicked() 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); @@ -460,7 +460,7 @@ static void getCrop(external::ClipData & data, void GuiExternal::updateContents() { string const name = - params_.filename.outputFileName(fromqstr(bufferFilepath())); + params_.filename.outputFileName(fromqstr(bufferFilePath())); fileED->setText(toqstr(name)); int index = 0; @@ -570,7 +570,7 @@ void GuiExternal::updateTemplate() 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(); @@ -633,7 +633,7 @@ QString GuiExternal::browse(QString const & input, 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"); diff --git a/src/frontends/qt4/GuiGraphics.cpp b/src/frontends/qt4/GuiGraphics.cpp index d9fa54a534..de5c01ff9b 100644 --- a/src/frontends/qt4/GuiGraphics.cpp +++ b/src/frontends/qt4/GuiGraphics.cpp @@ -495,9 +495,9 @@ void GuiGraphics::paramsToDialog(InsetGraphicsParams const & igp) // 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 @@ -647,7 +647,7 @@ void GuiGraphics::applyView() { 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(); @@ -794,7 +794,7 @@ QString GuiGraphics::browse(QString const & in_name) const 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)); @@ -803,7 +803,7 @@ QString GuiGraphics::browse(QString const & in_name) const 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 @@ -832,7 +832,7 @@ string GuiGraphics::readBoundingBox(string const & file) 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(); } diff --git a/src/frontends/qt4/GuiPrint.cpp b/src/frontends/qt4/GuiPrint.cpp index 32b3c8f564..120d1d2c98 100644 --- a/src/frontends/qt4/GuiPrint.cpp +++ b/src/frontends/qt4/GuiPrint.cpp @@ -84,7 +84,7 @@ void GuiPrint::change_adaptor() 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);