commit a57cdd0d30ad8b7587842e66de94abad919e859d
Author: Juergen Spitzmueller <sp...@lyx.org>
Date:   Thu Mar 4 16:54:01 2021 +0100

    Remove confusing and unusual "Find Next" button from spellchecker dialog 
(#8931)
---
 src/frontends/qt/GuiSpellchecker.cpp  |   14 ---------
 src/frontends/qt/GuiSpellchecker.h    |    1 -
 src/frontends/qt/ui/SpellcheckerUi.ui |   50 +++++++++++++-------------------
 3 files changed, 20 insertions(+), 45 deletions(-)

diff --git a/src/frontends/qt/GuiSpellchecker.cpp 
b/src/frontends/qt/GuiSpellchecker.cpp
index 3685ac5..dd1f9e9 100644
--- a/src/frontends/qt/GuiSpellchecker.cpp
+++ b/src/frontends/qt/GuiSpellchecker.cpp
@@ -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())
diff --git a/src/frontends/qt/GuiSpellchecker.h 
b/src/frontends/qt/GuiSpellchecker.h
index 0ee7df1..237446d 100644
--- a/src/frontends/qt/GuiSpellchecker.h
+++ b/src/frontends/qt/GuiSpellchecker.h
@@ -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);
diff --git a/src/frontends/qt/ui/SpellcheckerUi.ui 
b/src/frontends/qt/ui/SpellcheckerUi.ui
index e4409b3..c22ae0a 100644
--- a/src/frontends/qt/ui/SpellcheckerUi.ui
+++ b/src/frontends/qt/ui/SpellcheckerUi.ui
@@ -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/>
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to