From 6fb230f393250ad1457a8272e15635d044daf0ab Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Wed, 22 Jun 2022 12:20:17 +0300 Subject: [PATCH] [desktop] send hints for title's buttons --- apps/common/main/lib/controller/Desktop.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/apps/common/main/lib/controller/Desktop.js b/apps/common/main/lib/controller/Desktop.js index 9d4ec992f..6cd2fb9f5 100644 --- a/apps/common/main/lib/controller/Desktop.js +++ b/apps/common/main/lib/controller/Desktop.js @@ -194,7 +194,21 @@ define([ }; var _onHintsShow = function (visible, level) { - native.execCommand('althints:show', JSON.stringify(visible && !(level > 0))); + let info = { + visible: visible && !(level > 0), + }; + + if ( !!titlebuttons ) { + info.hints = { + 'print': titlebuttons['print'].btn.btnEl.attr('data-hint-title'), + // 'home': Common.UI.HintManager.getStaticHint('btnhome'), + 'undo': titlebuttons['undo'].btn.btnEl.attr('data-hint-title'), + 'redo': titlebuttons['redo'].btn.btnEl.attr('data-hint-title'), + 'save': titlebuttons['save'].btn.btnEl.attr('data-hint-title'), + }; + } + + native.execCommand('althints:show', JSON.stringify(info)); } var _onKeyDown = function (e) {