]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfunc.C
some visual feedback for extra vertical space
[lyx.git] / src / lyxfunc.C
index 42699082811bd4095e47df96f428602fb6ae7557..a95050cc8befdcd394011bd0edb4f156fdb36f7a 100644 (file)
@@ -94,6 +94,8 @@
 #include "TextCache.h"
 #include "lyxfind.h"
 #include "undo_funcs.h"
+#include "ParagraphParameters.h"
+#include "figureForm.h"
 
 using std::pair;
 using std::make_pair; 
@@ -550,7 +552,7 @@ func_status::value_type LyXFunc::getStatus(int ac,
        case LFUN_MATH_MUTATE: {
                Inset * tli = owner->view()->theLockingInset();
                if (tli && (tli->lyxCode() == Inset::MATH_CODE)) {
-                       MathInsetTypes type = mathcursor->par()->GetType();
+                       MathInsetTypes type = mathcursor->formula()->getType();
                        func_status::value_type box = func_status::ToggleOff;
                        if (argument == "inline") {
                                if (type == LM_OT_SIMPLE)
@@ -706,7 +708,7 @@ func_status::value_type LyXFunc::getStatus(int ac,
        if (disable)
                flag |= func_status::Disabled;
        
-       // the font related functions
+       // the font related functions (and a few others)
        func_status::value_type box = func_status::ToggleOff;
        LyXFont const & font =
                TEXT(false)->real_current_font;
@@ -723,16 +725,14 @@ func_status::value_type LyXFunc::getStatus(int ac,
                if (font.series() == LyXFont::BOLD_SERIES)
                        box = func_status::ToggleOn;
                break;
-#ifndef NO_LATEX
-       case LFUN_TEX:
-               if (font.latex() == LyXFont::ON)
-                       box = func_status::ToggleOn;
-               break;
-#endif
        case LFUN_READ_ONLY_TOGGLE:
                if (buf->isReadonly())
                        box = func_status::ToggleOn;
                break;
+       case LFUN_APPENDIX:
+               if (TEXT(false)->cursor.par()->params().startOfAppendix())
+                       box = func_status::ToggleOn;
+               break;
        default:
                box = func_status::OK;
                break;
@@ -1132,7 +1132,7 @@ string const LyXFunc::dispatch(int ac,
        case LFUN_REMOVEERRORS:
                if (owner->view()->removeAutoInsets()) {
                        owner->view()->redraw();
-                       owner->view()->fitCursor(TEXT());
+                       owner->view()->fitCursor();
                }
                break;
 
@@ -1152,14 +1152,6 @@ string const LyXFunc::dispatch(int ac,
                owner->getDialogs()->setUserFreeFont();
                break;
 
-#ifndef NO_LATEX
-       case LFUN_TEX:
-               Tex(owner->view());
-               owner->view()->setState();
-               owner->showState();
-               break;
-#endif
-               
        case LFUN_RECONFIGURE:
                Reconfigure(owner->view());
                break;
@@ -1401,10 +1393,13 @@ string const LyXFunc::dispatch(int ac,
                        lyxerr[Debug::INFO] << "No matching paragraph found! ["
                                            << id << "]" << std::endl;
                        break;
+               } else {
+                       lyxerr << "Paragraph " << par->id()
+                              << " found." << endl;
                }
 
                // Set the cursor
-               TEXT()->setCursor(owner->view(), par, 0);
+               owner->view()->text->setCursor(owner->view(), par, 0);
                owner->view()->setState();
                owner->showState();
 
@@ -1454,30 +1449,6 @@ string const LyXFunc::dispatch(int ac,
        // --- insert characters ----------------------------------------
 
        // ---  Mathed stuff. If we are here, there is no locked inset yet.
-       
-       // Greek mode     
-       case LFUN_GREEK:
-       {
-               if (!greek_kb_flag) {
-                       greek_kb_flag = 1;
-                       setMessage(N_("Math greek mode on"));
-               } else
-                       greek_kb_flag = 0;
-       }  
-       break;
-      
-       // Greek keyboard      
-       case LFUN_GREEK_TOGGLE:
-       {
-               greek_kb_flag = greek_kb_flag ? 0 : 2;
-               if (greek_kb_flag) {
-                       setMessage(N_("Math greek keyboard on"));
-               } else {
-                       setMessage(N_("Math greek keyboard off"));
-               }
-       }
-       break;
-       
        case LFUN_MATH_EXTERN:
        case LFUN_MATH_NUMBER:
        case LFUN_MATH_NONUMBER: