vcl/jsdialog/jsdialogbuilder.cxx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
New commits: commit f55266b456b1534bdbc9c3ce6d04d2b65f152a6e Author: Szymon Kłos <[email protected]> AuthorDate: Tue Dec 29 09:36:50 2020 +0100 Commit: Szymon Kłos <[email protected]> CommitDate: Sun Jan 10 19:19:16 2021 +0100 jsdialog: updates in similar fashion like other messages to unify all jsdialog interactions Change-Id: I22e14282f5a2c52ef44e68cb39338600004c4e24 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108435 Tested-by: Jenkins Reviewed-by: Szymon Kłos <[email protected]> diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx index 3352bac904d1..f33d0be85fd5 100644 --- a/vcl/jsdialog/jsdialogbuilder.cxx +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -102,6 +102,7 @@ void JSDialogNotifyIdle::updateStatus(VclPtr<vcl::Window> pWindow) if (!m_aNotifierWindow) return; + // will be deprecated soon if (m_aNotifierWindow->IsReallyVisible()) { if (const vcl::ILibreOfficeKitNotifier* pNotifier = m_aNotifierWindow->GetLOKNotifier()) @@ -124,6 +125,21 @@ void JSDialogNotifyIdle::updateStatus(VclPtr<vcl::Window> pWindow) aJsonWriter.extractData()); } } + + // new approach - update also if hidden + if (const vcl::ILibreOfficeKitNotifier* pNotifier = m_aNotifierWindow->GetLOKNotifier()) + { + tools::JsonWriter aJsonWriter; + + aJsonWriter.put("jsontype", m_sTypeOfJSON); + aJsonWriter.put("action", "update"); + aJsonWriter.put("id", m_aNotifierWindow->GetLOKWindowId()); + { + auto aEntries = aJsonWriter.startNode("control"); + pWindow->DumpAsPropertyTree(aJsonWriter); + } + pNotifier->libreOfficeKitViewCallback(LOK_CALLBACK_JSDIALOG, aJsonWriter.extractData()); + } } std::unique_ptr<tools::JsonWriter> JSDialogNotifyIdle::generateCloseMessage() const _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
