mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Remove GuiRef::nameAllowed, as the DocBook support no more uses it
This commit is contained in:
parent
3a24550765
commit
fd6e14414f
@ -96,8 +96,6 @@ GuiRef::GuiRef(GuiView & lv)
|
||||
this, SLOT(resetFilter()));
|
||||
connect(csFindCB, SIGNAL(clicked()),
|
||||
this, SLOT(filterLabels()));
|
||||
connect(nameED, SIGNAL(textChanged(QString)),
|
||||
this, SLOT(changed_adaptor()));
|
||||
connect(refsTW, SIGNAL(itemClicked(QTreeWidgetItem *, int)),
|
||||
this, SLOT(refHighlighted(QTreeWidgetItem *)));
|
||||
connect(refsTW, SIGNAL(itemSelectionChanged()),
|
||||
@ -213,8 +211,6 @@ void GuiRef::refHighlighted(QTreeWidgetItem * sel)
|
||||
gotoPB->setEnabled(true);
|
||||
if (!isBufferReadonly())
|
||||
typeCO->setEnabled(true);
|
||||
nameED->setHidden(!nameAllowed());
|
||||
nameL->setHidden(!nameAllowed());
|
||||
}
|
||||
|
||||
|
||||
@ -318,7 +314,6 @@ void GuiRef::updateContents()
|
||||
typeCO->itemData(typeCO->currentIndex()).toString();
|
||||
|
||||
referenceED->clear();
|
||||
nameED->clear();
|
||||
typeCO->clear();
|
||||
|
||||
// FIXME Bring InsetMathRef on par with InsetRef
|
||||
@ -336,9 +331,6 @@ void GuiRef::updateContents()
|
||||
typeCO->addItem(qt_("Formatted reference"), "prettyref");
|
||||
|
||||
referenceED->setText(toqstr(params_["reference"]));
|
||||
nameED->setText(toqstr(params_["name"]));
|
||||
nameED->setHidden(!nameAllowed());
|
||||
nameL->setHidden(!nameAllowed());
|
||||
|
||||
// restore type settings for new insets
|
||||
bool const new_inset = params_["reference"].empty();
|
||||
@ -392,7 +384,6 @@ void GuiRef::applyView()
|
||||
|
||||
params_.setCmdName(fromqstr(typeCO->itemData(typeCO->currentIndex()).toString()));
|
||||
params_["reference"] = qstring_to_ucs4(last_reference_);
|
||||
params_["name"] = qstring_to_ucs4(nameED->text());
|
||||
params_["plural"] = pluralCB->isChecked() ?
|
||||
from_ascii("true") : from_ascii("false");
|
||||
params_["caps"] = capsCB->isChecked() ?
|
||||
@ -403,13 +394,6 @@ void GuiRef::applyView()
|
||||
}
|
||||
|
||||
|
||||
bool GuiRef::nameAllowed()
|
||||
{
|
||||
KernelDocType const doc_type = docType();
|
||||
return doc_type != LATEX && doc_type != LITERATE;
|
||||
}
|
||||
|
||||
|
||||
void GuiRef::setGoBack()
|
||||
{
|
||||
gotoPB->setText(qt_("&Go Back"));
|
||||
|
@ -73,8 +73,6 @@ private:
|
||||
///
|
||||
void enableBoxes();
|
||||
|
||||
/// is name allowed for this ?
|
||||
bool nameAllowed();
|
||||
/// go to current reference
|
||||
void gotoRef();
|
||||
/// set go back button
|
||||
|
@ -27,31 +27,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QLabel" name="nameL">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Name:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>nameED</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="nameED">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4"/>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
@ -381,7 +357,6 @@
|
||||
<tabstop>groupCB</tabstop>
|
||||
<tabstop>referenceED</tabstop>
|
||||
<tabstop>typeCO</tabstop>
|
||||
<tabstop>nameED</tabstop>
|
||||
</tabstops>
|
||||
<includes>
|
||||
<include location="local">qt_i18n.h</include>
|
||||
|
@ -287,8 +287,6 @@ void InsetRef::latex(otexstream & os, OutputParams const & rp) const
|
||||
}
|
||||
}
|
||||
else {
|
||||
// We don't want to output p_["name"], since that is only used
|
||||
// in docbook. So we construct new params, without it, and use that.
|
||||
InsetCommandParams p(REF_CODE, cmd);
|
||||
docstring const ref = getParam("reference");
|
||||
p["reference"] = ref;
|
||||
|
Loading…
Reference in New Issue
Block a user