]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlThesaurus.C
two patches from john
[lyx.git] / src / frontends / controllers / ControlThesaurus.C
index 03f82ed0e1b4d5087106d0f319086dd36036ebad..7486a4e4e9c52cf78ae03b013729d63aab3f93e4 100644 (file)
@@ -28,7 +28,7 @@ using Liason::setMinibuffer;
 using SigC::slot;
 
 ControlThesaurus::ControlThesaurus(LyXView & lv, Dialogs & d)
-       : ControlDialog<ControlConnectBD>(lv, d)
+       : ControlDialogBD(lv, d)
 {
        d_.showThesaurus.connect(SigC::slot(this, &ControlThesaurus::showEntry));
 }
@@ -59,20 +59,10 @@ void ControlThesaurus::replace(string const & newstr)
 }
 
 
-std::vector<string> ControlThesaurus::getEntries(string const & str, Thesaurus::POS pos)
+Thesaurus::Meanings const & ControlThesaurus::getMeanings(string const & str)
 {
        if (str != laststr_)
-               entries_ = thesaurus.lookup(str);
+               meanings_ = thesaurus.lookup(str);
 
-       laststr_ = str;
-
-       std::vector<string> strs;
-
-       for (std::vector<Thesaurus::ThesaurusEntry>::const_iterator it = entries_.begin();
-               it != entries_.end(); ++it) {
-               if (it->pos & pos)
-                       strs.push_back(it->entry);
-       }
-
-       return strs;
+       return meanings_;
 }