Next step to the world domination.

Introduce LFUN_DEBUG_LEVEL_SET.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32659 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Pavel Sanda 2009-12-28 15:59:25 +00:00
parent 0252c84efa
commit ebca4a0809
3 changed files with 20 additions and 0 deletions

View File

@ -443,6 +443,8 @@ enum FuncCode
LFUN_GRAPHICS_RELOAD, // vfr 20090810
LFUN_SCREEN_SHOW_CURSOR, // vfr, 20090325
LFUN_CURSOR_FOLLOWS_SCROLLBAR_TOGGLE, // ARRae 971202
// 345
LFUN_DEBUG_LEVEL_SET,
LFUN_LASTACTION // end of the table
};

View File

@ -3220,6 +3220,19 @@ void LyXAction::init()
* \endvar
*/
{ LFUN_MESSAGE, "message", NoBuffer, System },
/*!
* \var lyx::FuncCode lyx::LFUN_DEBUG_LEVEL_SET
* \li Action: Set debug output level.
* \li Syntax: debug-level-set <LEVEL>
* \li Params: <LEVEL>: comma separated list of levels or the correspondent number
of their combination. 0 is equivalent to disabling all debug
events. See lyx -dbg for the current list of debug levels
and their numbers.
* \li Origin: sanda, 28 Dec 2008
* \endvar
*/
{ LFUN_DEBUG_LEVEL_SET, "debug-level-set", NoBuffer, System },
/*!
* \var lyx::FuncCode lyx::LFUN_PREFERENCES_SAVE
* \li Action: Save user preferences.

View File

@ -247,6 +247,7 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
case LFUN_REPEAT:
case LFUN_PREFERENCES_SAVE:
case LFUN_BUFFER_SAVE_AS_DEFAULT:
case LFUN_DEBUG_LEVEL_SET:
// these are handled in our dispatch()
break;
@ -487,6 +488,10 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
theSession().bookmarks().clear();
break;
case LFUN_DEBUG_LEVEL_SET:
lyxerr.level(Debug::value(to_utf8(cmd.argument())));
break;
default:
DispatchResult dr;