]> git.lyx.org Git - lyx.git/commitdiff
Next step to the world domination.
authorPavel Sanda <sanda@lyx.org>
Mon, 28 Dec 2009 15:59:25 +0000 (15:59 +0000)
committerPavel Sanda <sanda@lyx.org>
Mon, 28 Dec 2009 15:59:25 +0000 (15:59 +0000)
Introduce LFUN_DEBUG_LEVEL_SET.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32659 a592a061-630c-0410-9148-cb99ea01b6c8

src/FuncCode.h
src/LyXAction.cpp
src/LyXFunc.cpp

index 65f602c3fba6cbf6d4d86cea363a828ca4af2afd..5beea329b43958bb7da918f98f7818394ab2623f 100644 (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
 };
index d2d9d757001652f4133b53604808edb6fee431c6..b3c3e40717407ab6f30dd4616695826f0958d22d 100644 (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.
index b3f25f5353dbd63886475ccb7959ccf6c5d0931a..4b5355ad0e7b988aea21f98254519d3983addf2e 100644 (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;