From c676b243598efb722f7b2fc9b3a672e93ea7aea0 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Thu, 18 Jun 2009 13:30:28 +0000 Subject: [PATCH] prefs \use_personal_dictionary and \personal_dictionary are not used anymore (ispell only) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30156 a592a061-630c-0410-9148-cb99ea01b6c8 --- RELEASE-NOTES | 5 ++- src/LyXRC.cpp | 31 +-------------- src/LyXRC.h | 4 -- src/frontends/qt4/GuiPrefs.cpp | 24 ----------- src/frontends/qt4/GuiPrefs.h | 3 -- src/frontends/qt4/ui/PrefSpellcheckerUi.ui | 46 +++++----------------- 6 files changed, 15 insertions(+), 98 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 0f8342564b..01a5c4ddae 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -21,8 +21,9 @@ The following variables are obsoleted in 2.0 - \plaintext_roff_command (was not used anymore) -- \spell_command, \use_input_encoding and \use_spell_lib (ispell - support has been removed) +- \personal_dictionary, \spell_command, \use_input_encoding, + \use_personal_dictionary and \use_spell_lib (ispell support has been + removed) - \custom_export_command and \custom_export_format diff --git a/src/LyXRC.cpp b/src/LyXRC.cpp index 50153fb504..0d88a48bac 100644 --- a/src/LyXRC.cpp +++ b/src/LyXRC.cpp @@ -271,7 +271,6 @@ void LyXRC::setDefaults() // Spellchecker settings: spellchecker_accept_compound = false; spellchecker_use_alt_lang = false; - spellchecker_use_pers_dict = false; spellchecker_use_esc_chars = false; spellcheck_continuously = false; use_kbmap = false; @@ -891,7 +890,7 @@ int LyXRC::read(Lexer & lexrc) lexrc >> spellchecker_use_alt_lang; break; case RC_USE_PERS_DICT: - lexrc >> spellchecker_use_pers_dict; + (void) lexrc.getString(); // Obsoleted in 2.0 break; case RC_USE_TOOLTIP: lexrc >> use_tooltip; @@ -906,8 +905,7 @@ int LyXRC::read(Lexer & lexrc) lexrc >> spellchecker_alt_lang; break; case RC_PERS_DICT: - if (lexrc.next()) - spellchecker_pers_dict = os::internal_path(lexrc.getString()); + (void) lexrc.getString(); // Obsoleted in 2.0 break; case RC_ESC_CHARS: lexrc >> spellchecker_esc_chars; @@ -2235,15 +2233,6 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; - case RC_USE_PERS_DICT: - if (ignore_system_lyxrc || - spellchecker_use_pers_dict != system_lyxrc.spellchecker_use_pers_dict) { - os << "\\use_personal_dictionary " - << convert(spellchecker_use_pers_dict) - << '\n'; - } - if (tag != RC_LAST) - break; case RC_USE_TOOLTIP: if (ignore_system_lyxrc || use_tooltip != system_lyxrc.use_tooltip) { @@ -2258,13 +2247,6 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c << convert(use_pixmap_cache) << '\n'; } - case RC_PERS_DICT: - if (spellchecker_pers_dict != system_lyxrc.spellchecker_pers_dict) { - string const path = os::external_path(spellchecker_pers_dict); - os << "\\personal_dictionary \"" << path << "\"\n"; - } - if (tag != RC_LAST) - break; os << "\n#\n" << "# LANGUAGE SUPPORT SECTION ##########################\n" @@ -2782,11 +2764,6 @@ string const LyXRC::getDescription(LyXRCTags tag) "Use the OS native format."); break; - case RC_PERS_DICT: - case RC_USE_PERS_DICT: - str = _("Specify an alternate personal dictionary file. E.g. \".aspell_english\"."); - break; - case RC_PREVIEW: str = _("Shows a typeset preview of things such as math"); break; @@ -2953,10 +2930,6 @@ string const LyXRC::getDescription(LyXRCTags tag) case RC_USETEMPDIR: break; - case RC_USE_INP_ENC: - str = _("Specify whether to pass the -T input encoding option to aspell. Enable this if you cannot check the spelling of words containing accented letters. This may not work with all dictionaries."); - break; - case RC_USE_TOOLTIP: str = _("Enable the automatic appearance of tool tips in the work area."); break; diff --git a/src/LyXRC.h b/src/LyXRC.h index 06ef2760aa..2f87d023de 100644 --- a/src/LyXRC.h +++ b/src/LyXRC.h @@ -326,8 +326,6 @@ public: bool spellchecker_accept_compound; /// Use alternate language? bool spellchecker_use_alt_lang; - /// Use personal dictionary? - bool spellchecker_use_pers_dict; /// Use tooltips? bool use_tooltip; /// Use pixmap cache? @@ -336,8 +334,6 @@ public: bool spellchecker_use_esc_chars; /// Alternate language for spellchecker std::string spellchecker_alt_lang; - /// Alternate personal dictionary file for the spellchecker - std::string spellchecker_pers_dict; /// Escape characters std::string spellchecker_esc_chars; /// spellcheck continuously? diff --git a/src/frontends/qt4/GuiPrefs.cpp b/src/frontends/qt4/GuiPrefs.cpp index 23392ad666..3b2034286a 100644 --- a/src/frontends/qt4/GuiPrefs.cpp +++ b/src/frontends/qt4/GuiPrefs.cpp @@ -1250,14 +1250,10 @@ PrefSpellchecker::PrefSpellchecker(GuiPreferences * form) { setupUi(this); - connect(persDictionaryPB, SIGNAL(clicked()), this, SLOT(selectDict())); - connect(altLanguageED, SIGNAL(textChanged(QString)), this, SIGNAL(changed())); connect(escapeCharactersED, SIGNAL(textChanged(QString)), this, SIGNAL(changed())); - connect(persDictionaryED, SIGNAL(textChanged(QString)), - this, SIGNAL(changed())); connect(compoundWordCB, SIGNAL(clicked()), this, SIGNAL(changed())); connect(spellcheckContinuouslyCB, SIGNAL(clicked()), @@ -1273,9 +1269,6 @@ void PrefSpellchecker::apply(LyXRC & rc) const // FIXME: remove spellchecker_use_esc_chars rc.spellchecker_esc_chars = fromqstr(escapeCharactersED->text()); rc.spellchecker_use_esc_chars = !rc.spellchecker_esc_chars.empty(); - // FIXME: remove spellchecker_use_pers_dict - rc.spellchecker_pers_dict = internal_path(fromqstr(persDictionaryED->text())); - rc.spellchecker_use_pers_dict = !rc.spellchecker_pers_dict.empty(); rc.spellchecker_accept_compound = compoundWordCB->isChecked(); rc.spellcheck_continuously = spellcheckContinuouslyCB->isChecked(); } @@ -1287,21 +1280,11 @@ void PrefSpellchecker::update(LyXRC const & rc) altLanguageED->setText(toqstr(rc.spellchecker_alt_lang)); // FIXME: remove spellchecker_use_esc_chars escapeCharactersED->setText(toqstr(rc.spellchecker_esc_chars)); - // FIXME: remove spellchecker_use_pers_dict - persDictionaryED->setText(toqstr(external_path(rc.spellchecker_pers_dict))); compoundWordCB->setChecked(rc.spellchecker_accept_compound); spellcheckContinuouslyCB->setChecked(rc.spellcheck_continuously); } -void PrefSpellchecker::selectDict() -{ - QString file = form_->browsedict(internalPath(persDictionaryED->text())); - if (!file.isEmpty()) - persDictionaryED->setText(file); -} - - ///////////////////////////////////////////////////////////////////// // @@ -2910,13 +2893,6 @@ QString GuiPreferences::browsekbmap(QString const & file) const } -QString GuiPreferences::browsedict(QString const & file) const -{ - return browseFile(file, qt_("Choose personal dictionary"), - QStringList(qt_("*.pws"))); -} - - QString GuiPreferences::browse(QString const & file, QString const & title) const { diff --git a/src/frontends/qt4/GuiPrefs.h b/src/frontends/qt4/GuiPrefs.h index 2a82e5a99c..737d37812f 100644 --- a/src/frontends/qt4/GuiPrefs.h +++ b/src/frontends/qt4/GuiPrefs.h @@ -91,7 +91,6 @@ public: QString browsebind(QString const & file) const; QString browseUI(QString const & file) const; QString browsekbmap(QString const & file) const; - QString browsedict(QString const & file) const; /// general browse QString browse(QString const & file, QString const & title) const; @@ -315,8 +314,6 @@ public: void apply(LyXRC & rc) const; void update(LyXRC const & rc); -private Q_SLOTS: - void selectDict(); }; diff --git a/src/frontends/qt4/ui/PrefSpellcheckerUi.ui b/src/frontends/qt4/ui/PrefSpellcheckerUi.ui index 597b05b2bb..075947c1d0 100644 --- a/src/frontends/qt4/ui/PrefSpellcheckerUi.ui +++ b/src/frontends/qt4/ui/PrefSpellcheckerUi.ui @@ -49,30 +49,6 @@ - - - - Personal &dictionary: - - - persDictionaryED - - - - - - - Specify a personal dictionary file other than the default - - - - - - - Br&owse... - - - @@ -89,16 +65,6 @@ - - - - Accept words such as "diskdrive" - - - Accept compound &words - - - @@ -122,13 +88,21 @@ + + + + Accept words such as "diskdrive" + + + Accept compound &words + + + altLanguageED escapeCharactersED - persDictionaryED - persDictionaryPB compoundWordCB