[Libreoffice-commits] online.git: loleaflet/src
mert (via logerrit)
logerrit at kemper.freedesktop.org
Tue Dec 10 17:37:25 UTC 2019
loleaflet/src/control/Control.Toolbar.js | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 9cc80474a8d00fcbe21a532b43179c5440fc672e
Author: mert <mert.tumer at collabora.com>
AuthorDate: Tue Dec 10 16:01:00 2019 +0300
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Tue Dec 10 18:37:06 2019 +0100
fix Selected language in the bottom status bar
disappears, also fixed language selection
does not work at all
Change-Id: I1349e6ccc786f4c17130f14ff95e44f4ea858550
Reviewed-on: https://gerrit.libreoffice.org/84845
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
diff --git a/loleaflet/src/control/Control.Toolbar.js b/loleaflet/src/control/Control.Toolbar.js
index 86474ddce..1fa5f333d 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -1833,15 +1833,13 @@ function onCommandStateChanged(e) {
else if (commandName === '.uno:LanguageStatus') {
var code = state;
var language = _(state);
-
var split = code.split(';');
if (split.length > 1) {
language = _(split[0]);
code = split[1];
}
- updateToolbarItem(statusbar, 'LanguageStatus', $('#LanguageStatus').html(language).parent().html());
w2ui['editbar'].set('languagecode', {text: code});
- $('#tb_actionbar_item_LanguageStatus table table td:first-of-type').html(language+' ');
+ w2ui['actionbar'].set('LanguageStatus', {text: language, selected: language});
}
else if (commandName === '.uno:ModifiedStatus') {
if (e.state === 'true') {
@@ -1962,7 +1960,9 @@ function onCommandValues(e) {
for (var lang in languages) {
translated = languages[lang].translated;
neutral = languages[lang].neutral;
- toolbaritems.push({ id: neutral, text: translated, uno: constLang + encodeURIComponent('Default_' + neutral) });
+ var splitTranslated = translated.split(';');
+ var splitNeutral = neutral.split(';');
+ toolbaritems.push({ id: neutral, text: splitTranslated[0], uno: constLang + encodeURIComponent('Default_' + splitNeutral[0]) });
}
toolbaritems.push({ id: 'reset', text: resetLang, uno: constLang + constDefault });
More information about the Libreoffice-commits
mailing list