feat: linux-only system dictionary spell checking (#6703)
Reviewed-by: Nerixyz <nerixdev@outlook.de>
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "common/Env.hpp"
|
||||
#include "controllers/commands/CommandContext.hpp"
|
||||
#include "controllers/notifications/NotificationController.hpp"
|
||||
#include "controllers/spellcheck/SpellChecker.hpp"
|
||||
#include "messages/Image.hpp"
|
||||
#include "messages/Message.hpp"
|
||||
#include "messages/MessageBuilder.hpp"
|
||||
@@ -202,6 +203,18 @@ QString debugTest(const CommandContext &ctx)
|
||||
getApp()->getUpdates().checkForUpdates();
|
||||
ctx.channel->addSystemMessage(QString("checking for updates"));
|
||||
}
|
||||
else if (command == "spellcheck-get-system-dictionaries")
|
||||
{
|
||||
#ifdef CHATTERINO_WITH_SPELLCHECK
|
||||
auto dicts = getApp()->getSpellChecker()->getSystemDictionaries();
|
||||
for (const auto &dict : dicts)
|
||||
{
|
||||
ctx.channel->addSystemMessage(QString("system dictionary: %1 at %2")
|
||||
.arg(dict.name)
|
||||
.arg(dict.path));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else if (command == "save-settings")
|
||||
{
|
||||
ctx.channel->addSystemMessage(u"requesting settings save"_s);
|
||||
|
||||
Reference in New Issue
Block a user