mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Give feedback if TeXFiles.py fails
* 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/trunk@14488 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
117c98c416
commit
af5a867982
@ -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"
|
||||
@ -30,6 +33,7 @@ using std::endl;
|
||||
|
||||
namespace lyx {
|
||||
|
||||
using support::bformat;
|
||||
using support::contains;
|
||||
using support::getExtension;
|
||||
using support::getFileContents;
|
||||
@ -45,16 +49,19 @@ 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,
|
||||
int const status = one.startscript(Systemcall::Wait,
|
||||
lyx::support::os::python() + ' ' +
|
||||
quoteName(libFileSearch("scripts", "TeXFiles.py")));
|
||||
quoteName(command));
|
||||
if (status == 0)
|
||||
return;
|
||||
Alert::error(_("Could not update TeX information"),
|
||||
bformat(_("The script `%s' failed."), command));
|
||||
}
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user