Give feedback if TeXFiles.py fails (from Georg Baum)

* src/frontends/controllers/tex_helpers.h: doxyfy comment

	* src/frontends/controllers/tex_helpers.C
	(rescanTexStyles): Pop up a message box when TeXFiles.py fails



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@14566 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2006-08-08 10:57:09 +00:00
parent 5bb256a268
commit 40ea8765be
3 changed files with 16 additions and 7 deletions

View File

@ -13,6 +13,9 @@
#include "tex_helpers.h"
#include "debug.h"
#include "gettext.h"
#include "frontends/Alert.h"
#include "support/filetools.h"
#include "support/lstrings.h"
@ -29,6 +32,7 @@ using std::endl;
namespace lyx {
using support::bformat;
using support::contains;
using support::GetExtension;
using support::GetFileContents;
@ -44,16 +48,18 @@ using support::token;
namespace frontend {
// build filelists of all availabe bst/cls/sty-files. done through
// kpsewhich and an external script, saved in *Files.lst
void rescanTexStyles()
{
// Run rescan in user lyx directory
Path p(package().user_support());
string const command = LibFileSearch("scripts", "TeXFiles.py");
Systemcall one;
one.startscript(Systemcall::Wait,
"python " +
QuoteName(LibFileSearch("scripts", "TeXFiles.py")));
int const status = one.startscript(Systemcall::Wait,
"python " + QuoteName(command));
if (status == 0)
return;
Alert::error(_("Could not update TeX information"),
bformat(_("The script `%s' failed."), command));
}

View File

@ -18,8 +18,9 @@
namespace lyx {
namespace frontend {
// build filelists of all availabe bst/cls/sty-files. done through
// kpsewhich and an external script, saved in *Files.lst
/** Build filelists of all availabe bst/cls/sty-files. Done through
* kpsewhich and an external script, saved in *Files.lst.
*/
void rescanTexStyles();
/// rebuild the textree

View File

@ -30,6 +30,8 @@ What's new
* User Interface:
- Show an error box when failing to update the TeX Information dalog data.
- Handle the Meta keyboard modifier as Alt (Qt only).
* Miscellaneous