* src/frontends/qt2/QContentPane.C (focusInEvent, focusOutEvent):

new methods; invoke signal WorkArea::focusChange (bug 2423).

	* src/frontends/WorkArea.h: add signal focusChange.

	* src/BufferView_pimpl.C (focusChange): new method; updates the
	toolbars (bug 2423)
	(Pimpl): connect the WorkArea::focusChange signal.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@14808 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2006-08-19 16:27:00 +00:00
parent d9e68dc1b2
commit 4d35334d5a
9 changed files with 51 additions and 1 deletions

View File

@ -122,6 +122,7 @@ boost::signals::connection resizecon;
boost::signals::connection kpresscon;
boost::signals::connection selectioncon;
boost::signals::connection lostcon;
boost::signals::connection focuscon;
/// Return an inset of this class if it exists at the current cursor position
@ -164,6 +165,8 @@ BufferView::Pimpl::Pimpl(BufferView & bv, LyXView * owner,
.connect(boost::bind(&BufferView::Pimpl::selectionRequested, this));
lostcon = workarea().selectionLost
.connect(boost::bind(&BufferView::Pimpl::selectionLost, this));
focuscon = workarea().focusChange
.connect(boost::bind(&BufferView::Pimpl::focusChange, this));
timecon = cursor_timeout.timeout
.connect(boost::bind(&BufferView::Pimpl::cursorToggle, this));
@ -612,6 +615,12 @@ void BufferView::Pimpl::selectionLost()
}
void BufferView::Pimpl::focusChange()
{
owner_->updateToolbars();
}
void BufferView::Pimpl::workAreaResize()
{
static int work_area_width;

View File

@ -82,6 +82,8 @@ public:
///
void selectionLost();
///
void focusChange();
///
void cursorToggle();
///
bool available() const;

View File

@ -1,3 +1,9 @@
2006-08-19 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* BufferView_pimpl.C (focusChange): new method; updates the
toolbars (bug 2423)
(Pimpl): connect the WorkArea::focusChange signal.
2006-08-17 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* BufferView.C (mouseSetCursor): do not call dEPM when cursor is

View File

@ -1,3 +1,7 @@
2006-08-19 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* WorkArea.h: add signal focusChange.
2006-03-01 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* Painter.C (buttonFrame): draw lines instead of trapezoids; it is

View File

@ -74,6 +74,8 @@ public:
boost::signal<void()> selectionRequested;
/// emitted when another X client has stolen our selection
boost::signal<void()> selectionLost;
/// emitted when workarea got/lost focus
boost::signal<void()> focusChange;
};
#endif // WORKAREA_H

View File

@ -1,3 +1,8 @@
2006-08-19 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* QContentPane.C (focusInEvent, focusOutEvent): new methods;
invoke signal WorkArea::focusChange (bug 2423).
2006-08-13 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* QErrorList.C (update_contents): do nothing if error list has not

View File

@ -17,6 +17,8 @@
#include "QContentPane.h"
#include "QLyXKeySym.h"
#include "debug.h"
#include <qapplication.h>
#include <qpainter.h>
@ -351,6 +353,20 @@ void QContentPane::paintEvent(QPaintEvent * e)
}
void QContentPane::focusInEvent(QFocusEvent * ev)
{
QWidget::focusInEvent(ev);
wa_->focusChange();
}
void QContentPane::focusOutEvent(QFocusEvent * ev)
{
QWidget::focusOutEvent(ev);
wa_->focusChange();
}
void QContentPane::trackScrollbar(bool track_on)
{
track_scrollbar_ = track_on;

View File

@ -112,6 +112,10 @@ protected:
void wheelEvent(QWheelEvent * e);
/// key press
void keyPressEvent(QKeyEvent * e);
/// focus in
virtual void focusInEvent(QFocusEvent * ev);
/// focus out
virtual void focusOutEvent(QFocusEvent * ev);
#if USE_INPUT_METHODS
/// IM events
void imStartEvent(QIMEvent *);

View File

@ -80,11 +80,13 @@ What's new
- Handle properly script insets which nucleus has more than one
element (like {a'}^{2}).
- Fix disabling of some toolbar icons after closing a dialog (bug 2423).
- Fix editing of document while Error List dialog is open (bug 2179).
- improve position of cursor after undo.
- Update labels on screen when changing language.
- Update labels on screen when changing language.
- Fix doubling of initial character when correcting a word with
ligatures in spellechecker (bug 2068)