[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdeutils/kedit
From: Waldo Bastian <bastian () kde ! org>
Date: 2005-02-18 11:40:03
Message-ID: 20050218114003.120D31BBAE () office ! kde ! org
[Download RAW message or body]
CVS commit by waba:
Don't complain about ISpell missing when aspell could not be found.
M +19 -4 kedit.cpp 1.208
M +2 -1 kedit.h 1.76
--- kdeutils/kedit/kedit.cpp #1.207:1.208
@@ -441,13 +441,28 @@ void TopLevel::spell_done(const QString&
}
+// Replace ISpell with the name of the actual spell checker.
+// TODO: Use %1 in the original string instead when string freeze is over.
+QString TopLevel::replaceISpell(QString msg, int client)
+{
+ switch(client)
+ {
+ case KS_CLIENT_ISPELL: msg.replace("ISpell", "<b>ispell</b>"); break;
+ case KS_CLIENT_ASPELL: msg.replace("ISpell", "<b>aspell</b>"); break;
+ case KS_CLIENT_HSPELL: msg.replace("ISpell", "<b>hspell</b>"); break;
+ }
+ msg.replace("\n", "<p>");
+ return "<qt>"+msg+"</qt>";
+}
+
void TopLevel::spell_finished( )
{
KSpell::spellStatus status = kspell->status();
+ int client = kspellconfigOptions->client();
delete kspell;
kspell = 0;
if (status == KSpell::Error)
{
- KMessageBox::sorry(this, i18n("ISpell could not be started.\n"
- "Please make sure you have ISpell properly configured and in your PATH."));
+ KMessageBox::sorry(this, replaceISpell(i18n("ISpell could not be started.\n"
+ "Please make sure you have ISpell properly configured and in your PATH."), client));
}
else if (status == KSpell::Crashed)
@@ -455,5 +470,5 @@ void TopLevel::spell_finished( )
eframe->spellcheck_stop();
statusBar()->changeItem (i18n("Spellcheck: Crashed."), ID_GENERAL);
- KMessageBox::sorry(this, i18n("ISpell seems to have crashed."));
+ KMessageBox::sorry(this, replaceISpell(i18n("ISpell seems to have crashed."), client));
}
}
--- kdeutils/kedit/kedit.h #1.75:1.76
@@ -201,4 +201,5 @@ private slots:
void showSettings();
void slotSelectionChanged();
+ QString replaceISpell(QString msg, int client);
};
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic