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 "tex_helpers.h"
#include "debug.h" #include "debug.h"
#include "gettext.h"
#include "frontends/Alert.h"
#include "support/filetools.h" #include "support/filetools.h"
#include "support/lstrings.h" #include "support/lstrings.h"
@ -29,6 +32,7 @@ using std::endl;
namespace lyx { namespace lyx {
using support::bformat;
using support::contains; using support::contains;
using support::GetExtension; using support::GetExtension;
using support::GetFileContents; using support::GetFileContents;
@ -44,16 +48,18 @@ using support::token;
namespace frontend { namespace frontend {
// build filelists of all availabe bst/cls/sty-files. done through
// kpsewhich and an external script, saved in *Files.lst
void rescanTexStyles() void rescanTexStyles()
{ {
// Run rescan in user lyx directory // Run rescan in user lyx directory
Path p(package().user_support()); Path p(package().user_support());
string const command = LibFileSearch("scripts", "TeXFiles.py");
Systemcall one; Systemcall one;
one.startscript(Systemcall::Wait, int const status = one.startscript(Systemcall::Wait,
"python " + "python " + QuoteName(command));
QuoteName(LibFileSearch("scripts", "TeXFiles.py"))); 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 lyx {
namespace frontend { namespace frontend {
// build filelists of all availabe bst/cls/sty-files. done through /** Build filelists of all availabe bst/cls/sty-files. Done through
// kpsewhich and an external script, saved in *Files.lst * kpsewhich and an external script, saved in *Files.lst.
*/
void rescanTexStyles(); void rescanTexStyles();
/// rebuild the textree /// rebuild the textree

View File

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