X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Flyxfunc.C;h=a7e0443845b04c4b02753a4a17427ffdc210e1d7;hb=9fd0b17bd47de53314286667f577137fe838ddad;hp=3e3691f1b787eaa1ebe478a6dff1f335ba9a9e01;hpb=607ad8d3a778a23013f5c5a9382e9af3cb64350d;p=lyx.git diff --git a/src/lyxfunc.C b/src/lyxfunc.C index 3e3691f1b7..a7e0443845 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -33,12 +33,10 @@ #include "Lsstream.h" #include "trans_mgr.h" #include "layout.h" -#include "WorkArea.h" #include "bufferview_funcs.h" #include "minibuffer.h" #include "vspace.h" #include "LyXView.h" -#include "lyx_gui_misc.h" #include "FloatList.h" #include "converter.h" #include "exporter.h" @@ -48,7 +46,6 @@ #include "lyxfind.h" #include "undo_funcs.h" #include "ParagraphParameters.h" -#include "figureForm.h" #include "insets/inseturl.h" #include "insets/insetlatexaccent.h" @@ -115,7 +112,6 @@ using std::back_inserter; extern BufferList bufferlist; extern LyXServer * lyxserver; extern bool selection_possible; -extern void MenuSendto(); extern boost::scoped_ptr toplevel_keymap; @@ -304,7 +300,7 @@ void LyXFunc::processKeySym(KeySym keysym, unsigned int state) // why not return already here if action == -1 and // num_bytes == 0? (Lgb) - if (keyseq.length() > 1 && !keyseq.deleted()) { + if (keyseq.length() > 1) { owner->message(keyseq.print()); } @@ -572,13 +568,9 @@ FuncStatus LyXFunc::getStatus(kb_action action, // the functions which insert insets Inset::Code code = Inset::NO_CODE; switch (action) { - case LFUN_INSET_TEXT: - code = Inset::TEXT_CODE; - break; case LFUN_INSET_ERT: code = Inset::ERT_CODE; break; - case LFUN_FIGURE: case LFUN_INSET_GRAPHICS: code = Inset::GRAPHICS_CODE; break; @@ -679,6 +671,10 @@ FuncStatus LyXFunc::getStatus(kb_action action, // A few general toggles switch (action) { + case LFUN_TOOLTIPS_TOGGLE: + flag.setOnOff(owner->getDialogs()->tooltipsEnabled()); + break; + case LFUN_READ_ONLY_TOGGLE: flag.setOnOff(buf->isReadonly()); break; @@ -1022,7 +1018,7 @@ string const LyXFunc::dispatch(kb_action action, string argument) owner->view()->update(TEXT(), BufferView::SELECT|BufferView::FITCUR); } - owner->message(keyseq.print()); + owner->message(keyseq.printOptions()); } break; @@ -1102,15 +1098,15 @@ string const LyXFunc::dispatch(kb_action action, string argument) case LFUN_UPDATE: Exporter::Export(owner->buffer(), argument, true); break; - + case LFUN_PREVIEW: Exporter::Preview(owner->buffer(), argument); break; - + case LFUN_BUILDPROG: Exporter::Export(owner->buffer(), "program", true); - break; - + break; + case LFUN_RUNCHKTEX: MenuRunChktex(owner->buffer()); break; @@ -1121,7 +1117,7 @@ string const LyXFunc::dispatch(kb_action action, string argument) case LFUN_EXPORT: if (argument == "custom") - MenuSendto(); + owner->getDialogs()->showSendto(); else Exporter::Export(owner->buffer(), argument, false); break; @@ -1163,10 +1159,6 @@ string const LyXFunc::dispatch(kb_action action, string argument) owner->getDialogs()->showTabularCreate(); break; - case LFUN_FIGURE: - Figure(); - break; - case LFUN_AUTOSAVE: AutoSave(owner->view()); break; @@ -1657,6 +1649,10 @@ string const LyXFunc::dispatch(kb_action action, string argument) break; } + case LFUN_TOOLTIPS_TOGGLE: + owner->getDialogs()->toggleTooltips(); + break; + default: // Then if it was none of the above // Trying the BufferView::pimpl dispatch: