]> git.lyx.org Git - lyx.git/blobdiff - src/ToolbarDefaults.C
More fixes to insettabular/text (and some missing features added).
[lyx.git] / src / ToolbarDefaults.C
index 1a40c510b834b0aa6661b7522a730b1b217c2c6c..d92b09e86ffab12c7994dbae20faca5e02804d03 100644 (file)
@@ -21,7 +21,7 @@
 #include "debug.h"
 #include "lyxlex.h"
 #if 1
-// only until we don't need access tot he NEW_INSETS or NEW_TABULAR anymore
+// only until we don't need access to the NEW_INSETS anymore
 #include "lyxparagraph.h"
 #endif
 
@@ -30,6 +30,7 @@ using std::endl;
 extern LyXAction lyxaction;
 ToolbarDefaults toolbardefaults;
 
+
 ToolbarDefaults::ToolbarDefaults()
 {
        init();
@@ -41,6 +42,7 @@ void ToolbarDefaults::add(int action)
        defaults.push_back(action);
 }
 
+
 void ToolbarDefaults::init() 
 {
        add(LAYOUTS);
@@ -75,11 +77,7 @@ void ToolbarDefaults::init()
        add(SEPARATOR);
 
        add(LFUN_FIGURE);
-#ifndef NEW_TABULAR
-       add(LFUN_TABLE);
-#else
-       add(LFUN_INSET_TABULAR);
-#endif
+       add(LFUN_DIALOG_TABULAR_INSERT);
        //add(LFUN_MELT);
 }
 
@@ -122,7 +120,7 @@ void ToolbarDefaults::read(LyXLex & lex)
        
        while (lex.IsOK() && !quit) {
 
-               switch(lex.lex()) {
+               switch (lex.lex()) {
                case TO_ADD:
                        if (lex.next()) {
                                func = lex.GetString();
@@ -163,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`"