summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2024-02-12 22:11:25 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2024-02-13 11:57:52 +0100
commit19a70b8c4b6d4886e8b65c85bb737f92369569a0 (patch)
tree860aec7e121f7802da6d86b5694497c0610a67b3 /vcl
parent8fc86713191db241f03bdb1f92decb5973ef9bae (diff)
jsdialog: use action for set_sensitive
This will reduce protocol volume as we will send short message instead of JSON for the complete widget. Signed-off-by: Szymon Kłos <szymon.klos@collabora.com> Change-Id: I5e7541915f7e2da4bf822b99a05cc3066073334e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163261 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/jsdialog/jsdialogbuilder.hxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx
index 6e611c4f962c..edd49c1804a7 100644
--- a/vcl/inc/jsdialog/jsdialogbuilder.hxx
+++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx
@@ -420,7 +420,12 @@ public:
bool bIsSensitive = BaseInstanceClass::get_sensitive();
BaseInstanceClass::set_sensitive(sensitive);
if (bIsSensitive != sensitive)
- sendUpdate();
+ {
+ std::unique_ptr<jsdialog::ActionDataMap> pMap
+ = std::make_unique<jsdialog::ActionDataMap>();
+ (*pMap)[ACTION_TYPE ""_ostr] = (sensitive ? u"enable" : u"disable");
+ sendAction(std::move(pMap));
+ }
}
virtual css::uno::Reference<css::datatransfer::dnd::XDropTarget> get_drop_target() override