From: Jürgen Vigna Date: Tue, 31 Oct 2000 13:53:26 +0000 (+0000) Subject: Make lyx compile with xforms 0.88 again + small fix in insettabular. X-Git-Tag: 1.6.10~21857 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=dc584364e9abcadf734216e412df7fe96947acc7;p=features.git 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 --- diff --git a/ChangeLog b/ChangeLog index 3fc52d6669..b8824d1898 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2000-10-31 Juergen Vigna + + * 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 * src/trans.C (AddDeadkey): cast explicitly to char. diff --git a/src/WorkArea.C b/src/WorkArea.C index f30c09489b..0821f000f4 100644 --- a/src/WorkArea.C +++ b/src/WorkArea.C @@ -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(); diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index e328e51b51..aef7875ac2 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -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); diff --git a/src/insets/insettext.C b/src/insets/insettext.C index a114219575..a3c784e164 100644 --- a/src/insets/insettext.C +++ b/src/insets/insettext.C @@ -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; }