>>>>> "Bennett" == Bennett Helm <[EMAIL PROTECTED]> writes:
Bennett> On Jun 9, 2006, at 6:41 AM, Jean-Marc Lasgouttes wrote: >> OK, I have a new idea for this bug, but by knowledge of Qt is too >> weak to be sure how to do this. What I want to do is run >> updateToolbars whenever the window gets the focus, so that icons >> are correctly enabled. >> >> Here is the patch I came up with. Questions: >> >> 1/ Bennett, Edwin, does it work? Bennett> Won't compile: Bennett> QtView.C:135: error: no `void Bennett> lyx::frontend::QtView::setFocus()' member function declared Bennett> in class `lyx::frontend::QtView' Sorry, I forgot a file. Try that. JMarc
Index: src/frontends/qt2/QtView.C =================================================================== --- src/frontends/qt2/QtView.C (revision 14060) +++ src/frontends/qt2/QtView.C (working copy) @@ -131,6 +131,13 @@ void QtView::update_view_state_qt() } +void QtView::setFocus() +{ + updateToolbars(); + QMainWindow::setFocus(); +} + + void QtView::update_view_state() { // let the user see the explicit message Index: src/frontends/qt2/QtView.h =================================================================== --- src/frontends/qt2/QtView.h (revision 14060) +++ src/frontends/qt2/QtView.h (working copy) @@ -62,9 +62,11 @@ public: // returns true if this view has the focus. virtual bool hasFocus() const; + virtual void setFocus(); public slots: /// idle timeout void update_view_state_qt(); + protected: /// make sure we quit cleanly virtual void closeEvent(QCloseEvent * e);