mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-14 01:22:33 +00:00
automatically reconfigure lyx when configure script is newer than lyxrc.defaults
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH-1_2_X@5668 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
bffc094ccd
commit
b2a16b089b
@ -1,3 +1,8 @@
|
||||
2002-11-19 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* lyx_main.C (queryUserLyXDir): re-run automatically the configure
|
||||
script if it is newer than the lyxrc.defaults in user directory
|
||||
|
||||
2002-10-16 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* converter.C (view): add support for $$i (file name) and $$p
|
||||
|
@ -623,10 +623,22 @@ void LyX::deadKeyBindings(kb_keymap * kbmap)
|
||||
// one does not exist yet. (Asger)
|
||||
void LyX::queryUserLyXDir(bool explicit_userdir)
|
||||
{
|
||||
string const configure_script = AddName(system_lyxdir, "configure");
|
||||
|
||||
// Does user directory exist?
|
||||
FileInfo fileInfo(user_lyxdir);
|
||||
if (fileInfo.isOK() && fileInfo.isDir()) {
|
||||
first_start = false;
|
||||
FileInfo script(configure_script);
|
||||
FileInfo defaults(AddName(user_lyxdir, "lyxrc.defaults"));
|
||||
if (defaults.isOK() && script.isOK()
|
||||
&& defaults.getModificationTime() < script.getModificationTime()) {
|
||||
lyxerr << _("LyX: reconfiguring user directory")
|
||||
<< endl;
|
||||
Path p(user_lyxdir);
|
||||
::system(configure_script.c_str());
|
||||
lyxerr << "LyX: " << _("Done!") << endl;
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
first_start = !explicit_userdir;
|
||||
@ -659,7 +671,7 @@ void LyX::queryUserLyXDir(bool explicit_userdir)
|
||||
|
||||
// Run configure in user lyx directory
|
||||
Path p(user_lyxdir);
|
||||
::system(AddName(system_lyxdir, "configure").c_str());
|
||||
::system(configure_script.c_str());
|
||||
lyxerr << "LyX: " << _("Done!") << endl;
|
||||
}
|
||||
|
||||
|
@ -27,6 +27,10 @@ What's new
|
||||
require a file: URL as HTML viewers (mozilla is used as default if
|
||||
found)
|
||||
|
||||
- when a new LyX version is launched, the Edit>Reconfigure tool is
|
||||
automatically invoked; this should avoid many problems with users
|
||||
who are not aware that it is needed
|
||||
|
||||
- when changing the current layout with the toolbar, the corresponding
|
||||
keyboard binding is shown in the minibuffer
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user