diff options
author | Rafael Lima <rafael.palma.lima@gmail.com> | 2023-07-21 14:47:47 +0200 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-07-23 15:07:11 +0200 |
commit | 65c91bd5aa6f9b68390739a0e027d23c8a32da08 (patch) | |
tree | 4c39eb8f25cc390a575e1f1f95a55f362a0afc91 /vcl/inc/salvtables.hxx | |
parent | d28ba797dfb804e020e1cd8be5505f31b2adb74a (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 'vcl/inc/salvtables.hxx')
-rw-r--r-- | vcl/inc/salvtables.hxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx index 04a42c3a8929..4264de0cea6d 100644 --- a/vcl/inc/salvtables.hxx +++ b/vcl/inc/salvtables.hxx @@ -169,6 +169,7 @@ public: const css::uno::Reference<css::graphic::XGraphic>& rImage, TriState eCheckRadioFalse) override; virtual void insert_separator(int pos, const OUString& rId) override; + virtual void set_item_help_id(const OUString& rIdent, const OUString& rHelpId) override; virtual void remove(const OUString& rId) override; virtual OUString get_id(int pos) const override; virtual int n_children() const override; |