]> git.lyx.org Git - lyx.git/commitdiff
Add hspell option to spell-checkers list
authorDekel Tsur <dekelts@tau.ac.il>
Fri, 7 Mar 2003 18:06:56 +0000 (18:06 +0000)
committerDekel Tsur <dekelts@tau.ac.il>
Fri, 7 Mar 2003 18:06:56 +0000 (18:06 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6381 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt2/ChangeLog
src/frontends/qt2/QPrefs.C
src/frontends/qt2/ui/QPrefSpellcheckerModule.ui

index 7e754e89006f0b74b16ace077f803e59047c88d9..689b03bf9b1bff7591ea8d0423f2dbd5be9bba4f 100644 (file)
@@ -1,3 +1,8 @@
+2003-03-07  Dekel Tsur  <dekelts@tau.ac.il>
+
+       * QPrefs.C:
+       * QPrefSpellcheckerModule.ui: Add 'hspell' option.
+
 2003-03-07  Angus Leeming  <leeming@lyx.org>
 
        * Dialogs.C:
index fb06d6383f39955ececcc6d37a18123a4fcee352..1ddf870d4eefc7abc24923ce0f8e4c6992622320 100644 (file)
@@ -186,10 +186,7 @@ void QPrefs::apply()
 
        QPrefSpellcheckerModule * spellmod(dialog_->spellcheckerModule);
 
-       if (spellmod->spellCommandCO->currentItem() == 0)
-               rc.isp_command = "ispell";
-       else
-               rc.isp_command = "aspell";
+       rc.isp_command = fromqstr(spellmod->spellCommandCO->currentText());
 
        // FIXME: remove isp_use_alt_lang
        rc.isp_alt_lang = fromqstr(spellmod->altLanguageED->text());
@@ -448,8 +445,13 @@ void QPrefs::update_contents()
 
        QPrefSpellcheckerModule * spellmod(dialog_->spellcheckerModule);
 
-       item = (rc.isp_command == "ispell") ? 0 : 1;
-       spellmod->spellCommandCO->setCurrentItem(item);
+       QString const tmp = qt_(rc.isp_command);
+       for (int i = 0; i < spellmod->spellCommandCO->count(); ++i) {
+               if (spellmod->spellCommandCO->text(i) == tmp) {
+                       spellmod->spellCommandCO->setCurrentItem(i);
+                       break;
+               }
+       }
        // FIXME: remove isp_use_alt_lang
        spellmod->altLanguageED->setText(toqstr(rc.isp_alt_lang));
        // FIXME: remove isp_use_esc_chars
index 33c058e43a59aca4b7f98324619199199ab6e9c3..0c22391cce072a359bce4b74bb89e98eb8dd624f 100644 (file)
                             <string>aspell</string>
                         </property>
                     </item>
+                    <item>
+                        <property>
+                            <name>text</name>
+                            <string>hspell</string>
+                        </property>
+                    </item>
                     <property stdset="1">
                         <name>name</name>
                         <cstring>spellCommandCO</cstring>