mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-25 04:38:23 +00:00
Updated context menu for spellchecker.
This commit is contained in:
parent
8734ebe4c4
commit
0ca0930066
@ -1616,6 +1616,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_formatting_link_url" = "URL";
|
||||
"lng_formatting_link_create" = "Create";
|
||||
|
||||
"lng_spellchecker_submenu" = "Spelling";
|
||||
"lng_spellchecker_add" = "Add to Dictionary";
|
||||
"lng_spellchecker_remove" = "Remove from Dictionary";
|
||||
"lng_spellchecker_ignore" = "Ignore word";
|
||||
|
@ -282,7 +282,11 @@ void InitSpellchecker(
|
||||
#ifndef TDESKTOP_DISABLE_SPELLCHECK
|
||||
const auto s = Ui::CreateChild<Spellchecker::SpellingHighlighter>(
|
||||
field.get(),
|
||||
session->settings().spellcheckerEnabledValue());
|
||||
session->settings().spellcheckerEnabledValue(),
|
||||
Spellchecker::SpellingHighlighter::CustomContextMenuItem{
|
||||
tr::lng_settings_manage_dictionaries(tr::now),
|
||||
[=] { Ui::show(Box<Ui::ManageDictionariesBox>(session)); }
|
||||
});
|
||||
field->setExtendedContextMenu(s->contextMenuCreated());
|
||||
#endif // TDESKTOP_DISABLE_SPELLCHECK
|
||||
}
|
||||
|
@ -12,6 +12,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "base/qt_connection.h"
|
||||
|
||||
#ifndef TDESKTOP_DISABLE_SPELLCHECK
|
||||
#include "boxes/dictionaries_manager.h"
|
||||
#include "spellcheck/spelling_highlighter.h"
|
||||
#endif // TDESKTOP_DISABLE_SPELLCHECK
|
||||
|
||||
|
@ -355,6 +355,7 @@ std::vector<int> DefaultLanguages() {
|
||||
|
||||
void Start(not_null<Main::Session*> session) {
|
||||
Spellchecker::SetPhrases({ {
|
||||
{ &ph::lng_spellchecker_submenu, tr::lng_spellchecker_submenu() },
|
||||
{ &ph::lng_spellchecker_add, tr::lng_spellchecker_add() },
|
||||
{ &ph::lng_spellchecker_remove, tr::lng_spellchecker_remove() },
|
||||
{ &ph::lng_spellchecker_ignore, tr::lng_spellchecker_ignore() },
|
||||
|
Loading…
Reference in New Issue
Block a user