]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetExternal.cpp
Choose a delimiter for lstinline (braces can not be used for some listings version)
[lyx.git] / src / insets / InsetExternal.cpp
index 1d924c8261ea76f53a2f82fa08ae85d938af230c..56d9401ce55ddca1f37dfb650458ca4f930ad204 100644 (file)
@@ -337,7 +337,7 @@ bool InsetExternalParams::read(Buffer const & buffer, Lexer & lex)
 
                case EX_HEIGHT:
                        lex.next();
-                       resizedata.height = LyXLength(lex.getString());
+                       resizedata.height = Length(lex.getString());
                        break;
 
                case EX_KEEPASPECTRATIO:
@@ -361,7 +361,7 @@ bool InsetExternalParams::read(Buffer const & buffer, Lexer & lex)
 
                case EX_WIDTH:
                        lex.next();
-                       resizedata.width = LyXLength(lex.getString());
+                       resizedata.width = Length(lex.getString());
                        break;
 
                case EX_END:
@@ -400,16 +400,16 @@ InsetExternal::InsetExternal()
 
 
 InsetExternal::InsetExternal(InsetExternal const & other)
-       : InsetOld(other),
+       : Inset(other),
          boost::signals::trackable(),
          params_(other.params_),
          renderer_(other.renderer_->clone(this))
 {}
 
 
-auto_ptr<InsetBase> InsetExternal::doClone() const
+auto_ptr<Inset> InsetExternal::doClone() const
 {
-       return auto_ptr<InsetBase>(new InsetExternal(*this));
+       return auto_ptr<Inset>(new InsetExternal(*this));
 }
 
 
@@ -450,11 +450,12 @@ void InsetExternal::doDispatch(Cursor & cur, FuncRequest & cmd)
                break;
 
        case LFUN_MOUSE_RELEASE:
-               InsetExternalMailer(*this).showDialog(&cur.bv());
+               if (!cur.selection())
+                       InsetExternalMailer(*this).showDialog(&cur.bv());
                break;
 
        default:
-               InsetBase::doDispatch(cur, cmd);
+               Inset::doDispatch(cur, cmd);
        }
 }
 
@@ -471,7 +472,7 @@ bool InsetExternal::getStatus(Cursor & cur, FuncRequest const & cmd,
                return true;
 
        default:
-               return InsetBase::getStatus(cur, cmd, flag);
+               return Inset::getStatus(cur, cmd, flag);
        }
 }
 
@@ -877,7 +878,7 @@ void InsetExternalMailer::string2params(string const & in,
                return print_mailer_error("InsetExternalMailer", in, 1, name_);
 
        // This is part of the inset proper that is usually swallowed
-       // by LyXText::readInset
+       // by Text::readInset
        string id;
        lex >> id;
        if (!lex || id != "External")