summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRafael Lima <rafael.palma.lima@gmail.com>2023-07-21 14:47:47 +0200
committerCaolán McNamara <caolan.mcnamara@collabora.com>2023-07-23 15:07:11 +0200
commit65c91bd5aa6f9b68390739a0e027d23c8a32da08 (patch)
tree4c39eb8f25cc390a575e1f1f95a55f362a0afc91 /include
parentd28ba797dfb804e020e1cd8be5505f31b2adb74a (diff)
tdf#147911 Implement set_item_help_id for context menu items
This patch adds the method set_item_help_id for weld::Menu (similarly to what we already have for weld::Toolbar). This way, it is possible to define help IDs for each entry in context menus that are created during runtime. This is necessary to fix various bug tickets that request F1 to redirect to the corresponding help page when a context menu item has focus. This currently works for context menus created from XML files, but fails for context menus created during runtime. Besides implementing the new method, this patch fixes bug 147911 (see changes in file templatedlglocalview.cxx) to showcase how set_item_help_id can be used. NOTE: Pressing F1 in context menus only work with "gen" and "win"... unfortunately it does not work in kf5 and gtk3 due to a separate bug (see bug 156376). Change-Id: Ic9bb1bca3e646cb4d0b879d8672c5dcc9c19c4c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154699 Tested-by: Jenkins Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'include')
-rw-r--r--include/vcl/weld.hxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 4c198b3ecc99..c03f78d6c0e1 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -2419,6 +2419,7 @@ public:
TriState eCheckRadioFalse)
= 0;
+ virtual void set_item_help_id(const OUString& rIdent, const OUString& rHelpId) = 0;
virtual void remove(const OUString& rId) = 0;
virtual void clear() = 0;