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
This commit is contained in:
Jean-Marc Lasgouttes 2009-06-18 13:30:28 +00:00
parent 6b92b1c6ae
commit c676b24359
6 changed files with 15 additions and 98 deletions

View File

@ -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

View File

@ -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<string>(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<string>(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;

View File

@ -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?

View File

@ -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
{

View File

@ -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();
};

View File

@ -49,30 +49,6 @@
<item row="1" column="1" >
<widget class="QLineEdit" name="escapeCharactersED" />
</item>
<item row="2" column="0" >
<widget class="QLabel" name="persDictionaryLA" >
<property name="text" >
<string>Personal &amp;dictionary:</string>
</property>
<property name="buddy" >
<cstring>persDictionaryED</cstring>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QLineEdit" name="persDictionaryED" >
<property name="toolTip" >
<string>Specify a personal dictionary file other than the default</string>
</property>
</widget>
</item>
<item row="2" column="2" >
<widget class="QPushButton" name="persDictionaryPB" >
<property name="text" >
<string>Br&amp;owse...</string>
</property>
</widget>
</item>
<item row="2" column="3" >
<spacer>
<property name="orientation" >
@ -89,16 +65,6 @@
</property>
</spacer>
</item>
<item row="3" column="0" colspan="4" >
<widget class="QCheckBox" name="compoundWordCB" >
<property name="toolTip" >
<string>Accept words such as "diskdrive"</string>
</property>
<property name="text" >
<string>Accept compound &amp;words</string>
</property>
</widget>
</item>
<item row="4" column="0" colspan="3" >
<widget class="QCheckBox" name="spellcheckContinuouslyCB" >
<property name="text" >
@ -122,13 +88,21 @@
</property>
</spacer>
</item>
<item rowspan="2" row="2" column="0" colspan="4" >
<widget class="QCheckBox" name="compoundWordCB" >
<property name="toolTip" >
<string>Accept words such as "diskdrive"</string>
</property>
<property name="text" >
<string>Accept compound &amp;words</string>
</property>
</widget>
</item>
</layout>
</widget>
<tabstops>
<tabstop>altLanguageED</tabstop>
<tabstop>escapeCharactersED</tabstop>
<tabstop>persDictionaryED</tabstop>
<tabstop>persDictionaryPB</tabstop>
<tabstop>compoundWordCB</tabstop>
</tabstops>
<includes>