diff --git a/src/ChangeLog b/src/ChangeLog index 899b4e7004..dbfcf460f5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2002-11-19 Jean-Marc Lasgouttes + + * 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 * converter.C (view): add support for $$i (file name) and $$p diff --git a/src/lyx_main.C b/src/lyx_main.C index 15dbfeec45..82fc287ab6 100644 --- a/src/lyx_main.C +++ b/src/lyx_main.C @@ -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; } diff --git a/status.12x b/status.12x index ec9e429447..4cfa5a4481 100644 --- a/status.12x +++ b/status.12x @@ -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