fix loss of selection from John; some small things

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3500 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2002-02-07 16:43:54 +00:00
parent e5e39c1884
commit 0dd7fe4e06
10 changed files with 52 additions and 6 deletions

View File

@ -1,3 +1,7 @@
2002-02-07 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* ui/default.ui: add ... to math panel
2002-02-04 Martin Vermeer <martin.vermeer@hut.fi>
* bind/math-bind: keybindings for umlauts and other special chars

View File

@ -235,7 +235,7 @@ Menuset
Separator
Submenu "Symbols|S" "insert_math_symbol"
Separator
Item "Math Panel|l" "math-panel"
Item "Math Panel...|l" "math-panel"
End
Menu "insert_math_symbol"

View File

@ -75,6 +75,7 @@ src/frontends/xforms/combox.C
src/frontends/xforms/FileDialog.C
src/frontends/xforms/form_aboutlyx.C
src/frontends/xforms/FormAboutlyx.C
src/frontends/xforms/FormBase.C
src/frontends/xforms/form_bibitem.C
src/frontends/xforms/FormBibitem.C
src/frontends/xforms/form_bibtex.C

View File

@ -157,6 +157,8 @@ BufferView::Pimpl::Pimpl(BufferView * b, LyXView * o,
.connect(slot(this, &BufferView::Pimpl::workAreaKeyPress));
workarea_.selectionRequested
.connect(slot(this, &BufferView::Pimpl::selectionRequested));
workarea_.selectionLost
.connect(slot(this, &BufferView::Pimpl::selectionLost));
cursor_timeout.timeout.connect(slot(this,
&BufferView::Pimpl::cursorToggle));
@ -753,6 +755,15 @@ void BufferView::Pimpl::selectionRequested()
}
void BufferView::Pimpl::selectionLost()
{
hideCursor();
toggleSelection();
bv_->getLyXText()->clearSelection();
showCursor();
}
void BufferView::Pimpl::enterView()
{
if (active() && available()) {

View File

@ -80,6 +80,8 @@ struct BufferView::Pimpl : public SigC::Object {
///
void selectionRequested();
///
void selectionLost();
///
void enterView();
///
void leaveView();

View File

@ -1,3 +1,19 @@
2002-02-07 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* lyxfunc.C (dispatch): a few comments from Martin
2002-02-06 John Levon <moz@compsoc.man.ac.uk>
* WorkArea.h:
* WorkArea.C:
* BufferView_pimpl.h:
* BufferView_pimpl.C: clear our selection when X tells us we've lost
the X selection.
2002-02-07 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* vspace.C (inPixels): fix compiler warning
2002-02-06 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* lyxfunc.C (getStatus): fix status message for disabled commands.

View File

@ -577,11 +577,16 @@ extern "C" {
void WorkArea::event_cb(XEvent * xev)
{
if (xev->type != SelectionRequest)
return;
selectionRequested.emit();
return;
switch (xev->type) {
case SelectionRequest:
lyxerr[Debug::GUI] << "X requested selection." << endl;
selectionRequested.emit();
break;
case SelectionClear:
lyxerr[Debug::GUI] << "Lost selection." << endl;
selectionLost.emit();
break;
}
}

View File

@ -128,6 +128,8 @@ public:
SigC::Signal3<void, int, int, unsigned int> workAreaTripleClick;
/// emitted when an X client has requested our selection
SigC::Signal0<void> selectionRequested;
/// emitted when another X client has stolen our selection
SigC::Signal0<void> selectionLost;
/// handles SelectionRequest X Event, to fill the clipboard
void event_cb(XEvent * xev);

View File

@ -881,10 +881,12 @@ string const LyXFunc::dispatch(kb_action action, string argument)
owner->view()->menuRedo();
goto exit_with_message;
} else if (((result=owner->view()->theLockingInset()->
// Hand-over to inset's own dispatch:
localDispatch(owner->view(), action, argument)) ==
UpdatableInset::DISPATCHED) ||
(result == UpdatableInset::DISPATCHED_NOUPDATE))
goto exit_with_message;
// If UNDISPATCHED, just soldier on
else if (result == UpdatableInset::FINISHED) {
if (TEXT()->cursor.par()->isRightToLeftPar(owner->buffer()->params)) {
TEXT()->cursorRight(owner->view());
@ -1616,6 +1618,7 @@ string const LyXFunc::dispatch(kb_action action, string argument)
default:
// Then if it was none of the above
// Trying the BufferView::pimpl dispatch:
if (!owner->view()->Dispatch(action, argument))
lyxerr << "A truly unknown func ["
<< lyxaction.getActionName(action) << "]!"

View File

@ -457,4 +457,6 @@ int VSpace::inPixels(BufferView * bv) const
case LENGTH:
return len_.len().inPixels(default_width, default_height);
}
// we cannot go there, but there is a compiler warning...
return 0;
}