#include "LyXView.h"
#include "debug.h"
#include "frontends/Dialogs.h"
+#include "gettext.h"
using std::ostream;
-InsetUrl::InsetUrl(InsetCommandParams const & p)
+InsetUrl::InsetUrl(InsetCommandParams const & p, bool)
: InsetCommand(p)
{}
-void InsetUrl::Edit(BufferView * bv, int, int, unsigned int)
+void InsetUrl::edit(BufferView * bv, int, int, unsigned int)
{
bv->owner()->getDialogs()->showUrl( this );
}
-string const InsetUrl::getScreenLabel() const
+void InsetUrl::edit(BufferView * bv, bool)
+{
+ edit(bv, 0, 0, 0);
+}
+
+
+string const InsetUrl::getScreenLabel(Buffer const *) const
{
string temp;
- if( getCmdName() == "url" )
+ if (getCmdName() == "url" )
temp = _("Url: ");
else
temp = _("HtmlUrl: ");
- if(!getOptions().empty())
+ if (!getOptions().empty())
temp += getOptions();
else
temp += getContents();
}
-int InsetUrl::Latex(Buffer const *, ostream & os,
+int InsetUrl::latex(Buffer const *, ostream & os,
bool fragile, bool /*free_spc*/) const
{
if (!getOptions().empty())
}
-int InsetUrl::Ascii(Buffer const *, ostream & os, int) const
+int InsetUrl::ascii(Buffer const *, ostream & os, int) const
{
if (getOptions().empty())
os << "[" << getContents() << "]";
}
-int InsetUrl::Linuxdoc(Buffer const *, ostream & os) const
+int InsetUrl::linuxdoc(Buffer const *, ostream & os) const
{
os << "<" << getCmdName()
<< " url=\"" << getContents() << "\""
}
-int InsetUrl::DocBook(Buffer const *, ostream & os) const
+int InsetUrl::docbook(Buffer const *, ostream & os) const
{
os << "<ulink url=\"" << getContents() << "\">"
<< getOptions() << "</ulink>";
}
-void InsetUrl::Validate(LaTeXFeatures & features) const
+void InsetUrl::validate(LaTeXFeatures & features) const
{
- features.url = true;
+ features.require("url");
}