Re: Spellchecker raises a question when Ignore all is used (Lyx-2.0.0svn)
Jean-Pierre Chrétien wrote: PS I noticed that the same phrase Replace word with current choice is in the tooltips for Find next, Replace and Replace all. This is the correct phrase only for the second one. this is now fixed. pavel
Re: Spellchecker raises a question when "Ignore all" is used (Lyx-2.0.0svn)
Jean-Pierre Chrétien wrote: > PS I noticed that the same phrase "Replace word with current choice" is in > the tooltips for "Find next", "Replace" and "Replace all". This is the > correct phrase only for the second one. this is now fixed. pavel
Re: Spellchecker raises a question when Ignore all is used (Lyx-2.0.0svn)
Stephan Witt a écrit : Am 08.04.2011 um 09:38 schrieb Jean-Pierre Chrétien: Abdelrazak Younes a écrit : On 04/03/2011 08:38 PM, Jean-Pierre Chrétien wrote: Hello, Using the spellchecker window, I get this quite often when I hit 'Ignore all': cite We reached the end of the document, would you like to continue from the beginning? /cite If I say yes, it restars at the beginning, which is not what I want. If I say no, it goes on where I was, which is I want, but it's a bore to acknowledge the message all the time. Found nothing on Trac, new bug ? Yes, new one, please create an entry for it. I probably won't have time to fix it this week but maybe Stephan will... :-P Not done yet as I'm just back home after a trip, and I see Stephan committed a patch about this and other problems with spekllcheck: I will test it before posting any new bug. Please note, I did not commit all patches I posted to the list until now. In case you notice problems - what I expect - it would be nice if you can apply these patches and test it. I'll attach them again. The first one is for the spell checker dialog, the 2nd one is for marking single dashes misspelled wrongly. These patches seem to be committed at revision 38324, and the spellchecker works as I expect after recompilation of LyX 2.0.0svn. Thanks a lot for your fixes. Jean-Pierre PS I noticed that the same phrase Replace word with current choice is in the tooltips for Find next, Replace and Replace all. This is the correct phrase only for the second one.
Re: Spellchecker raises a question when "Ignore all" is used (Lyx-2.0.0svn)
Stephan Witt a écrit : Am 08.04.2011 um 09:38 schrieb Jean-Pierre Chrétien: Abdelrazak Younes a écrit : On 04/03/2011 08:38 PM, Jean-Pierre Chrétien wrote: Hello, Using the spellchecker window, I get this quite often when I hit 'Ignore all': We reached the end of the document, would you like to continue from the beginning? If I say yes, it restars at the beginning, which is not what I want. If I say no, it goes on where I was, which is I want, but it's a bore to acknowledge the message all the time. Found nothing on Trac, new bug ? Yes, new one, please create an entry for it. I probably won't have time to fix it this week but maybe Stephan will... :-P Not done yet as I'm just back home after a trip, and I see Stephan committed a patch about this and other problems with spekllcheck: I will test it before posting any new bug. Please note, I did not commit all patches I posted to the list until now. In case you notice problems - what I expect - it would be nice if you can apply these patches and test it. I'll attach them again. The first one is for the spell checker dialog, the 2nd one is for marking single dashes misspelled wrongly. These patches seem to be committed at revision 38324, and the spellchecker works as I expect after recompilation of LyX 2.0.0svn. Thanks a lot for your fixes. Jean-Pierre PS I noticed that the same phrase "Replace word with current choice" is in the tooltips for "Find next", "Replace" and "Replace all". This is the correct phrase only for the second one.
Re: Spellchecker raises a question when Ignore all is used (Lyx-2.0.0svn)
Abdelrazak Younes a écrit : On 04/03/2011 08:38 PM, Jean-Pierre Chrétien wrote: Hello, Using the spellchecker window, I get this quite often when I hit 'Ignore all': cite We reached the end of the document, would you like to continue from the beginning? /cite If I say yes, it restars at the beginning, which is not what I want. If I say no, it goes on where I was, which is I want, but it's a bore to acknowledge the message all the time. Found nothing on Trac, new bug ? Yes, new one, please create an entry for it. I probably won't have time to fix it this week but maybe Stephan will... :-P Not done yet as I'm just back home after a trip, and I see Stephan committed a patch about this and other problems with spekllcheck: I will test it before posting any new bug. -- Jean-Pierre
Re: Spellchecker raises a question when Ignore all is used (Lyx-2.0.0svn)
Am 08.04.2011 um 09:38 schrieb Jean-Pierre Chrétien: Abdelrazak Younes a écrit : On 04/03/2011 08:38 PM, Jean-Pierre Chrétien wrote: Hello, Using the spellchecker window, I get this quite often when I hit 'Ignore all': cite We reached the end of the document, would you like to continue from the beginning? /cite If I say yes, it restars at the beginning, which is not what I want. If I say no, it goes on where I was, which is I want, but it's a bore to acknowledge the message all the time. Found nothing on Trac, new bug ? Yes, new one, please create an entry for it. I probably won't have time to fix it this week but maybe Stephan will... :-P Not done yet as I'm just back home after a trip, and I see Stephan committed a patch about this and other problems with spekllcheck: I will test it before posting any new bug. Please note, I did not commit all patches I posted to the list until now. In case you notice problems - what I expect - it would be nice if you can apply these patches and test it. I'll attach them again. The first one is for the spell checker dialog, the 2nd one is for marking single dashes misspelled wrongly. Stephan Index: src/frontends/qt4/GuiSpellchecker.h === --- src/frontends/qt4/GuiSpellchecker.h (Revision 38299) +++ src/frontends/qt4/GuiSpellchecker.h (Arbeitskopie) @@ -31,12 +31,12 @@ Q_OBJECT public: - SpellcheckerWidget(GuiView * gv, QWidget * parent = 0); + SpellcheckerWidget(GuiView * gv, DockView * dv, QWidget * parent = 0); ~SpellcheckerWidget(); /// void updateView(); /// - bool initialiseParams(std::string const data); + bool initialiseParams(std::string const ); private Q_SLOTS: void on_findNextPB_clicked(); @@ -71,7 +71,7 @@ private: ///{ void updateView(); - bool initialiseParams(std::string const ) { return true; } + bool initialiseParams(std::string const data) { return widget_-initialiseParams(data); } void clearParams() {} void dispatchParams() {} bool isBufferDependent() const { return false; } Index: src/frontends/qt4/GuiSpellchecker.cpp === --- src/frontends/qt4/GuiSpellchecker.cpp (Revision 38299) +++ src/frontends/qt4/GuiSpellchecker.cpp (Arbeitskopie) @@ -59,8 +59,8 @@ struct SpellcheckerWidget::Private { - Private(SpellcheckerWidget * parent) - : p(parent) {} + Private(SpellcheckerWidget * parent, DockView * dv) + : p(parent), dv_(dv), start_(true), incheck_(false) {} /// update from controller void updateSuggestions(docstring_list words); /// move to next position after current word @@ -71,19 +71,33 @@ bool continueFromBeginning(); /// void setLanguage(Language const * lang); + /// test and set guard flag + bool inCheck() { + if (incheck_) + return true; + incheck_ = true; + return false; + } + void canCheck() { incheck_ = false; } /// Ui::SpellcheckerUi ui; /// SpellcheckerWidget * p; /// GuiView * gv_; + /// + DockView * dv_; /// current word being checked and lang code WordLangTuple word_; + /// + bool start_; + /// + bool incheck_; }; -SpellcheckerWidget::SpellcheckerWidget(GuiView * gv, QWidget * parent) - : QTabWidget(parent), d(new Private(this)) +SpellcheckerWidget::SpellcheckerWidget(GuiView * gv, DockView * dv, QWidget * parent) + : QTabWidget(parent), d(new Private(this, dv)) { d-ui.setupUi(this); d-gv_ = gv; @@ -161,7 +175,8 @@ { BufferView * bv = d-gv_-documentBufferView(); setEnabled(bv != 0); - if (bv hasFocus()) { + if (bv hasFocus() d-start_) { + d-start_ = false; BufferView * bv = d-gv_-documentBufferView(); std::setLanguage const * languages = @@ -181,8 +196,10 @@ qt_(We reached the end of the document, would you like to continue from the beginning?), QMessageBox::Yes | QMessageBox::No, QMessageBox::No); - if (answer == QMessageBox::No) + if (answer == QMessageBox::No) { + dv_-hide(); return false; + } dispatch(FuncRequest(LFUN_BUFFER_BEGIN)); return true; } @@ -195,7 +212,7 @@ dispatch(FuncRequest(LFUN_ESCAPE)); dispatch(FuncRequest(LFUN_CHAR_FORWARD)); - if (bv-cursor().atLastPos()) { + if (bv-cursor().depth() = 1 bv-cursor().atLastPos()) { continueFromBeginning(); return; } @@
Re: Spellchecker raises a question when "Ignore all" is used (Lyx-2.0.0svn)
Abdelrazak Younes a écrit : On 04/03/2011 08:38 PM, Jean-Pierre Chrétien wrote: Hello, Using the spellchecker window, I get this quite often when I hit 'Ignore all': We reached the end of the document, would you like to continue from the beginning? If I say yes, it restars at the beginning, which is not what I want. If I say no, it goes on where I was, which is I want, but it's a bore to acknowledge the message all the time. Found nothing on Trac, new bug ? Yes, new one, please create an entry for it. I probably won't have time to fix it this week but maybe Stephan will... :-P Not done yet as I'm just back home after a trip, and I see Stephan committed a patch about this and other problems with spekllcheck: I will test it before posting any new bug. -- Jean-Pierre
Re: Spellchecker raises a question when "Ignore all" is used (Lyx-2.0.0svn)
Am 08.04.2011 um 09:38 schrieb Jean-Pierre Chrétien: > Abdelrazak Younes a écrit : >> On 04/03/2011 08:38 PM, Jean-Pierre Chrétien wrote: >>> Hello, >>> >>> Using the spellchecker window, I get this quite often when I hit 'Ignore >>> all': >>> >>> >>> We reached the end of the document, would you like to continue from the >>> beginning? >>> >>> >>> If I say yes, it restars at the beginning, which is not what I want. >>> If I say no, it goes on where I was, which is I want, but it's a bore to >>> acknowledge the message all the time. >>> >>> Found nothing on Trac, new bug ? >> Yes, new one, please create an entry for it. I probably won't have time to >> fix it this week but maybe Stephan will... :-P > > Not done yet as I'm just back home after a trip, and I see Stephan committed > a patch about this and other problems with spekllcheck: I will test it before > posting any new bug. > Please note, I did not commit all patches I posted to the list until now. In case you notice problems - what I expect - it would be nice if you can apply these patches and test it. I'll attach them again. The first one is for the spell checker dialog, the 2nd one is for marking single dashes misspelled wrongly. Stephan Index: src/frontends/qt4/GuiSpellchecker.h === --- src/frontends/qt4/GuiSpellchecker.h (Revision 38299) +++ src/frontends/qt4/GuiSpellchecker.h (Arbeitskopie) @@ -31,12 +31,12 @@ Q_OBJECT public: - SpellcheckerWidget(GuiView * gv, QWidget * parent = 0); + SpellcheckerWidget(GuiView * gv, DockView * dv, QWidget * parent = 0); ~SpellcheckerWidget(); /// void updateView(); /// - bool initialiseParams(std::string const & data); + bool initialiseParams(std::string const &); private Q_SLOTS: void on_findNextPB_clicked(); @@ -71,7 +71,7 @@ private: ///{ void updateView(); - bool initialiseParams(std::string const &) { return true; } + bool initialiseParams(std::string const & data) { return widget_->initialiseParams(data); } void clearParams() {} void dispatchParams() {} bool isBufferDependent() const { return false; } Index: src/frontends/qt4/GuiSpellchecker.cpp === --- src/frontends/qt4/GuiSpellchecker.cpp (Revision 38299) +++ src/frontends/qt4/GuiSpellchecker.cpp (Arbeitskopie) @@ -59,8 +59,8 @@ struct SpellcheckerWidget::Private { - Private(SpellcheckerWidget * parent) - : p(parent) {} + Private(SpellcheckerWidget * parent, DockView * dv) + : p(parent), dv_(dv), start_(true), incheck_(false) {} /// update from controller void updateSuggestions(docstring_list & words); /// move to next position after current word @@ -71,19 +71,33 @@ bool continueFromBeginning(); /// void setLanguage(Language const * lang); + /// test and set guard flag + bool inCheck() { + if (incheck_) + return true; + incheck_ = true; + return false; + } + void canCheck() { incheck_ = false; } /// Ui::SpellcheckerUi ui; /// SpellcheckerWidget * p; /// GuiView * gv_; + /// + DockView * dv_; /// current word being checked and lang code WordLangTuple word_; + /// + bool start_; + /// + bool incheck_; }; -SpellcheckerWidget::SpellcheckerWidget(GuiView * gv, QWidget * parent) - : QTabWidget(parent), d(new Private(this)) +SpellcheckerWidget::SpellcheckerWidget(GuiView * gv, DockView * dv, QWidget * parent) + : QTabWidget(parent), d(new Private(this, dv)) { d->ui.setupUi(this); d->gv_ = gv; @@ -161,7 +175,8 @@ { BufferView * bv = d->gv_->documentBufferView(); setEnabled(bv != 0); - if (bv && hasFocus()) { + if (bv && hasFocus() && d->start_) { + d->start_ = false; BufferView * bv = d->gv_->documentBufferView(); std::set languages = @@ -181,8 +196,10 @@ qt_("We reached the end of the document, would you like to " "continue from the beginning?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::No); - if (answer == QMessageBox::No) + if (answer == QMessageBox::No) { + dv_->hide(); return false; + } dispatch(FuncRequest(LFUN_BUFFER_BEGIN)); return true; } @@ -195,7 +212,7 @@ dispatch(FuncRequest(LFUN_ESCAPE)); dispatch(FuncRequest(LFUN_CHAR_FORWARD)); - if (bv->cursor().atLastPos()) { + if (bv->cursor().depth() <= 1 && bv->cursor().atLastPos()) {
Re: Spellchecker raises a question when Ignore all is used (Lyx-2.0.0svn)
On 04/03/2011 08:38 PM, Jean-Pierre Chrétien wrote: Hello, Using the spellchecker window, I get this quite often when I hit 'Ignore all': cite We reached the end of the document, would you like to continue from the beginning? /cite If I say yes, it restars at the beginning, which is not what I want. If I say no, it goes on where I was, which is I want, but it's a bore to acknowledge the message all the time. Found nothing on Trac, new bug ? Yes, new one, please create an entry for it. I probably won't have time to fix it this week but maybe Stephan will... :-P Abdel.
Re: Spellchecker raises a question when Ignore all is used (Lyx-2.0.0svn)
Am 04.04.2011 um 11:39 schrieb Abdelrazak Younes: On 04/03/2011 08:38 PM, Jean-Pierre Chrétien wrote: Hello, Using the spellchecker window, I get this quite often when I hit 'Ignore all': cite We reached the end of the document, would you like to continue from the beginning? /cite If I say yes, it restars at the beginning, which is not what I want. If I say no, it goes on where I was, which is I want, but it's a bore to acknowledge the message all the time. Found nothing on Trac, new bug ? Yes, new one, please create an entry for it. I probably won't have time to fix it this week but maybe Stephan will... :-P Maybe, but I didn't get the problem... Ignore all means ignore this word until session ends. It doesn't mean ignore all words. So if one hits Ignore all the word is temporarily learned and the spell checker proceeds. If it is the only wrong spelled word then the speller raises the mentioned question. If there is another misspelled word the speller stops there. It is as it should, AFAICS. Perhaps you want the speller window to dismiss when you answer no to the question. But this is independent of the Ignore all button. Is this what you want? Stephan
Re: Spellchecker raises a question when Ignore all is used (Lyx-2.0.0svn)
Am 04.04.2011 um 13:02 schrieb Stephan Witt: Am 04.04.2011 um 11:39 schrieb Abdelrazak Younes: On 04/03/2011 08:38 PM, Jean-Pierre Chrétien wrote: Hello, Using the spellchecker window, I get this quite often when I hit 'Ignore all': cite We reached the end of the document, would you like to continue from the beginning? /cite If I say yes, it restars at the beginning, which is not what I want. If I say no, it goes on where I was, which is I want, but it's a bore to acknowledge the message all the time. Found nothing on Trac, new bug ? Yes, new one, please create an entry for it. I probably won't have time to fix it this week but maybe Stephan will... :-P Maybe, but I didn't get the problem... Ignore all means ignore this word until session ends. It doesn't mean ignore all words. So if one hits Ignore all the word is temporarily learned and the spell checker proceeds. If it is the only wrong spelled word then the speller raises the mentioned question. If there is another misspelled word the speller stops there. It is as it should, AFAICS. Perhaps you want the speller window to dismiss when you answer no to the question. But this is independent of the Ignore all button. Is this what you want? Can be fixed with the attached patch. Abdel, what do you think? Stephan Index: src/frontends/qt4/GuiSpellchecker.h === --- src/frontends/qt4/GuiSpellchecker.h (Revision 38240) +++ src/frontends/qt4/GuiSpellchecker.h (Arbeitskopie) @@ -31,12 +31,12 @@ Q_OBJECT public: - SpellcheckerWidget(GuiView * gv, QWidget * parent = 0); + SpellcheckerWidget(GuiView * gv, DockView * dv, QWidget * parent = 0); ~SpellcheckerWidget(); /// void updateView(); /// - bool initialiseParams(std::string const data); + bool initialiseParams(std::string const ); private Q_SLOTS: void on_findNextPB_clicked(); @@ -71,7 +71,7 @@ private: ///{ void updateView(); - bool initialiseParams(std::string const ) { return true; } + bool initialiseParams(std::string const data) { return widget_-initialiseParams(data); } void clearParams() {} void dispatchParams() {} bool isBufferDependent() const { return false; } Index: src/frontends/qt4/GuiSpellchecker.cpp === --- src/frontends/qt4/GuiSpellchecker.cpp (Revision 38240) +++ src/frontends/qt4/GuiSpellchecker.cpp (Arbeitskopie) @@ -59,8 +59,8 @@ struct SpellcheckerWidget::Private { - Private(SpellcheckerWidget * parent) - : p(parent) {} + Private(SpellcheckerWidget * parent, DockView * dv) + : p(parent), dv_(dv), start_(true) {} /// update from controller void updateSuggestions(docstring_list words); /// move to next position after current word @@ -75,13 +75,17 @@ SpellcheckerWidget * p; /// GuiView * gv_; + /// + DockView * dv_; /// current word being checked and lang code WordLangTuple word_; + /// + bool start_; }; -SpellcheckerWidget::SpellcheckerWidget(GuiView * gv, QWidget * parent) - : QTabWidget(parent), d(new Private(this)) +SpellcheckerWidget::SpellcheckerWidget(GuiView * gv, DockView * dv, QWidget * parent) + : QTabWidget(parent), d(new Private(this, dv)) { d-ui.setupUi(this); d-gv_ = gv; @@ -159,8 +163,10 @@ { BufferView * bv = d-gv_-documentBufferView(); setEnabled(bv != 0); - if (bv hasFocus()) + if (bv hasFocus() d-start_) { + d-start_ = false; d-check(); + } } @@ -171,8 +177,10 @@ qt_(We reached the end of the document, would you like to continue from the beginning?), QMessageBox::Yes | QMessageBox::No, QMessageBox::No); - if (answer == QMessageBox::No) + if (answer == QMessageBox::No) { + dv_-hide(); return false; + } dispatch(FuncRequest(LFUN_BUFFER_BEGIN)); return true; } @@ -208,6 +216,13 @@ } +bool SpellcheckerWidget::initialiseParams(std::string const ) +{ + d-start_ = true; + return true; +} + + void SpellcheckerWidget::on_ignoreAllPB_clicked() { /// replace all occurrences of word @@ -339,7 +354,7 @@ : DockView(parent, spellchecker, qt_(Spellchecker), area, flags) { - widget_ = new SpellcheckerWidget(parent); + widget_ = new SpellcheckerWidget(parent, this); setWidget(widget_); setFocusProxy(widget_); }
Re: Spellchecker raises a question when "Ignore all" is used (Lyx-2.0.0svn)
On 04/03/2011 08:38 PM, Jean-Pierre Chrétien wrote: Hello, Using the spellchecker window, I get this quite often when I hit 'Ignore all': We reached the end of the document, would you like to continue from the beginning? If I say yes, it restars at the beginning, which is not what I want. If I say no, it goes on where I was, which is I want, but it's a bore to acknowledge the message all the time. Found nothing on Trac, new bug ? Yes, new one, please create an entry for it. I probably won't have time to fix it this week but maybe Stephan will... :-P Abdel.
Re: Spellchecker raises a question when "Ignore all" is used (Lyx-2.0.0svn)
Am 04.04.2011 um 11:39 schrieb Abdelrazak Younes: > On 04/03/2011 08:38 PM, Jean-Pierre Chrétien wrote: >> Hello, >> >> Using the spellchecker window, I get this quite often when I hit 'Ignore >> all': >> >> >> We reached the end of the document, would you like to continue from the >> beginning? >> >> >> If I say yes, it restars at the beginning, which is not what I want. >> If I say no, it goes on where I was, which is I want, but it's a bore to >> acknowledge the message all the time. >> >> Found nothing on Trac, new bug ? > > Yes, new one, please create an entry for it. I probably won't have time to > fix it this week but maybe Stephan will... :-P Maybe, but I didn't get the problem... "Ignore all" means ignore this word until session ends. It doesn't mean ignore all words. So if one hits "Ignore all" the word is temporarily "learned" and the spell checker proceeds. If it is the only wrong spelled word then the speller raises the mentioned question. If there is another misspelled word the speller stops there. It is as it should, AFAICS. Perhaps you want the speller window to dismiss when you answer "no" to the question. But this is independent of the "Ignore all" button. Is this what you want? Stephan
Re: Spellchecker raises a question when "Ignore all" is used (Lyx-2.0.0svn)
Am 04.04.2011 um 13:02 schrieb Stephan Witt: > Am 04.04.2011 um 11:39 schrieb Abdelrazak Younes: > >> On 04/03/2011 08:38 PM, Jean-Pierre Chrétien wrote: >>> Hello, >>> >>> Using the spellchecker window, I get this quite often when I hit 'Ignore >>> all': >>> >>> >>> We reached the end of the document, would you like to continue from the >>> beginning? >>> >>> >>> If I say yes, it restars at the beginning, which is not what I want. >>> If I say no, it goes on where I was, which is I want, but it's a bore to >>> acknowledge the message all the time. >>> >>> Found nothing on Trac, new bug ? >> >> Yes, new one, please create an entry for it. I probably won't have time to >> fix it this week but maybe Stephan will... :-P > > Maybe, but I didn't get the problem... > > "Ignore all" means ignore this word until session ends. It doesn't mean > ignore all words. > So if one hits "Ignore all" the word is temporarily "learned" and the spell > checker proceeds. > If it is the only wrong spelled word then the speller raises the mentioned > question. > If there is another misspelled word the speller stops there. It is as it > should, AFAICS. > > Perhaps you want the speller window to dismiss when you answer "no" to the > question. > But this is independent of the "Ignore all" button. Is this what you want? Can be fixed with the attached patch. Abdel, what do you think? Stephan Index: src/frontends/qt4/GuiSpellchecker.h === --- src/frontends/qt4/GuiSpellchecker.h (Revision 38240) +++ src/frontends/qt4/GuiSpellchecker.h (Arbeitskopie) @@ -31,12 +31,12 @@ Q_OBJECT public: - SpellcheckerWidget(GuiView * gv, QWidget * parent = 0); + SpellcheckerWidget(GuiView * gv, DockView * dv, QWidget * parent = 0); ~SpellcheckerWidget(); /// void updateView(); /// - bool initialiseParams(std::string const & data); + bool initialiseParams(std::string const &); private Q_SLOTS: void on_findNextPB_clicked(); @@ -71,7 +71,7 @@ private: ///{ void updateView(); - bool initialiseParams(std::string const &) { return true; } + bool initialiseParams(std::string const & data) { return widget_->initialiseParams(data); } void clearParams() {} void dispatchParams() {} bool isBufferDependent() const { return false; } Index: src/frontends/qt4/GuiSpellchecker.cpp === --- src/frontends/qt4/GuiSpellchecker.cpp (Revision 38240) +++ src/frontends/qt4/GuiSpellchecker.cpp (Arbeitskopie) @@ -59,8 +59,8 @@ struct SpellcheckerWidget::Private { - Private(SpellcheckerWidget * parent) - : p(parent) {} + Private(SpellcheckerWidget * parent, DockView * dv) + : p(parent), dv_(dv), start_(true) {} /// update from controller void updateSuggestions(docstring_list & words); /// move to next position after current word @@ -75,13 +75,17 @@ SpellcheckerWidget * p; /// GuiView * gv_; + /// + DockView * dv_; /// current word being checked and lang code WordLangTuple word_; + /// + bool start_; }; -SpellcheckerWidget::SpellcheckerWidget(GuiView * gv, QWidget * parent) - : QTabWidget(parent), d(new Private(this)) +SpellcheckerWidget::SpellcheckerWidget(GuiView * gv, DockView * dv, QWidget * parent) + : QTabWidget(parent), d(new Private(this, dv)) { d->ui.setupUi(this); d->gv_ = gv; @@ -159,8 +163,10 @@ { BufferView * bv = d->gv_->documentBufferView(); setEnabled(bv != 0); - if (bv && hasFocus()) + if (bv && hasFocus() && d->start_) { + d->start_ = false; d->check(); + } } @@ -171,8 +177,10 @@ qt_("We reached the end of the document, would you like to " "continue from the beginning?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::No); - if (answer == QMessageBox::No) + if (answer == QMessageBox::No) { + dv_->hide(); return false; + } dispatch(FuncRequest(LFUN_BUFFER_BEGIN)); return true; } @@ -208,6 +216,13 @@ } +bool SpellcheckerWidget::initialiseParams(std::string const &) +{ + d->start_ = true; + return true; +} + + void SpellcheckerWidget::on_ignoreAllPB_clicked() { /// replace all occurrences of word @@ -339,7 +354,7 @@ : DockView(parent, "spellchecker", qt_("Spellchecker"), area, flags) { - widget_ = new SpellcheckerWidget(); + widget_ = new SpellcheckerWidget(, this); setWidget(widget_); setFocusProxy(widget_); }
Spellchecker raises a question when Ignore all is used (Lyx-2.0.0svn)
Hello, Using the spellchecker window, I get this quite often when I hit 'Ignore all': cite We reached the end of the document, would you like to continue from the beginning? /cite If I say yes, it restars at the beginning, which is not what I want. If I say no, it goes on where I was, which is I want, but it's a bore to acknowledge the message all the time. Found nothing on Trac, new bug ? -- Jean-Pierre
Spellchecker raises a question when "Ignore all" is used (Lyx-2.0.0svn)
Hello, Using the spellchecker window, I get this quite often when I hit 'Ignore all': We reached the end of the document, would you like to continue from the beginning? If I say yes, it restars at the beginning, which is not what I want. If I say no, it goes on where I was, which is I want, but it's a bore to acknowledge the message all the time. Found nothing on Trac, new bug ? -- Jean-Pierre