X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FToolbarDefaults.C;h=b8d0c413a2d2c791a8bbc7b9c6657624f8ac18bd;hb=31b56dac8042735f75229ad480b3e98531c181ff;hp=9e42b8c67be5a4ceaea4d88fbd0f1c28d2e2e799;hpb=3ff3b95d3c7fdc814cb774221370964da4e283ce;p=lyx.git diff --git a/src/ToolbarDefaults.C b/src/ToolbarDefaults.C index 9e42b8c67b..b8d0c413a2 100644 --- a/src/ToolbarDefaults.C +++ b/src/ToolbarDefaults.C @@ -4,7 +4,7 @@ * LyX, The Document Processor * * Copyright 1995 Matthias Ettrich - * Copyright 1995-2000 The LyX Team. + * Copyright 1995-2001 The LyX Team. * * * ====================================================== */ @@ -20,16 +20,13 @@ #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(); @@ -41,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); @@ -60,13 +58,9 @@ 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); @@ -76,7 +70,6 @@ void ToolbarDefaults::init() add(LFUN_FIGURE); add(LFUN_DIALOG_TABULAR_INSERT); - //add(LFUN_MELT); } @@ -115,14 +108,13 @@ void ToolbarDefaults::read(LyXLex & lex) 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); @@ -153,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`"