From: Jean-Marc Lasgouttes Date: Thu, 28 Dec 2000 16:22:28 +0000 (+0000) Subject: External inset debug cleanup + various patches from Dekel X-Git-Tag: 1.6.10~21761 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=1600244f888e07970290ce54c576a131e4f48289;p=features.git 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 --- diff --git a/ChangeLog b/ChangeLog index b2205f4cc6..8879cf8dde 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,24 @@ +2000-12-28 Dekel Tsur + + * lib/ui/default.ui: menu structure cleanup. + + * lib/languages: add description of entries. + +2000-12-27 Jean-Marc Lasgouttes + + * 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 + + * src/insets/insetinclude.C (Ascii): New method. Currently + supports only verbatim input. + 2000-12-27 Jean-Marc Lasgouttes * lib/bind/fi_menus.bind: update from Pauli Virtanen. diff --git a/lib/examples/splash.lyx b/lib/examples/splash.lyx index 04b4bc69ee..b0cab1b3b7 100644 --- a/lib/examples/splash.lyx +++ b/lib/examples/splash.lyx @@ -1,6 +1,5 @@ -#This file was created by 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 diff --git a/lib/languages b/lib/languages index 2c888b2b9a..892dbe4e32 100644 --- a/lib/languages +++ b/lib/languages @@ -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 diff --git a/lib/ui/default.ui b/lib/ui/default.ui index a157d36f05..ce1f2ecfbb 100644 --- a/lib/ui/default.ui +++ b/lib/ui/default.ui @@ -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 # diff --git a/src/insets/ExternalTemplate.C b/src/insets/ExternalTemplate.C index a323f8a0cd..15b8fecc11 100644 --- a/src/insets/ExternalTemplate.C +++ b/src/insets/ExternalTemplate.C @@ -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; } } diff --git a/src/insets/insetexternal.C b/src/insets/insetexternal.C index 13cee12c2b..3aa6f8fad5 100644 --- a/src/insets/insetexternal.C +++ b/src/insets/insetexternal.C @@ -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; } diff --git a/src/insets/insetinclude.C b/src/insets/insetinclude.C index 60cc1b2269..698e5dc934 100644 --- a/src/insets/insetinclude.C +++ b/src/insets/insetinclude.C @@ -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()); diff --git a/src/insets/insetinclude.h b/src/insets/insetinclude.h index a6d8c78b7c..4ca1e3e0d1 100644 --- a/src/insets/insetinclude.h +++ b/src/insets/insetinclude.h @@ -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;