D18125: KateStatusBar: Add dictionary button
noreply at phabricator.kde.org
Wed Jan 9 17:03:55 GMT 2019
loh.tar added a comment.
> Isn't en_US too cryptic?
> I suggest to use the just added KLanguageName (see D10446 <https://phabricator.kde.org/D10446>). With this, you can get a nice name like "English (USA)". Alternatively, you may use QLocale("en_US").nativeLanguageName(), but I did not test this, so it may be incorrect code.
I have not chose that name to keep it short as possible. I think your suggest is used by Sonnet and you see it in the menu.
For me is that sufficient. All you need in the bar is a hint that the dict is somehow set/changed, or not. For details, click the button.
How about to cut it even more, just "en" or "US"? Ideas to the flag suggestion?
> - What if you have multiple views of the same document, does it still show the correct language, even if the language is changed in one view?
> - What if you have multiple mainwindows (View > New Window), since then you have multiple StatusBars. Will that still all correctly work?
Quick tested, behave a little strange.
Shows sometimes a dummy text, e.g. after a fresh "New Window", or when you have two views and you change in one view the document the first time to the new created test file.
Als long as only one dict is in use is no update done. Move you to some text with a different dict the button is updated. Changing the dict (on the first Window) updates the button too.
Ideas? Which signals are to catch?
To: loh.tar, #ktexteditor
Cc: dhaumann, kwrite-devel, kde-frameworks-devel, #ktexteditor, hase, michaelh, ngraham, bruns, demsking, cullmann, sars
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the KWrite-Devel