]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetlabel.C
Clean up InsetGraphics::Cache and rename as GraphicsInset.
[lyx.git] / src / insets / insetlabel.C
index 30010afad893a946a04940961cffb2aaa79fe7a6..fcab20f0258f40be57694eea103113bed21d03ab 100644 (file)
@@ -27,11 +27,16 @@ using std::vector;
 using std::pair;
 
 
-InsetLabel::InsetLabel(InsetCommandParams const & p, bool)
+InsetLabel::InsetLabel(InsetCommandParams const & p)
        : InsetCommand(p)
 {}
 
 
+// InsetLabel::InsetLabel(InsetCommandParams const & p, bool)
+//     : InsetCommand(p, false)
+// {}
+
+
 InsetLabel::~InsetLabel()
 {
        InsetCommandMailer mailer("label", *this);
@@ -45,18 +50,17 @@ vector<string> const InsetLabel::getLabelList() const
 }
 
 
-void InsetLabel::edit(BufferView * bv, int, int, mouse_button::state)
-{
-       InsetCommandMailer mailer("label", *this);
-       mailer.showDialog(bv);
-}
-
-
 dispatch_result InsetLabel::localDispatch(FuncRequest const & cmd)
 {
        Inset::RESULT result = UNDISPATCHED;
 
        switch (cmd.action) {
+
+       case LFUN_INSET_EDIT:
+               InsetCommandMailer("label", *this).showDialog(cmd.view());
+               result = DISPATCHED;
+               break;
+
        case LFUN_INSET_MODIFY: {
                InsetCommandParams p;
                InsetCommandMailer::string2params(cmd.argument, p);
@@ -70,7 +74,7 @@ dispatch_result InsetLabel::localDispatch(FuncRequest const & cmd)
                }
 
                setParams(p);
-               cmd.view()->updateInset(this, !clean);
+               cmd.view()->updateInset(this);
                result = DISPATCHED;
        }
        break;
@@ -83,19 +87,14 @@ dispatch_result InsetLabel::localDispatch(FuncRequest const & cmd)
 }
 
 
-void InsetLabel::edit(BufferView * bv, bool)
-{
-       edit(bv, 0, 0, mouse_button::none);
-}
-
-
 int InsetLabel::latex(Buffer const *, ostream & os,
-                     bool /*fragile*/, bool /*fs*/) const
+                     LatexRunParams const &) const
 {
        os << escape(getCommand());
        return 0;
 }
 
+
 int InsetLabel::ascii(Buffer const *, ostream & os, int) const
 {
        os << '<' << getContents()  << '>';