Remove confusing and unusual "Find Next" button from spellchecker dialog (#8931)

This commit is contained in:
Juergen Spitzmueller 2021-03-04 16:54:01 +01:00
parent b9e8462bd8
commit a57cdd0d30
3 changed files with 20 additions and 45 deletions

View File

@ -239,7 +239,6 @@ void SpellcheckerWidget::Private::updateView()
// Enable widgets as needed.
bool const has_word = enabled && !ui.wordED->text().isEmpty();
bool const can_replace = has_word && !bv->buffer().isReadonly();
ui.findNextPB->setEnabled(enabled);
ui.TextLabel3->setEnabled(enabled);
ui.wordED->setEnabled(enabled);
ui.ignorePB->setEnabled(has_word);
@ -461,19 +460,6 @@ void SpellcheckerWidget::on_ignorePB_clicked()
}
void SpellcheckerWidget::on_findNextPB_clicked()
{
if (d->disabled())
return;
docstring const textfield = qstring_to_ucs4(d->ui.wordED->text());
docstring const datastring = find2string(textfield,
true, true, true, false, false, false);
LYXERR(Debug::GUI, "Spellchecker: find next (" << textfield << ")");
dispatch(FuncRequest(LFUN_WORD_FIND, datastring));
d->canCheck();
}
void SpellcheckerWidget::on_replacePB_clicked()
{
if (d->disabled())

View File

@ -37,7 +37,6 @@ public:
bool initialiseParams(std::string const &);
private Q_SLOTS:
void on_findNextPB_clicked();
void on_replaceAllPB_clicked();
void on_suggestionsLW_itemClicked(QListWidgetItem *);
void on_replaceCO_highlighted(const QString & str);

View File

@ -49,16 +49,6 @@
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QPushButton" name="ignorePB">
<property name="toolTip">
<string>Ignore this word</string>
</property>
<property name="text">
<string>Ign&amp;ore</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
@ -86,16 +76,6 @@
</item>
</layout>
</item>
<item row="3" column="1">
<widget class="QPushButton" name="findNextPB">
<property name="toolTip">
<string/>
</property>
<property name="text">
<string>Find Ne&amp;xt</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="TextLabel3">
<property name="text">
@ -149,16 +129,6 @@
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QPushButton" name="ignoreAllPB">
<property name="toolTip">
<string>Ignore this word throughout this session</string>
</property>
<property name="text">
<string>I&amp;gnore All</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="Line" name="line">
<property name="orientation">
@ -195,6 +165,26 @@
</property>
</spacer>
</item>
<item row="3" column="1">
<widget class="QPushButton" name="ignorePB">
<property name="toolTip">
<string>Ignore this word</string>
</property>
<property name="text">
<string>Ign&amp;ore</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QPushButton" name="ignoreAllPB">
<property name="toolTip">
<string>Ignore this word throughout this session</string>
</property>
<property name="text">
<string>I&amp;gnore All</string>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>