]> git.lyx.org Git - lyx.git/blobdiff - src/ToolbarDefaults.C
In for a penny, in for a pound. Consistent use of // -*- C++ -*-
[lyx.git] / src / ToolbarDefaults.C
index 75bdaef0292629bc72b792cc3bb36372d27c0325..b8d0c413a2d2c791a8bbc7b9c6657624f8ac18bd 100644 (file)
@@ -4,7 +4,7 @@
  *           LyX, The Document Processor
  *
  *           Copyright 1995 Matthias Ettrich
- *           Copyright 1995-2000 The LyX Team.
+ *           Copyright 1995-2001 The LyX Team.
  *
  *
  * ====================================================== */
@@ -26,6 +26,7 @@ using std::endl;
 extern LyXAction lyxaction;
 ToolbarDefaults toolbardefaults;
 
+
 ToolbarDefaults::ToolbarDefaults()
 {
        init();
@@ -37,10 +38,11 @@ void ToolbarDefaults::add(int action)
        defaults.push_back(action);
 }
 
+
 void ToolbarDefaults::init() 
 {
        add(LAYOUTS);
-       add(LFUN_MENUOPEN);
+       add(LFUN_FILE_OPEN);
        //add(LFUN_CLOSEBUFFER);
        add(LFUN_MENUWRITE);
        add(LFUN_MENUPRINT);
@@ -56,8 +58,9 @@ void ToolbarDefaults::init()
        add(LFUN_FREE);
        add(SEPARATOR);
        
-       add(LFUN_FOOTMELT);
-       add(LFUN_MARGINMELT);
+       add(LFUN_INSET_FOOTNOTE);
+       add(LFUN_INSET_MARGINAL);
+
        add(LFUN_DEPTH);
        add(SEPARATOR);
 
@@ -66,8 +69,7 @@ void ToolbarDefaults::init()
        add(SEPARATOR);
 
        add(LFUN_FIGURE);
-       add(LFUN_TABLE);
-       //add(LFUN_MELT);
+       add(LFUN_DIALOG_TABULAR_INSERT);
 }
 
 
@@ -106,17 +108,13 @@ void ToolbarDefaults::read(LyXLex & lex)
 
        if (lyxerr.debugging(Debug::PARSER))
                lex.printTable(lyxerr);
-       
-       while (lex.IsOK() && !quit) {
-               
-               lyxerr[Debug::GUI] << "Toolbar::read: current lex text: `"
-                                      << lex.GetString() << '\'' << endl;
 
-               switch(lex.lex()) {
+       while (lex.IsOK() && !quit) {
+               switch (lex.lex()) {
                case TO_ADD:
                        if (lex.next()) {
                                func = lex.GetString();
-                               lyxerr[Debug::GUI]
+                               lyxerr[Debug::PARSER]
                                        << "Toolbar::read TO_ADD func: `"
                                        << func << "'" << endl;
                                add(func);
@@ -147,13 +145,12 @@ void ToolbarDefaults::read(LyXLex & lex)
                }
        }
        lex.popTable();
-       lex.next();
 }
 
 
 void ToolbarDefaults::add(string const & func)
 {
-       int tf = lyxaction.LookupFunc(func);
+       int const tf = lyxaction.LookupFunc(func);
 
        if (tf == -1) {
                lyxerr << "Toolbar::add: no LyX command called`"