]> git.lyx.org Git - features.git/commitdiff
Remove InsetCommand::mailer_name_.
authorVincent van Ravesteijn <vfr@lyx.org>
Fri, 29 Oct 2010 00:46:21 +0000 (00:46 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Fri, 29 Oct 2010 00:46:21 +0000 (00:46 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35893 a592a061-630c-0410-9148-cb99ea01b6c8

14 files changed:
src/insets/InsetBibitem.cpp
src/insets/InsetBibtex.cpp
src/insets/InsetCitation.cpp
src/insets/InsetCommand.cpp
src/insets/InsetCommand.h
src/insets/InsetFloatList.cpp
src/insets/InsetHyperlink.cpp
src/insets/InsetInclude.cpp
src/insets/InsetIndex.cpp
src/insets/InsetLabel.cpp
src/insets/InsetLine.cpp
src/insets/InsetNomencl.cpp
src/insets/InsetRef.cpp
src/insets/InsetTOC.cpp

index 9be1656301c031755a9b5aa13d87e293fdd36f44..630f4add135c4c1fb40414fc517f6bbc9d9a435f 100644 (file)
@@ -52,7 +52,7 @@ docstring const key_prefix = from_ascii("key-");
 
 
 InsetBibitem::InsetBibitem(Buffer * buf, InsetCommandParams const & p)
-       : InsetCommand(buf, p, "bibitem")
+       : InsetCommand(buf, p)
 {
        buffer().invalidateBibinfoCache();
        if (getParam("key").empty())
index e2031b731d9da7043ed11ea44f89f5e4c2dc104a..ff9c6733602ea75fcb6077d3361a2f25d571835e 100644 (file)
@@ -52,7 +52,7 @@ namespace os = support::os;
 
 
 InsetBibtex::InsetBibtex(Buffer * buf, InsetCommandParams const & p)
-       : InsetCommand(buf, p, "bibtex")
+       : InsetCommand(buf, p)
 {
        buffer().invalidateBibinfoCache();
 }
index 626c812ceb34473271ca44e8edaf0ccb13051e32..26e0fe49046ef535bfec6853069769a0d012cdeb 100644 (file)
@@ -40,7 +40,7 @@ ParamInfo InsetCitation::param_info_;
 
 
 InsetCitation::InsetCitation(Buffer * buf, InsetCommandParams const & p)
-       : InsetCommand(buf, p, "citation")
+       : InsetCommand(buf, p)
 {}
 
 
index 90e5570555e3f69d98b1ee000980eb9a65d3e21a..55c185e9eeef5b302b7cd9d45323768832761a97 100644 (file)
@@ -52,23 +52,22 @@ namespace lyx {
 
 // FIXME Would it now be possible to use the InsetCode in 
 // place of the mailer name and recover that information?
-InsetCommand::InsetCommand(Buffer * buf, InsetCommandParams const & p,
-                          string const & mailer_name)
-       : Inset(buf), p_(p), mailer_name_(mailer_name)
+InsetCommand::InsetCommand(Buffer * buf, InsetCommandParams const & p)
+       : Inset(buf), p_(p)
 {}
 
 
 // The sole purpose of this copy constructor is to make sure
 // that the mouse_hover_ map is not copied and remains empty.
 InsetCommand::InsetCommand(InsetCommand const & rhs)
-       : Inset(rhs), p_(rhs.p_), mailer_name_(rhs.mailer_name_)
+       : Inset(rhs), p_(rhs.p_)
 {}
 
 
 InsetCommand::~InsetCommand()
 {
-       if (!mailer_name_.empty())
-               hideDialogs(mailer_name_, this);
+       if (p_.code() != NO_CODE)
+               hideDialogs(insetName(p_.code()), this);
 
        map<BufferView const *, bool>::iterator it = mouse_hover_.begin();
        map<BufferView const *, bool>::iterator end = mouse_hover_.end();
@@ -209,14 +208,14 @@ bool InsetCommand::getStatus(Cursor & cur, FuncRequest const & cmd,
 
 docstring InsetCommand::contextMenu(BufferView const &, int, int) const
 {
-       return from_ascii("context-") + from_ascii(mailer_name_);
+       return from_ascii("context-") + from_ascii(insetName(p_.code()));
 }
 
 
 bool InsetCommand::showInsetDialog(BufferView * bv) const
 {
-       if (!mailer_name_.empty())
-               bv->showDialog(mailer_name_, params2string(p_),
+       if (p_.code() != NO_CODE)
+               bv->showDialog(insetName(p_.code()), params2string(p_),
                        const_cast<InsetCommand *>(this));
        return true;
 }
index 373e469fa3135e537b8d1393f1958ecab41ea88e..4c1335002af305c70c74a8d1e14d4056f8883de9 100644 (file)
@@ -35,8 +35,7 @@ class InsetCommand : public Inset
 {
 public:
        ///
-       InsetCommand(Buffer *, InsetCommandParams const &,
-               std::string const & mailer_name);
+       InsetCommand(Buffer *, InsetCommandParams const &);
        ///
        InsetCommand(InsetCommand const & rhs);
        ///
@@ -133,8 +132,6 @@ private:
 
        ///
        InsetCommandParams p_;
-       ///
-       std::string mailer_name_;
        /// changes color when mouse enters/leaves this inset
        mutable std::map<BufferView const *, bool> mouse_hover_;
        ///
index d10c1c077fd532717f368824dce0f7f58e15d03d..a0d29d0ffb5e807313efe8eb71b4489f5b2d21a3 100644 (file)
@@ -38,12 +38,12 @@ namespace lyx {
 
 
 InsetFloatList::InsetFloatList(Buffer * buf)
-       : InsetCommand(buf, InsetCommandParams(FLOAT_LIST_CODE), "floatlist")
+       : InsetCommand(buf, InsetCommandParams(FLOAT_LIST_CODE))
 {}
 
 
 InsetFloatList::InsetFloatList(Buffer * buf, string const & type)
-       : InsetCommand(buf, InsetCommandParams(FLOAT_LIST_CODE), "floatlist")
+       : InsetCommand(buf, InsetCommandParams(FLOAT_LIST_CODE))
 {
        setParam("type", from_ascii(type));
 }
index b688b22aca3a071f963fc96486f2638cd24368bb..eec468ba8d0f42e4261cc0b7599fdee9cc2e20d8 100644 (file)
@@ -35,7 +35,7 @@ namespace lyx {
 
 
 InsetHyperlink::InsetHyperlink(Buffer * buf, InsetCommandParams const & p)
-       : InsetCommand(buf, p, "href")
+       : InsetCommand(buf, p)
 {}
 
 
index 7b9f6cb8a9db842d7d17feadc0605363939d6ed3..fd92af13baf4090619060c125e5021091254b781 100644 (file)
@@ -160,7 +160,7 @@ InsetLabel * createLabel(Buffer * buf, docstring const & label_str)
 
 
 InsetInclude::InsetInclude(Buffer * buf, InsetCommandParams const & p)
-       : InsetCommand(buf, p, "include"), include_label(uniqueID()),
+       : InsetCommand(buf, p), include_label(uniqueID()),
          preview_(new RenderMonitoredPreview(this)), failedtoload_(false),
          set_label_(false), label_(0), child_buffer_(0)
 {
index ba5eee9ddd744deb2c7516be9db68324e5965ed5..233495bea137aa484929782e24f13f1a4aa589af 100644 (file)
@@ -425,7 +425,7 @@ void InsetIndexParams::read(Lexer & lex)
 ///////////////////////////////////////////////////////////////////////
 
 InsetPrintIndex::InsetPrintIndex(Buffer * buf, InsetCommandParams const & p)
-       : InsetCommand(buf, p, "index_print")
+       : InsetCommand(buf, p)
 {}
 
 
index d98aa703474ccb0e73d15893f9471ee3f0cb765a..9c41e602ca6b443de8f960600a1a64d23e552947 100644 (file)
@@ -49,7 +49,7 @@ namespace lyx {
 
 
 InsetLabel::InsetLabel(Buffer * buf, InsetCommandParams const & p)
-       : InsetCommand(buf, p, "label")
+       : InsetCommand(buf, p)
 {}
 
 
index d2908cb1c132eca76e4aac6614a433ea4de7db42..2c88c061fd0c9853f9495fd0837b6179cce10f60 100644 (file)
@@ -42,7 +42,7 @@ using frontend::Painter;
 
 
 InsetLine::InsetLine(Buffer * buf, InsetCommandParams const & p)
-       : InsetCommand(buf, p, "line")
+       : InsetCommand(buf, p)
 {}
 
 
index dd532598d6075a6846f700d9c50792b623db76f7..ac990b14080423c447de52e9dceaae3507ae2747 100644 (file)
@@ -49,7 +49,7 @@ namespace lyx {
 /////////////////////////////////////////////////////////////////////
 
 InsetNomencl::InsetNomencl(Buffer * buf, InsetCommandParams const & p)
-       : InsetCommand(buf, p, "nomenclature"),
+       : InsetCommand(buf, p),
          nomenclature_entry_id(sgml::uniqueID(from_ascii("nomen")))
 {}
 
@@ -135,7 +135,7 @@ void InsetNomencl::validate(LaTeXFeatures & features) const
 /////////////////////////////////////////////////////////////////////
 
 InsetPrintNomencl::InsetPrintNomencl(Buffer * buf, InsetCommandParams const & p)
-       : InsetCommand(buf, p, "nomencl_print")
+       : InsetCommand(buf, p)
 {}
 
 
index b3fa322f7c3bb56ec2798bec5d732acd26338d00..47747d36380c8a50df7bfea7cb480d9fcb6ae559 100644 (file)
@@ -36,7 +36,7 @@ namespace lyx {
 
 
 InsetRef::InsetRef(Buffer * buf, InsetCommandParams const & p)
-       : InsetCommand(buf, p, "ref")
+       : InsetCommand(buf, p)
 {}
 
 
index eb8fff6618fe1c7eaa0f730dbe71859336947443..0531d1f0f4d1c9d54754ff88b9e5a2829b8aadd8 100644 (file)
@@ -35,7 +35,7 @@ namespace lyx {
 
 
 InsetTOC::InsetTOC(Buffer * buf, InsetCommandParams const & p)
-       : InsetCommand(buf, p, "toc")
+       : InsetCommand(buf, p)
 {}