]> git.lyx.org Git - lyx.git/blobdiff - src/ToolbarDefaults.C
Dekels tabular/textinset patches
[lyx.git] / src / ToolbarDefaults.C
index 75bdaef0292629bc72b792cc3bb36372d27c0325..d92b09e86ffab12c7994dbae20faca5e02804d03 100644 (file)
 #include "lyxlex.h"
 #include "debug.h"
 #include "lyxlex.h"
+#if 1
+// only until we don't need access to the NEW_INSETS anymore
+#include "lyxparagraph.h"
+#endif
 
 using std::endl;
 
 extern LyXAction lyxaction;
 ToolbarDefaults toolbardefaults;
 
+
 ToolbarDefaults::ToolbarDefaults()
 {
        init();
@@ -37,6 +42,7 @@ void ToolbarDefaults::add(int action)
        defaults.push_back(action);
 }
 
+
 void ToolbarDefaults::init() 
 {
        add(LAYOUTS);
@@ -56,8 +62,13 @@ void ToolbarDefaults::init()
        add(LFUN_FREE);
        add(SEPARATOR);
        
+#ifndef NEW_INSETS     
        add(LFUN_FOOTMELT);
        add(LFUN_MARGINMELT);
+#else
+       add(LFUN_INSET_FOOTNOTE);
+       add(LFUN_INSET_MARGINAL);
+#endif
        add(LFUN_DEPTH);
        add(SEPARATOR);
 
@@ -66,7 +77,7 @@ void ToolbarDefaults::init()
        add(SEPARATOR);
 
        add(LFUN_FIGURE);
-       add(LFUN_TABLE);
+       add(LFUN_DIALOG_TABULAR_INSERT);
        //add(LFUN_MELT);
 }
 
@@ -108,11 +119,8 @@ void ToolbarDefaults::read(LyXLex & lex)
                lex.printTable(lyxerr);
        
        while (lex.IsOK() && !quit) {
-               
-               lyxerr[Debug::GUI] << "Toolbar::read: current lex text: `"
-                                      << lex.GetString() << '\'' << endl;
 
-               switch(lex.lex()) {
+               switch (lex.lex()) {
                case TO_ADD:
                        if (lex.next()) {
                                func = lex.GetString();
@@ -153,7 +161,7 @@ void ToolbarDefaults::read(LyXLex & lex)
 
 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`"