/**
* \file FormBibitem.C
- * Read the file COPYING
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
*
- * \author Angus Leeming
+ * \author Angus Leeming
* \author John Levon
*
* Full author contact details are available in file CREDITS
*/
-#ifdef __GNUG__
-#pragma implementation
-#endif
#include <config.h>
#include "xformsBC.h"
-#include "ControlBibitem.h"
+#include "ControlCommand.h"
#include "FormBibitem.h"
+#include "Tooltips.h"
#include "forms/form_bibitem.h"
#include FORMS_H_LOCATION
#include "gettext.h"
#include "support/lstrings.h" // compare
-typedef FormCB<ControlBibitem, FormDB<FD_bibitem> > base_class;
+typedef FormController<ControlCommand, FormView<FD_bibitem> > base_class;
-FormBibitem::FormBibitem()
- : base_class(_("Bibliography Entry"))
+FormBibitem::FormBibitem(Dialog & parent)
+ : base_class(parent, _("Bibliography Entry"))
{}
setPrehandler(dialog_->input_label);
// Manage the ok, apply, restore and cancel/close buttons
- bc().setOK(dialog_->button_ok);
- bc().setCancel(dialog_->button_close);
+ bcview().setOK(dialog_->button_ok);
+ bcview().setCancel(dialog_->button_close);
- bc().addReadOnly(dialog_->input_key);
- bc().addReadOnly(dialog_->input_label);
+ bcview().addReadOnly(dialog_->input_key);
+ bcview().addReadOnly(dialog_->input_label);
+
+ // set up the tooltips
+ string str = _("Key used within LyX document.");
+ tooltips().init(dialog_->input_key, str);
+ str = _("Label used for final output.");
+ tooltips().init(dialog_->input_label, str);
}