mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-13 17:20:55 +00:00
* lyx_main.C (readUIFile): when reading an include file which name
ends in .ui, try the .inc version too (support for user ui files) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@16763 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
8244640df0
commit
6672307cdc
@ -1,3 +1,8 @@
|
||||
2007-01-19 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||
|
||||
* lyx_main.C (readUIFile): when reading an include file which name
|
||||
ends in .ui, try the .inc version too (support for user ui files)
|
||||
|
||||
2007-01-17 Martin Vermeer <martin.vermeer@hut.fi>
|
||||
|
||||
* text.C (breakParagraph): when tracking changes, do not remove
|
||||
|
@ -62,6 +62,7 @@
|
||||
using lyx::support::AddName;
|
||||
using lyx::support::AddPath;
|
||||
using lyx::support::bformat;
|
||||
using lyx::support::ChangeExtension;
|
||||
using lyx::support::createDirectory;
|
||||
using lyx::support::createLyXTmpDir;
|
||||
using lyx::support::FileSearch;
|
||||
@ -714,7 +715,7 @@ void LyX::readRcFile(string const & name)
|
||||
|
||||
|
||||
// Read the ui file `name'
|
||||
void LyX::readUIFile(string const & name)
|
||||
void LyX::readUIFile(string const & name, bool include)
|
||||
{
|
||||
enum Uitags {
|
||||
ui_menuset = 1,
|
||||
@ -746,7 +747,16 @@ void LyX::readUIFile(string const & name)
|
||||
|
||||
lyxerr[Debug::INIT] << "About to read " << name << "..." << endl;
|
||||
|
||||
string const ui_path = LibFileSearch("ui", name, "ui");
|
||||
|
||||
string ui_path;
|
||||
if (include) {
|
||||
ui_path = LibFileSearch("ui", name, "inc");
|
||||
if (ui_path.empty())
|
||||
ui_path = LibFileSearch("ui",
|
||||
ChangeExtension(name, "inc"));
|
||||
}
|
||||
else
|
||||
ui_path = LibFileSearch("ui", name, "ui");
|
||||
|
||||
if (ui_path.empty()) {
|
||||
lyxerr[Debug::INIT] << "Could not find " << name << endl;
|
||||
@ -772,7 +782,7 @@ void LyX::readUIFile(string const & name)
|
||||
case ui_include: {
|
||||
lex.next(true);
|
||||
string const file = lex.getString();
|
||||
readUIFile(file);
|
||||
readUIFile(file, true);
|
||||
break;
|
||||
}
|
||||
case ui_menuset:
|
||||
|
@ -85,7 +85,7 @@ private:
|
||||
/// read lyxrc/preferences
|
||||
void readRcFile(std::string const & name);
|
||||
/// read the given ui (menu/toolbar) file
|
||||
void readUIFile(std::string const & name);
|
||||
void readUIFile(std::string const & name, bool include = false);
|
||||
/// read the given languages file
|
||||
void readLanguagesFile(std::string const & name);
|
||||
/// read the given encodings file
|
||||
|
@ -86,7 +86,7 @@ What's new
|
||||
|
||||
- Revert fix from 1.4.3 for better display of script insets with a nucleus
|
||||
with more than one element (like {a'}^{2}), since it was buggy and it is
|
||||
very difficult to do it right.
|
||||
very difficult to do it right (bug 2921)
|
||||
|
||||
- Re-enable Address paragraph style in AMS article classes (bug 2890).
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user