]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiBibitem.cpp
fix completion painting for RTL (inline completion and completion list)
[lyx.git] / src / frontends / qt4 / GuiBibitem.cpp
index 3f9cab69230e2262d9eada9ec78dc8182d87e3f4..a74a34cb65e71698861d96e9d044cecdffc5156e 100644 (file)
@@ -14,7 +14,8 @@
 #include "qt_helpers.h"
 #include "FuncRequest.h"
 
-#include <QCloseEvent>
+#include "insets/InsetCommand.h"
+
 #include <QLineEdit>
 #include <QPushButton>
 
@@ -24,7 +25,8 @@ namespace frontend {
 
 
 GuiBibitem::GuiBibitem(GuiView & lv)
-       : GuiCommand(lv, "bibitem", qt_("Bibliography Entry Settings"))
+       : GuiDialog(lv, "bibitem", qt_("Bibliography Entry Settings")),
+         params_(insetCode("bibitem"))
 {
        setupUi(this);
 
@@ -50,13 +52,6 @@ void GuiBibitem::change_adaptor()
 }
 
 
-void GuiBibitem::closeEvent(QCloseEvent *e)
-{
-       slotClose();
-       e->accept();
-}
-
-
 void GuiBibitem::updateContents()
 {
        keyED->setText(toqstr(params_["key"]));
@@ -77,6 +72,22 @@ bool GuiBibitem::isValid()
 }
 
 
+bool GuiBibitem::initialiseParams(std::string const & data)
+{
+       // The name passed with LFUN_INSET_APPLY is also the name
+       // used to identify the mailer.
+       InsetCommand::string2params("bibitem", data, params_);
+       return true;
+}
+
+
+void GuiBibitem::dispatchParams()
+{
+       std::string const lfun = InsetCommand::params2string("bibitem", params_);
+       dispatch(FuncRequest(getLfun(), lfun));
+}
+
+
 Dialog * createGuiBibitem(GuiView & lv) { return new GuiBibitem(lv); }