The branch, master has been updated
via d2acacedf915b825674079f5ef38abb215188d54 (commit)
from 982562179801340feff7eb108addd99ec4a05d08 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d2acacedf915b825674079f5ef38abb215188d54
Author: Richard Heck <[email protected]>
Date: Tue May 1 12:54:17 2012 -0400
We don't need to rescan everything from the BibTeX dialog, just
the bib and bst files.
diff --git a/src/frontends/qt4/GuiBibtex.cpp b/src/frontends/qt4/GuiBibtex.cpp
index 6dd8d8f..8a2a27d 100644
--- a/src/frontends/qt4/GuiBibtex.cpp
+++ b/src/frontends/qt4/GuiBibtex.cpp
@@ -484,7 +484,7 @@ QStringList GuiBibtex::bibFiles() const
void GuiBibtex::rescanBibStyles() const
{
- rescanTexStyles();
+ rescanTexStyles("bst bib");
}
diff --git a/src/frontends/qt4/qt_helpers.cpp b/src/frontends/qt4/qt_helpers.cpp
index 59a3d67..dcbd2e9 100644
--- a/src/frontends/qt4/qt_helpers.cpp
+++ b/src/frontends/qt4/qt_helpers.cpp
@@ -210,20 +210,21 @@ QString const qt_(string const & str)
}
-void rescanTexStyles()
+void rescanTexStyles(string const & arg)
{
// Run rescan in user lyx directory
PathChanger p(package().user_support());
- FileName const command = support::libFileSearch("scripts",
"TeXFiles.py");
+ FileName const prog = support::libFileSearch("scripts", "TeXFiles.py");
Systemcall one;
- int const status = one.startscript(Systemcall::Wait,
- os::python() + ' ' +
- quoteName(command.toFilesystemEncoding()));
+ string const command = os::python() + ' ' +
+ quoteName(prog.toFilesystemEncoding()) + ' ' +
+ arg;
+ int const status = one.startscript(Systemcall::Wait, command);
if (status == 0)
return;
// FIXME UNICODE
frontend::Alert::error(_("Could not update TeX information"),
- bformat(_("The script `%1$s' failed."),
from_utf8(command.absFileName())));
+ bformat(_("The script `%1$s' failed."),
from_utf8(prog.absFileName())));
}
diff --git a/src/frontends/qt4/qt_helpers.h b/src/frontends/qt4/qt_helpers.h
index d7a471c..4a3855d 100644
--- a/src/frontends/qt4/qt_helpers.h
+++ b/src/frontends/qt4/qt_helpers.h
@@ -127,8 +127,10 @@ QString browseRelToSub(QString const & filename,
/** Build filelists of all availabe bst/cls/sty-files. Done through
* kpsewhich and an external script, saved in *Files.lst.
+* \param arg: cls, sty, bst, or bib, as required by TeXFiles.py.
+* Can be a list of these, too.
*/
-void rescanTexStyles();
+void rescanTexStyles(std::string const & arg = empty_string());
/** Fill \c contents from one of the three texfiles.
* Each entry in the file list is returned as a name_with_path
-----------------------------------------------------------------------
Summary of changes:
src/frontends/qt4/GuiBibtex.cpp | 2 +-
src/frontends/qt4/qt_helpers.cpp | 13 +++++++------
src/frontends/qt4/qt_helpers.h | 4 +++-
3 files changed, 11 insertions(+), 8 deletions(-)
hooks/post-receive
--
The LyX Source Repository