#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"
#include "lyxfind.h"
#include "undo_funcs.h"
#include "ParagraphParameters.h"
-#include "figureForm.h"
#include "insets/inseturl.h"
#include "insets/insetlatexaccent.h"
#include "frontends/Menubar.h"
#include "frontends/Alert.h"
+#include "graphics/GraphicsCache.h"
+
#include "support/lyxalgo.h"
#include "support/LAssert.h"
#include "support/filetools.h"
#include "support/FileInfo.h"
-#include "support/syscall.h"
+#include "support/forkedcontr.h"
#include "support/lstrings.h"
#include "support/path.h"
#include "support/lyxfunctional.h"
extern BufferList bufferlist;
extern LyXServer * lyxserver;
extern bool selection_possible;
-extern void MenuSendto();
extern boost::scoped_ptr<kb_keymap> toplevel_keymap;
// 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());
}
case LFUN_INSET_ERT:
code = Inset::ERT_CODE;
break;
- case LFUN_FIGURE:
case LFUN_INSET_GRAPHICS:
code = Inset::GRAPHICS_CODE;
break;
// 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;
}
switch (action) {
-
+
case LFUN_ESCAPE:
{
if (!owner->view()->available()) break;
owner->view()->update(TEXT(),
BufferView::SELECT|BufferView::FITCUR);
}
- owner->message(keyseq.print());
+ owner->message(keyseq.printOptions());
}
break;
case LFUN_EXPORT:
if (argument == "custom")
- MenuSendto();
+ owner->getDialogs()->showSendto();
else
Exporter::Export(owner->buffer(), argument, false);
break;
owner->getDialogs()->showTabularCreate();
break;
- case LFUN_FIGURE:
- Figure();
- break;
-
case LFUN_AUTOSAVE:
AutoSave(owner->view());
break;
break;
}
+ bool const graphicsbg_changed =
+ (lyx_name == lcolor.getLyXName(LColor::graphicsbg) &&
+ x11_name != lcolor.getX11Name(LColor::graphicsbg));
+
if (!lcolor.setColor(lyx_name, x11_name)) {
static string const err1 (N_("Set-color \""));
static string const err2 (
setErrorMessage(_(err1) + lyx_name + _(err2));
break;
}
+
lyxColorHandler->updateColor(lcolor.getFromLyXName(lyx_name));
+
+ if (graphicsbg_changed) {
+ grfx::GCache & gc = grfx::GCache::get();
+ gc.changeDisplay(true);
+ }
+
owner->view()->redraw();
break;
}
owner->messagePop();
break;
+ case LFUN_FORKS_SHOW:
+ owner->getDialogs()->showForks();
+ break;
+
+ case LFUN_FORKS_KILL:
+ {
+ if (!isStrInt(argument))
+ break;
+
+ pid_t const pid = strToInt(argument);
+ ForkedcallsController & fcc = ForkedcallsController::get();
+ fcc.kill(pid);
+ break;
+ }
+
+ case LFUN_TOOLTIPS_TOGGLE:
+ owner->getDialogs()->toggleTooltips();
+ break;
+
default:
// Then if it was none of the above
// Trying the BufferView::pimpl dispatch: