]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfunc.C
more code in the menu backend == less code in the menu frontends; add support for...
[lyx.git] / src / lyxfunc.C
index 23979786b884500f5f0921965fbb6f07b750e2cf..b74ad0e369fee3580d5d2dcd0d38b8762fa5a2a8 100644 (file)
 
 #include <config.h>
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
 #include "lyxfunc.h"
 #include "version.h"
 #include "kbmap.h"
@@ -124,7 +120,7 @@ void LyXFunc::moveCursorUpdate(bool flag, bool selecting)
 {
        if (selecting || TEXT(flag)->selection.mark()) {
                TEXT(flag)->setSelection(view());
-               if (TEXT(flag)->bv_owner)
+               if (TEXT(flag)->isTopLevel())
                    view()->toggleToggle();
        }
        view()->update(TEXT(flag), BufferView::SELECT|BufferView::FITCUR);
@@ -221,7 +217,7 @@ void LyXFunc::processKeySym(LyXKeySymPtr keysym,
                owner->message(keyseq.print());
        }
 
+
        // Maybe user can only reach the key via holding down shift.
        // Let's see. But only if shift is the only modifier
        if (action == LFUN_UNKNOWN_ACTION && state == key_modifier::shift) {
@@ -229,7 +225,7 @@ void LyXFunc::processKeySym(LyXKeySymPtr keysym,
                action = keyseq.addkey(keysym, key_modifier::none);
                lyxerr[Debug::KEY] << "Action now " << action << endl;
        }
+
        if (action == LFUN_UNKNOWN_ACTION) {
                // Hmm, we didn't match any of the keysequences. See
                // if it's normal insertable text not already covered
@@ -286,7 +282,7 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & ev) const
        default:
                flag |= lyx_gui::getStatus(ev);
        }
-       
+
        if (flag.unknown()) {
                setStatusMessage(N_("Unknown action"));
                return flag;
@@ -1143,12 +1139,10 @@ void LyXFunc::dispatch(FuncRequest const & ev, bool verbose)
                        setErrorMessage(N_("Missing argument"));
                        break;
                }
-               owner->prohibitInput();
                string const fname = i18nLibFileSearch("doc", arg, "lyx");
                if (fname.empty()) {
                        lyxerr << "LyX: unable to find documentation file `"
                               << arg << "'. Bad installation?" << endl;
-                       owner->allowInput();
                        break;
                }
                ostringstream str;
@@ -1161,7 +1155,6 @@ void LyXFunc::dispatch(FuncRequest const & ev, bool verbose)
 #endif
                owner->message(STRCONV(str.str()));
                view()->buffer(bufferlist.loadLyXFile(fname, false));
-               owner->allowInput();
                break;
        }