]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetindex.C
Clean up InsetGraphics::Cache and rename as GraphicsInset.
[lyx.git] / src / insets / insetindex.C
index c7f4b935eb046a8007d58add7bfcbaf507b21fea..47eb3810c98fca145d89cd9d2c731ac2b1a829f3 100644 (file)
@@ -12,6 +12,7 @@
 
 #include "insetindex.h"
 #include "BufferView.h"
+#include "funcrequest.h"
 #include "frontends/LyXView.h"
 #include "frontends/Dialogs.h"
 #include "LaTeXFeatures.h"
 
 using std::ostream;
 
-InsetIndex::InsetIndex(InsetCommandParams const & p, bool)
+InsetIndex::InsetIndex(InsetCommandParams const & p)
        : InsetCommand(p)
 {}
 
 
+// InsetIndex::InsetIndex(InsetCommandParams const & p, bool)
+//     : InsetCommand(p, false)
+// {}
+
+
 InsetIndex::~InsetIndex()
 {
        InsetCommandMailer mailer("index", *this);
@@ -38,16 +44,16 @@ string const InsetIndex::getScreenLabel(Buffer const *) const
 }
 
 
-void InsetIndex::edit(BufferView * bv, int, int, mouse_button::state)
-{
-       InsetCommandMailer mailer("index", *this);
-       mailer.showDialog(bv);
-}
-
-
-void InsetIndex::edit(BufferView * bv, bool)
+dispatch_result InsetIndex::localDispatch(FuncRequest const & cmd)
 {
-       edit(bv, 0, 0, mouse_button::none);
+       switch (cmd.action) {
+               case LFUN_INSET_EDIT:
+                       InsetCommandMailer("index", *this).showDialog(cmd.view());
+                       return DISPATCHED;
+
+               default:
+                       return InsetCommand::localDispatch(cmd);
+       }
 }
 
 
@@ -65,11 +71,21 @@ Inset::Code InsetIndex::lyxCode() const
 }
 
 
-InsetPrintIndex::InsetPrintIndex(InsetCommandParams const & p, bool)
+
+InsetPrintIndex::InsetPrintIndex(InsetCommandParams const & p)
        : InsetCommand(p)
 {}
 
 
+// InsetPrintIndex::InsetPrintIndex(InsetCommandParams const & p, bool)
+//     : InsetCommand(p, false)
+// {}
+
+
+InsetPrintIndex::~InsetPrintIndex()
+{}
+
+
 string const InsetPrintIndex::getScreenLabel(Buffer const *) const
 {
        return _("Index");