]> git.lyx.org Git - lyx.git/blobdiff - src/insets/inseturl.C
The markDirty() and fitCursor() changes
[lyx.git] / src / insets / inseturl.C
index 46678467dba6602376521dcffe0a0c411a6c6a96..0c1c1f17aac7bc9d86c6b4ea156d1c219054ad3b 100644 (file)
@@ -9,9 +9,6 @@
  */
 #include <config.h>
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
 
 #include "inseturl.h"
 #include "BufferView.h"
@@ -30,9 +27,17 @@ InsetUrl::InsetUrl(InsetCommandParams const & p, bool)
 {}
 
 
+InsetUrl::~InsetUrl()
+{
+       InsetCommandMailer mailer("url", *this);
+       mailer.hideDialog();
+}
+
+
 void InsetUrl::edit(BufferView * bv, int, int, mouse_button::state)
 {
-       bv->owner()->getDialogs().showUrl(this);
+       InsetCommandMailer mailer("url", *this);
+       mailer.showDialog(bv);
 }
 
 
@@ -51,7 +56,7 @@ string const InsetUrl::getScreenLabel(Buffer const *) const
                temp = _("HtmlUrl: ");
 
        string url;
+
        if (!getOptions().empty())
                url += getOptions();
        else
@@ -81,16 +86,16 @@ int InsetUrl::latex(Buffer const *, ostream & os,
 int InsetUrl::ascii(Buffer const *, ostream & os, int) const
 {
        if (getOptions().empty())
-               os << "[" << getContents() << "]";
+               os << '[' << getContents() << ']';
        else
-               os << "[" << getContents() << "||" <<  getOptions() << "]";
+               os << '[' << getContents() << "||" <<  getOptions() << ']';
        return 0;
 }
 
 
 int InsetUrl::linuxdoc(Buffer const *, ostream & os) const
 {
-       os << "<" << getCmdName()
+       os << '<' << getCmdName()
           << " url=\""  << getContents() << "\""
           << " name=\"" << getOptions() << "\">";