]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormThesaurus.C
remove defaults stuff, let Qt handle no toolbar
[lyx.git] / src / frontends / xforms / FormThesaurus.C
index 9ce8b49edad053b857e67e9f40f8ea38f26e92f4..6afed99d978cde7438939a02d14a0d5b6607a5d2 100644 (file)
@@ -1,16 +1,15 @@
 /**
  * \file FormThesaurus.C
- * Copyright 2001 The LyX Team.
- * See the file COPYING.
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- * \author Edwin Leuven, leuven@fee.uva.nl
+ * \author Edwin Leuven
+ *
+ * Full author contact details are available in file CREDITS
  */
 
 #include <config.h>
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
 
 #include "ControlThesaurus.h"
 #include "FormThesaurus.h"
@@ -30,11 +29,11 @@ using std::islower;
 using std::vector;
 
 
-typedef FormCB<ControlThesaurus, FormDB<FD_thesaurus> > base_class;
+typedef FormController<ControlThesaurus, FormView<FD_thesaurus> > base_class;
 
 
-FormThesaurus::FormThesaurus(ControlThesaurus & c, Dialogs & d)
-       : base_class(c, d, _("LyX: Thesaurus"), false),
+FormThesaurus::FormThesaurus(Dialog & parent)
+       : base_class(parent, _("Thesaurus"), false),
          clickline_(-1)
 {
 }
@@ -51,8 +50,8 @@ void FormThesaurus::build()
        setPrehandler(dialog_->input_replace);
 
        // Manage the ok, apply and cancel/close buttons
-       bc().setCancel(dialog_->button_close);
-       bc().addReadOnly(dialog_->input_replace);
+       bcview().setCancel(dialog_->button_close);
+       bcview().addReadOnly(dialog_->input_replace);
 
        fl_set_input_return(dialog_->input_entry, FL_RETURN_END_CHANGED);
 }
@@ -150,7 +149,7 @@ void FormThesaurus::setReplace(string const & templ, string const & nstr)
 ButtonPolicy::SMInput FormThesaurus::input(FL_OBJECT * obj, long)
 {
        if (obj == dialog_->input_entry) {
-               string s = strip(frontStrip(fl_get_input(dialog_->input_entry)));
+               string s = trim(fl_get_input(dialog_->input_entry));
 
                updateMeanings(s);
 
@@ -174,7 +173,7 @@ ButtonPolicy::SMInput FormThesaurus::input(FL_OBJECT * obj, long)
        int const line = fl_get_browser(obj);
        if (line > 0) {
                setReplace(fl_get_input(dialog_->input_entry),
-                          strip(frontStrip(fl_get_browser_line(obj, line))));
+                          trim(fl_get_browser_line(obj, line)));
        }
 
        if (clickline_ == fl_get_browser(obj)) {