Make lyx compile with xforms 0.88 again + small fix in insettabular.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1177 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Vigna 2000-10-31 13:53:26 +00:00
parent 9c6eea2ba5
commit dc584364e9
4 changed files with 25 additions and 5 deletions

View File

@ -1,3 +1,10 @@
2000-10-31 Juergen Vigna <jug@sad.it>
* src/WorkArea.C (work_area_handler): honor xforms 0.88 defines.
* src/insets/insettabular.C (ActivateCellInset): passed the wrong
xposition to the Edit call.
2000-10-31 Lars Gullik Bjønnes <larsbj@lyx.org>
* src/trans.C (AddDeadkey): cast explicitly to char.

View File

@ -309,7 +309,11 @@ int WorkArea::work_area_handler(FL_OBJECT * ob, int event,
ev->xbutton.y - ob->y,
ev->xbutton.button);
break;
#if FL_REVISION < 89
case FL_MOUSE:
#else
case FL_DRAG:
#endif
if (!ev || ! area->scrollbar) break;
if (ev->xmotion.x != x_old ||
ev->xmotion.y != y_old ||
@ -321,7 +325,11 @@ int WorkArea::work_area_handler(FL_OBJECT * ob, int event,
ev->xbutton.state);
}
break;
#if FL_REVISION < 89
case FL_KEYBOARD:
#else
case FL_KEYPRESS:
#endif
{
lyxerr[Debug::KEY] << "Workarea event: KEYBOARD" << endl;
@ -408,10 +416,13 @@ int WorkArea::work_area_handler(FL_OBJECT * ob, int event,
area->workAreaKeyPress(ret_key, ret_state);
}
break;
#if FL_REVISION >= 89
case FL_KEYRELEASE:
lyxerr << "Workarea event: KEYRELEASE" << endl;
break;
#endif
case FL_FOCUS:
lyxerr[Debug::GUI] << "Workarea event: FOCUS" << endl;
area->workAreaFocus();

View File

@ -1056,7 +1056,7 @@ void InsetTabular::setPos(BufferView * bv, int x, int y) const
int lx = tabular->GetWidthOfColumn(actcell) -
tabular->GetAdditionalWidth(actcell);
#warning Jürgen, can you rewrite this to _not_ use the sequencing operator. (Lgb)
#if 1
#if 0
for(; !tabular->IsLastCellInRow(actcell) && (lx < x);
++actcell,lx += tabular->GetWidthOfColumn(actcell) +
tabular->GetAdditionalWidth(actcell - 1));
@ -1588,7 +1588,7 @@ bool InsetTabular::ActivateCellInset(BufferView * bv, int x, int y, int button,
}
inset_x = cursor.x() - top_x + tabular->GetBeginningOfTextInCell(actcell);
inset_y = cursor.y();
inset->Edit(bv, x, y - inset_y, button);
inset->Edit(bv, x - inset_x, y - inset_y, button);
if (!the_locking_inset)
return false;
UpdateLocal(bv, CELL, false);

View File

@ -628,6 +628,7 @@ void InsetText::InsetButtonPress(BufferView * bv, int x, int y, int button)
inset_par = cpar(bv);
uinset->InsetButtonPress(bv, x - inset_x, y - inset_y, button);
uinset->Edit(bv, x - inset_x, y - inset_y, 0);
TEXT(bv)->ClearSelection();
if (the_locking_inset) {
UpdateLocal(bv, CURSOR_PAR, false);
}
@ -1269,11 +1270,12 @@ bool InsetText::InsertInset(BufferView * bv, Inset * inset)
inset->setOwner(this);
HideInsetCursor(bv);
TEXT(bv)->InsertInset(bv, inset);
if ((cpar(bv)->GetChar(cpos(bv)) != LyXParagraph::META_INSET) ||
(cpar(bv)->GetInset(cpos(bv)) != inset))
TEXT(bv)->CursorLeft(bv);
TEXT(bv)->selection = 0;
TEXT(bv)->CursorLeft(bv);
bv->fitCursor(TEXT(bv));
UpdateLocal(bv, CURSOR_PAR, true);
// inset->Edit(bv, 0, 0, 0);
ShowInsetCursor(bv);
return true;
}