]> git.lyx.org Git - features.git/commitdiff
External inset debug cleanup + various patches from Dekel
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 28 Dec 2000 16:22:28 +0000 (16:22 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 28 Dec 2000 16:22:28 +0000 (16:22 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1288 a592a061-630c-0410-9148-cb99ea01b6c8

ChangeLog
lib/examples/splash.lyx
lib/languages
lib/ui/default.ui
src/insets/ExternalTemplate.C
src/insets/insetexternal.C
src/insets/insetinclude.C
src/insets/insetinclude.h

index b2205f4cc6c25be611ce4149f04bb87e99c85908..8879cf8dde0929df29727b92450ab625d65682f7 100644 (file)
--- a/ChangeLog
+++ b/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.
index 04b4bc69eebcf4c4baf96da13103feadce201cd8..b0cab1b3b7adf6c068d27b770eddfb48deeb3a0c 100644 (file)
@@ -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
index 2c888b2b9aecb1d385ee826842bebde2eb689de7..892dbe4e32905c8a2b5982edf70a9dc983df298b 100644 (file)
@@ -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
index a157d36f0501f16fb8eb49c7838e84ed394efc9f..ce1f2ecfbbd02ef8080b9ce77c181ad3f82936d0 100644 (file)
@@ -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
 #
index a323f8a0cd398621ab8a4a61fb56f98f91e18457..15b8fecc11d05af3153503e0e303cda528f2aa56 100644 (file)
@@ -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;
                }
        }
index 13cee12c2bf32414bcbebde4073d5976c60d7104..3aa6f8fad557b7afa438247b1d268989453ac292 100644 (file)
@@ -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;
 }
 
 
index 60cc1b2269be721721a06f08f7e3095e7ddb35e0..698e5dc934a1386277c350546162ab61d3a63d11 100644 (file)
@@ -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());
index a6d8c78b7c31b5dbf00b800c9874aaf7f3f2f44a..4ca1e3e0d1bf677badf33b3e8ac10fcb6ecff0a6 100644 (file)
@@ -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;