From: Pavel Sanda Date: Mon, 28 Dec 2009 15:59:25 +0000 (+0000) Subject: Next step to the world domination. X-Git-Tag: 2.0.0~4694 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=ebca4a08094b1bbc94ab791577dbba734bbd4a18;p=lyx.git 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 --- diff --git a/src/FuncCode.h b/src/FuncCode.h index 65f602c3fb..5beea329b4 100644 --- a/src/FuncCode.h +++ b/src/FuncCode.h @@ -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 }; diff --git a/src/LyXAction.cpp b/src/LyXAction.cpp index d2d9d75700..b3c3e40717 100644 --- a/src/LyXAction.cpp +++ b/src/LyXAction.cpp @@ -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 + * \li Params: : 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. diff --git a/src/LyXFunc.cpp b/src/LyXFunc.cpp index b3f25f5353..4b5355ad0e 100644 --- a/src/LyXFunc.cpp +++ b/src/LyXFunc.cpp @@ -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;