#include "lyxcursor.h"
#include "CutAndPaste.h"
#include "font.h"
-#include "minibuffer.h"
#include "LColor.h"
#include "support/textutils.h"
#include "support/LAssert.h"
#include "trans_mgr.h"
#include "lyxscreen.h"
#include "WorkArea.h"
+#include "gettext.h"
+#include "lyxfunc.h"
using std::ostream;
using std::ifstream;
insetDescent = 0;
insetWidth = 0;
the_locking_inset = 0;
-#if 0
- cursor_visible = false;
-#endif
interline_space = 1;
no_selection = false;
need_update = INIT;
UpdatableInset::draw(bv, f, baseline, x, cleared);
#else
if (!owner())
- x += (float)scroll();
+ x += static_cast<float>(scroll());
#endif
// update insetWidth and insetHeight with dummy calls
(void)ascent(bv, f);
#ifdef WITH_WARNINGS
#warning Jürgen, why is this a block of its own? (Lgb)
#warning because you told me to define variables only in local context (Jug)!
+#warning then make it a function/method of its own. (Lgb)
#endif
{
int y = 0;
inset_boundary = false;
inset_par = 0;
old_par = 0;
- if (!checkAndActivateInset(bv, x, y, button))
+ int tmp_y = (y < 0)?0:y;
+ if (!checkAndActivateInset(bv, x, tmp_y, button))
TEXT(bv)->SetCursorFromCoordinates(bv, x - drawTextXOffset,
y + insetAscent);
TEXT(bv)->sel_cursor = TEXT(bv)->cursor;
return;
}
}
- if (!inset && (button == 2)) {
+ if (!inset) { // && (button == 2)) {
bool paste_internally = false;
if ((button == 2) && TEXT(bv)->selection) {
LocalDispatch(bv, LFUN_COPY, "");
// see if we found the layout number:
if (!layout.first) {
- string msg = string(N_("Layout ")) + arg + N_(" not known");
-
- bv->owner()->getMiniBuffer()->Set(msg);
+ string const msg = string(N_("Layout ")) + arg + N_(" not known");
+ bv->owner()->getLyXFunc()->Dispatch(LFUN_MESSAGE, msg);
break;
}