X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetWrap.cpp;h=244467ac86aa6bb0542b393af62f01bbc5d994c2;hb=2df6a6a37876dcfaa755c9aaf6a5ddc1ad58c63e;hp=91d0808de880594ba1a2d1786c5d0f2742f7a7ed;hpb=db8c16d554ebb1dcb319e44d318572de6eff024b;p=lyx.git diff --git a/src/insets/InsetWrap.cpp b/src/insets/InsetWrap.cpp index 91d0808de8..244467ac86 100644 --- a/src/insets/InsetWrap.cpp +++ b/src/insets/InsetWrap.cpp @@ -39,10 +39,10 @@ using namespace std; namespace lyx { -InsetWrap::InsetWrap(BufferParams const & bp, string const & type) - : InsetCollapsable(bp), name_(from_utf8(type)) +InsetWrap::InsetWrap(Buffer const & buf, string const & type) + : InsetCollapsable(buf), name_(from_utf8(type)) { - setLabel(_("wrap: ") + floatName(type, bp)); + setLabel(_("wrap: ") + floatName(type, buf.params())); params_.type = type; params_.lines = 0; params_.placement = "o"; @@ -74,15 +74,6 @@ void InsetWrap::doDispatch(Cursor & cur, FuncRequest & cmd) InsetWrapMailer(*this).updateDialog(&cur.bv()); break; - case LFUN_MOUSE_RELEASE: { - if (cmd.button() == mouse_button::button3 && hitButton(cmd)) { - InsetWrapMailer(*this).showDialog(&cur.bv()); - break; - } - InsetCollapsable::doDispatch(cur, cmd); - break; - } - default: InsetCollapsable::doDispatch(cur, cmd); break; @@ -107,7 +98,8 @@ bool InsetWrap::getStatus(Cursor & cur, FuncRequest const & cmd, void InsetWrap::updateLabels(ParIterator const & it) { - Counters & cnts = buffer().params().textClass().counters(); + setLabel(_("wrap: ") + floatName(params_.type, buffer().params())); + Counters & cnts = buffer().params().documentClass().counters(); string const saveflt = cnts.current_float(); // Tell to captions what the current float is @@ -199,12 +191,6 @@ void InsetWrap::validate(LaTeXFeatures & features) const } -Inset * InsetWrap::clone() const -{ - return new InsetWrap(*this); -} - - docstring InsetWrap::editMessage() const { return _("Opened Wrap Inset");