+2005-07-28 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
+
+ bug 1950.
+
+ * Dialog.h (exitEarly): virtual function, returns false as a
+ default.
+
+ * ControlSpellchecker.h (exitEarly): return exitEarly_
+
+ * ControlSpellchecker.C (check): set exitEarly_ to true when
+ spell-checking is finished, false otherwise.
+
2005-07-27 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
* ControlBibtex.C: sort bst files (bug 1936)
ControlSpellchecker::ControlSpellchecker(Dialog & parent)
- : Dialog::Controller(parent),
+ : Dialog::Controller(parent), exitEarly_(false),
oldval_(0), newvalue_(0), count_(0)
{}
++start;
BufferParams & bufferparams = kernel().buffer().params();
+ exitEarly_ = false;
while (res == SpellBase::OK || res == SpellBase::IGNORED_WORD) {
word_ = nextWord(cur, start, bufferparams);
// end of document
if (getWord().empty()) {
showSummary();
+ exitEarly_ = true;
return;
}
virtual void dispatchParams() {}
///
virtual bool isBufferDependent() const { return true; }
+ ///
+ virtual bool exitEarly() const { return exitEarly_; }
/// replace word with replacement
void replace(std::string const &);
/// show count of checked words at normal exit
void showSummary();
+private:
+ /// set to true when spellchecking is finished
+ bool exitEarly_;
+
/// current word being checked and lang code
WordLangTuple word_;
* return true.
*/
virtual bool disconnectOnApply() const { return false; }
+
+ /** \return true if Dialog::View::show() should not display the dialog
+ * after running update. Currently, only ControlSpellchecker
+ * makes use of that.
+ */
+ virtual bool exitEarly() const { return false; }
//@}
protected:
+2005-07-28 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
+
+ * GViewBase.C (show): exit after update if Controller::exitEarly()
+ is true. (bug 1950)
+
2005-07-27 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
* GTexInfo.C: Load and display full-path and no-path
build();
}
update();
+ if (dialog().controller().exitEarly())
+ return;
+
window()->show();
}
+2005-07-28 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
+
+ * QDialogView.C (show): exit after update if Controller::exitEarly()
+ is true. (bug 1950)
+
2005-07-27 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
* QBibTeX.C: Do not insert empty items to bst combo.
form()->setMinimumSize(form()->sizeHint());
update(); // make sure its up-to-date
+ if (dialog().controller().exitEarly())
+ return;
form()->setCaption(toqstr("LyX: " + getTitle()));
+2005-07-28 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
+
+ * FormDialogView.C (show): exit after update if Controller::exitEarly()
+ is true. (bug 1950)
+
2005-07-27 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
* FormTexInfo.C: Load and display full-path and no-path
fl_freeze_form(form());
update();
fl_unfreeze_form(form());
+ if (dialog().controller().exitEarly())
+ return;
if (form()->visible) {
fl_raise_form(form());