mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-23 18:32:53 +00:00
kdeplasma-addons: adjust spellcheck applet to KTextEdit changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
faa0514619
commit
ae1492b768
1 changed files with 2 additions and 4 deletions
|
@ -197,7 +197,6 @@ void SpellCheck::toggleDialog(bool pasteText, bool preferSelection)
|
||||||
m_textEdit = new KTextEdit(m_spellingDialog);
|
m_textEdit = new KTextEdit(m_spellingDialog);
|
||||||
m_textEdit->enableFindReplace(false);
|
m_textEdit->enableFindReplace(false);
|
||||||
m_textEdit->setCheckSpellingEnabled(true);
|
m_textEdit->setCheckSpellingEnabled(true);
|
||||||
m_textEdit->createHighlighter();
|
|
||||||
|
|
||||||
m_dictionaryComboBox = new KSpellDictionaryComboBox(m_spellingDialog);
|
m_dictionaryComboBox = new KSpellDictionaryComboBox(m_spellingDialog);
|
||||||
m_dictionaryComboBox->setToolTip(i18n("Language"));
|
m_dictionaryComboBox->setToolTip(i18n("Language"));
|
||||||
|
@ -227,7 +226,6 @@ void SpellCheck::toggleDialog(bool pasteText, bool preferSelection)
|
||||||
connect(m_spellingDialog, SIGNAL(dialogResized()), this, SLOT(dialogResized()));
|
connect(m_spellingDialog, SIGNAL(dialogResized()), this, SLOT(dialogResized()));
|
||||||
connect(copyAction, SIGNAL(triggered()), this, SLOT(copyToClipboard()));
|
connect(copyAction, SIGNAL(triggered()), this, SLOT(copyToClipboard()));
|
||||||
connect(closeAction, SIGNAL(triggered()), this, SLOT(toggleDialog()));
|
connect(closeAction, SIGNAL(triggered()), this, SLOT(toggleDialog()));
|
||||||
connect(m_textEdit, SIGNAL(languageChanged(QString)), this, SLOT(setLanguage(QString)));
|
|
||||||
connect(m_dictionaryComboBox, SIGNAL(dictionaryChanged(QString)), this, SLOT(setLanguage(QString)));
|
connect(m_dictionaryComboBox, SIGNAL(dictionaryChanged(QString)), this, SLOT(setLanguage(QString)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -273,8 +271,8 @@ void SpellCheck::copyToClipboard()
|
||||||
|
|
||||||
void SpellCheck::setLanguage(const QString &language)
|
void SpellCheck::setLanguage(const QString &language)
|
||||||
{
|
{
|
||||||
if (language != m_textEdit->spellCheckingLanguage()) {
|
if (language != m_textEdit->highlighter()->currentLanguage()) {
|
||||||
m_textEdit->setSpellCheckingLanguage(language);
|
m_textEdit->highlighter()->setCurrentLanguage(language);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_dictionaryComboBox->setCurrentByDictionary(language);
|
m_dictionaryComboBox->setCurrentByDictionary(language);
|
||||||
|
|
Loading…
Add table
Reference in a new issue