this, SIGNAL(changed()));
connect(nameED, SIGNAL(textChanged(const QString &)),
this, SIGNAL(changed()));
+ connect(literalCB, SIGNAL(clicked()),
+ this, SIGNAL(changed()));
connect(webRB, SIGNAL(clicked()),
this, SIGNAL(changed()));
connect(emailRB, SIGNAL(clicked()),
targetED->setText(toqstr(params["target"]));
nameED->setText(toqstr(params["name"]));
+ literalCB->setChecked(params["literal"] == "true");
docstring const & type = params["type"];
if (type.empty())
webRB->setChecked(true);
return false;
targetED->setText(toqstr(params["target"]));
nameED->setText(toqstr(params["name"]));
+ literalCB->setChecked(params["literal"] == "true");
if (params["type"] == from_utf8("mailto:"))
emailRB->setChecked(true);
else if (params["type"] == from_utf8("file:"))
params["type"] = from_utf8("mailto:");
else if (fileRB->isChecked())
params["type"] = from_utf8("file:");
+ params["literal"] = literalCB->isChecked()
+ ? from_ascii("true") : from_ascii("false");
params.setCmdName("href");
return from_utf8(InsetHyperlink::params2string(params));
}
-bool GuiHyperlink::checkWidgets() const
+bool GuiHyperlink::checkWidgets(bool readonly) const
{
+ targetED->setReadOnly(readonly);
+ nameED->setReadOnly(readonly);
+ typeGB->setEnabled(!readonly);
if (!InsetParamsWidget::checkWidgets())
return false;
return !targetED->text().isEmpty() || !nameED->text().isEmpty();