From 40ea8765beb6b50df9dfef3360f3ec130382777d Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Tue, 8 Aug 2006 10:57:09 +0000 Subject: [PATCH] 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 --- src/frontends/controllers/tex_helpers.C | 16 +++++++++++----- src/frontends/controllers/tex_helpers.h | 5 +++-- status.14x | 2 ++ 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/frontends/controllers/tex_helpers.C b/src/frontends/controllers/tex_helpers.C index 69db83b415..6b45889a6a 100644 --- a/src/frontends/controllers/tex_helpers.C +++ b/src/frontends/controllers/tex_helpers.C @@ -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)); } diff --git a/src/frontends/controllers/tex_helpers.h b/src/frontends/controllers/tex_helpers.h index 1865561783..7c73328196 100644 --- a/src/frontends/controllers/tex_helpers.h +++ b/src/frontends/controllers/tex_helpers.h @@ -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 diff --git a/status.14x b/status.14x index 45545c3c02..567385bc89 100644 --- a/status.14x +++ b/status.14x @@ -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