mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-24 21:55:29 +00:00
External inset debug cleanup + various patches from Dekel
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1288 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
31eaa008d0
commit
1600244f88
21
ChangeLog
21
ChangeLog
@ -1,3 +1,24 @@
|
||||
2000-12-28 Dekel Tsur <dekelts@tau.ac.il>
|
||||
|
||||
* lib/ui/default.ui: menu structure cleanup.
|
||||
|
||||
* lib/languages: add description of entries.
|
||||
|
||||
2000-12-27 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* src/insets/ExternalTemplate.C (readTemplates): change debug
|
||||
messages a bit.
|
||||
(readTemplate): use lyxlex.printError to report read errors.
|
||||
(readFormat): ditto.
|
||||
|
||||
* src/insets/insetexternal.C (Read): suppress debug message when
|
||||
not needed.
|
||||
|
||||
2000-12-21 Dekel Tsur <dekelts@tau.ac.il>
|
||||
|
||||
* src/insets/insetinclude.C (Ascii): New method. Currently
|
||||
supports only verbatim input.
|
||||
|
||||
2000-12-27 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* lib/bind/fi_menus.bind: update from Pauli Virtanen.
|
||||
|
@ -1,6 +1,5 @@
|
||||
#This file was created by <larsbj> Sun Dec 5 17:51:04 1999
|
||||
#LyX 1.0 (C) 1995-1999 Matthias Ettrich and the LyX Team
|
||||
\lyxformat 2.15
|
||||
#LyX 1.1 created this file. For more info see http://www.lyx.org/
|
||||
\lyxformat 2.17
|
||||
\textclass article
|
||||
\language english
|
||||
\inputencoding default
|
||||
@ -20,7 +19,7 @@
|
||||
\quotes_language english
|
||||
\quotes_times 2
|
||||
\papercolumns 1
|
||||
\papersides 0
|
||||
\papersides 1
|
||||
\paperpagestyle default
|
||||
|
||||
\layout Title
|
||||
@ -83,16 +82,14 @@ Have we mentioned yet that you ought to read the documentation?
|
||||
The output from LyX looks great! Select
|
||||
\family sans
|
||||
\bar under
|
||||
F
|
||||
V
|
||||
\bar default
|
||||
ile\SpecialChar \menuseparator
|
||||
View
|
||||
\protected_separator
|
||||
iew\SpecialChar \menuseparator
|
||||
|
||||
\bar under
|
||||
d
|
||||
D
|
||||
\bar default
|
||||
vi
|
||||
VI
|
||||
\family default
|
||||
now to see for yourself.
|
||||
\layout Enumerate
|
||||
|
@ -1,3 +1,4 @@
|
||||
# name babel name GUI name RTL? encoding code
|
||||
afrikaans afrikaans "Afrikaans" false iso8859-1 af_ZA
|
||||
american american "American" false iso8859-1 en_US
|
||||
arabic arabic "Arabic" true iso8859-6 ar_SA
|
||||
|
@ -49,8 +49,6 @@ Menuset
|
||||
Submenu "Version Control|V" "file_vc"
|
||||
Separator
|
||||
Submenu "Import|I" "file_import"
|
||||
Submenu "Insert|r" "file_insert"
|
||||
Separator
|
||||
Submenu "Export|E" "file_export"
|
||||
Item "Print...|P" "buffer-print"
|
||||
OptItem "Fax...|F" "buffer-export fax"
|
||||
@ -73,15 +71,6 @@ Menuset
|
||||
ImportFormats
|
||||
End
|
||||
|
||||
Menu "file_insert"
|
||||
Item "File...|F" "buffer-child-insert"
|
||||
Item "LyX Document...|X" "file-insert"
|
||||
Item "Ascii as Lines...|L" "file-insert-ascii lines"
|
||||
Item "Ascii as Paragraphs...|P" "file-insert-ascii paragraphs"
|
||||
Item "External Material...|E" "external-insert"
|
||||
End
|
||||
|
||||
|
||||
Menu "file_export"
|
||||
ExportFormats
|
||||
End
|
||||
@ -106,6 +95,7 @@ Menuset
|
||||
Item "Find & Replace...|F" "find-replace"
|
||||
Submenu "Tabular|T" "edit_tabular"
|
||||
Submenu "Floats & Insets|I" "edit_floats"
|
||||
Item "Math Panel|l" "math-panel"
|
||||
Separator
|
||||
Item "Spellchecker...|S" "spellchecker"
|
||||
Item "Check TeX|h" "buffer-chktex"
|
||||
@ -156,9 +146,8 @@ Menuset
|
||||
# INSERT MENU
|
||||
#
|
||||
Menu "insert"
|
||||
Item "Math Text|T" "math-mode"
|
||||
Item "Math Display|D" "math-display"
|
||||
Item "Math Panel...|P" "math-panel"
|
||||
Item "Math Formula|h" "math-mode"
|
||||
Item "Display Formula|D" "math-display"
|
||||
Separator
|
||||
Submenu "Special Character|S" "insert_special"
|
||||
Item "Citation Reference...|C" "citation-insert"
|
||||
@ -170,12 +159,15 @@ Menuset
|
||||
Item "Index Entry of Preceeding Word|W" "index-insert-last"
|
||||
Item "URL...|U" "url-insert"
|
||||
Item "Note...|N" "note-insert"
|
||||
Submenu "Lists & TOC|O" "insert_toc"
|
||||
Separator
|
||||
Item "Figure...|g" "figure-insert"
|
||||
Item "Tabular...|b" "dialog-tabular-insert"
|
||||
Submenu "Floats|a" "insert_floats"
|
||||
Separator
|
||||
Submenu "Lists & TOC|O" "insert_toc"
|
||||
Item "Include File|e" "buffer-child-insert"
|
||||
Submenu "Insert File|t" "insert_file"
|
||||
Item "External Material...|x" "external-insert"
|
||||
End
|
||||
|
||||
Menu "insert_special"
|
||||
@ -209,6 +201,12 @@ Menuset
|
||||
Item "BibTeX Reference...|B" "bibtex-insert"
|
||||
End
|
||||
|
||||
Menu "insert_file"
|
||||
Item "LyX Document...|X" "file-insert"
|
||||
Item "Ascii as Lines...|L" "file-insert-ascii lines"
|
||||
Item "Ascii as Paragraphs...|P" "file-insert-ascii paragraphs"
|
||||
End
|
||||
|
||||
#
|
||||
# LAYOUT MENU
|
||||
#
|
||||
|
@ -46,7 +46,8 @@ ExternalTemplateManager::ExternalTemplateManager()
|
||||
{
|
||||
// gimp gnuchess gnuplot ical netscape tetris xpaint
|
||||
readTemplates(user_lyxdir);
|
||||
dumpTemplates();
|
||||
if (lyxerr.debugging())
|
||||
dumpTemplates();
|
||||
}
|
||||
|
||||
|
||||
@ -144,13 +145,15 @@ void ExternalTemplateManager::readTemplates(string const & path)
|
||||
|
||||
string filename = LibFileSearch("", "external_templates");
|
||||
if (filename.empty()) {
|
||||
lyxerr << "No template file" << endl;
|
||||
lyxerr << "ExternalTemplateManager::readTemplates: "
|
||||
"No template file" << endl;
|
||||
return;
|
||||
}
|
||||
|
||||
LyXLex lex(templatetags, TM_END);
|
||||
if (!lex.setFile(filename)) {
|
||||
lyxerr << "No template file" << endl;
|
||||
lyxerr << "ExternalTemplateManager::readTemplates: "
|
||||
"No template file" << endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -166,8 +169,7 @@ void ExternalTemplateManager::readTemplates(string const & path)
|
||||
break;
|
||||
|
||||
case TM_END:
|
||||
lyxerr << "TemplateEnd: " << lex.GetString() << endl;
|
||||
lyxerr << "Warning: End outside Template." << endl;
|
||||
lex.printError("Warning: End outside Template.");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -246,7 +248,8 @@ void ExternalTemplate::readTemplate(LyXLex & lex)
|
||||
return;
|
||||
|
||||
default:
|
||||
lyxerr << "Default: " << lex.GetString() << endl;
|
||||
lex.printError("ExternalTemplate::readTemplate: "
|
||||
"Wrong tag: $$Token");
|
||||
Assert(false);
|
||||
break;
|
||||
}
|
||||
@ -299,7 +302,8 @@ void ExternalTemplate::FormatTemplate::readFormat(LyXLex & lex)
|
||||
break;
|
||||
|
||||
case FO_END:
|
||||
lyxerr << "FormatEnd: " << lex.GetString() << endl;
|
||||
if (lyxerr.debugging())
|
||||
lex.printError("FormatEnd");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -333,7 +333,9 @@ void InsetExternal::Read(Buffer const *, LyXLex & lex)
|
||||
filename = format.substr(pos1 + 2, pos2 - (pos1 + 2));
|
||||
parameters = format.substr(pos2 + 3, format.length() - (pos2 + 4));
|
||||
|
||||
lyxerr << templatename << " " << filename << " " << parameters << endl;
|
||||
lyxerr[Debug::INFO] << "InsetExternal::Read: " << templatename
|
||||
<< " " << filename
|
||||
<< " " << parameters << endl;
|
||||
}
|
||||
|
||||
|
||||
|
@ -422,6 +422,14 @@ int InsetInclude::Latex(Buffer const * buffer, ostream & os,
|
||||
}
|
||||
|
||||
|
||||
int InsetInclude::Ascii(Buffer const *, std::ostream & os, int) const
|
||||
{
|
||||
if (isVerb())
|
||||
os << GetFileContents(getFileName());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int InsetInclude::Linuxdoc(Buffer const * buffer, ostream & os) const
|
||||
{
|
||||
string incfile(getContents());
|
||||
|
@ -52,6 +52,8 @@ public:
|
||||
///
|
||||
int Latex(Buffer const *, std::ostream &, bool fragile, bool free_spc) const;
|
||||
///
|
||||
int Ascii(Buffer const *, std::ostream &, int linelen) const;
|
||||
///
|
||||
int Linuxdoc(Buffer const *, std::ostream &) const;
|
||||
///
|
||||
int DocBook(Buffer const *, std::ostream &) const;
|
||||
|
Loading…
Reference in New Issue
Block a user