]> git.lyx.org Git - features.git/blobdiff - src/insets/inseturl.C
read the Changelog
[features.git] / src / insets / inseturl.C
index bec7fc1ca7c176e2b0f004f32cda4ba5157f00e2..240dc34609de5586daa0b62c05c2db28fd04a889 100644 (file)
@@ -14,6 +14,8 @@
 #include "LaTeXFeatures.h"
 #include "lyx_gui_misc.h" // CancelCloseBoxCB
 
+using std::ostream;
+
 
 InsetUrl::InsetUrl(string const & cmd)
        : fd_form_url(0)
@@ -103,12 +105,19 @@ void InsetUrl::CloseUrlCB(FL_OBJECT * ob, long)
 }
 
 
-extern "C" void C_InsetUrl_CloseUrlCB(FL_OBJECT * ob, long data)
+extern "C"
+void C_InsetUrl_CloseUrlCB(FL_OBJECT * ob, long data)
 {
        InsetUrl::CloseUrlCB(ob, data);
 }
 
 
+char const * InsetUrl::EditMessage() const 
+{
+       return _("Opened Url");
+}
+
+
 void InsetUrl::Edit(BufferView * bv, int, int, unsigned int)
 {
        static int ow = -1, oh;
@@ -157,16 +166,17 @@ string InsetUrl::getScreenLabel() const
                temp += _("HtmlUrl: ");
        else 
                temp += _("Url: ");
-       temp += getContents();
        if(!getOptions().empty()) {
-               temp += "||";
                temp += getOptions();
+       } else {
+         temp += getContents();
        }
        return temp;
 }
 
 
-int InsetUrl::Latex(ostream & os, signed char fragile, bool free_spc) const
+int InsetUrl::Latex(Buffer const *, ostream & os,
+                   bool fragile, bool /*free_spc*/) const
 {
        if (!getOptions().empty())
                os << getOptions() + ' ';
@@ -177,7 +187,17 @@ int InsetUrl::Latex(ostream & os, signed char fragile, bool free_spc) const
 }
 
 
-int InsetUrl::Linuxdoc(ostream & os) const
+int InsetUrl::Ascii(Buffer const *, ostream & os) const
+{
+       if (getOptions().empty())
+               os << "[" << getContents() << "]";
+       else
+               os << "[" << getContents() << "||" <<  getOptions() << "]";
+       return 0;
+}
+
+
+int InsetUrl::Linuxdoc(Buffer const *, ostream & os) const
 {
        os << "<" << getCmdName()
           << " url=\""  << getContents() << "\""
@@ -187,7 +207,7 @@ int InsetUrl::Linuxdoc(ostream & os) const
 }
 
 
-int InsetUrl::DocBook(ostream & os) const
+int InsetUrl::DocBook(Buffer const *, ostream & os) const
 {
        os << "<ulink url=\"" << getContents() << "\">"
           << getOptions() << "</ulink>";