#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();
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);
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);
add(LFUN_FIGURE);
add(LFUN_DIALOG_TABULAR_INSERT);
- //add(LFUN_MELT);
}
if (lyxerr.debugging(Debug::PARSER))
lex.printTable(lyxerr);
-
- while (lex.IsOK() && !quit) {
- 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);
}
}
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`"