/**
* \file ControlThesaurus.C
- * Copyright 2001 the LyX Team
- * Read the file COPYING
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
*
* \author John Levon
+ *
+ * Full author contact details are available in file CREDITS
*/
#include <config.h>
-#ifdef __GNUG__
-#pragma implementation
-#endif
#include "ControlThesaurus.h"
-#include "Liason.h"
-#include "lyxfind.h"
+
#include "gettext.h"
+#include "lyxfind.h"
+#include "frontends/LyXView.h"
-using Liason::setMinibuffer;
+ControlThesaurus::ControlThesaurus(Dialog & parent)
+ : Dialog::Controller(parent)
+{}
-ControlThesaurus::ControlThesaurus(LyXView & lv, Dialogs & d)
- : ControlDialogBD(lv, d)
-{}
+bool ControlThesaurus::initialiseParams(string const & data)
+{
+ oldstr_ = data;
+ return true;
+}
-void ControlThesaurus::showEntry(string const & entry)
+void ControlThesaurus::clearParams()
{
- oldstr_ = entry;
- show();
+ oldstr_.erase();
}
* deletion/change !
*/
int const replace_count =
- lyxfind::LyXReplace(bufferview(), oldstr_, newstr,
+ lyxfind::LyXReplace(kernel().bufferview(), oldstr_, newstr,
true, true, true, false, true);
oldstr_ = newstr;
if (replace_count == 0)
- setMinibuffer(&lv_, _("String not found!"));
+ kernel().lyxview().message(_("String not found!"));
else
- setMinibuffer(&lv_, _("String has been replaced."));
+ kernel().lyxview().message(_("String has been replaced."));
}
-Thesaurus::Meanings const & ControlThesaurus::getMeanings(string const & str)
+Thesaurus::Meanings const &
+ControlThesaurus::getMeanings(string const & str)
{
if (str != laststr_)
meanings_ = thesaurus.lookup(str);