Wireshark-dev: [Wireshark-dev] Re: Tooltips in the Menu
From: Roland Knall <rknall@xxxxxxxxx>
Date: Wed, 4 Jun 2025 23:54:24 +0200
As the person who wrote that part of the doc, may I way in here.
The reason they are missing was that back in the day when I added them, it led to issues with Mac. And it might still do, have no idea if or not.
Btw, the ext_menubar_items are menubar items that have to be populated via an extcap capture interface. They are not regular entries
any further questions, feel free to ask
cheers
Roland
Am Mi., 4. Juni 2025 um 16:33 Uhr schrieb Tamás Regős <regost@xxxxxxxxx>:
_______________________________________________For example:README.plugin6.1 Implement a plugin GUI menuThe menu entries themselves are generated with the following code structure:
ext_menu_t * ext_menu, *os_menu = NULL;
ext_menu = ext_menubar_register_menu (
<your_proto_item>, "Some Menu Entry", true );
ext_menubar_add_entry(ext_menu, "Test Entry 1",
"This is a tooltip", menu_cb, <user_data>);plugin_if.h/* Registers a new menubar entry.
*
* This registers a new menubar entry, which will have the given name, and
* call the provided callback on activation
*
* @param parent_menu the parent menu for this entry
* @param name the entry name (the internal used one) for the menu item
* @param label the entry label (the displayed name) for the menu item
* @param tooltip a tooltip to be displayed on mouse-over
* @param callback the action which will be invoked after click on the menu item
*/
WS_DLL_PUBLIC void ext_menubar_add_entry(
ext_menu_t * parent_menu,
const char *label,
const char *tooltip,
ext_menubar_action_cb callback,
void *user_data);
WS_DLL_PUBLIC void ext_menubar_add_entry (ext_menu_t *parent_menu, const char *label, const char *tooltip, ext_menubar_action_cb callback, void *user_data) Beside of this, it seems there is one line of code also missing, to set the toolTip of the related QAction()...wireshark_main_window.cppvoid WiresharkMainWindow::externalMenuHelper(ext_menu_t * menu, QMenu * subMenu, int depth)...} else if (item->type == EXT_MENUBAR_ITEM || item->type == EXT_MENUBAR_URL) {
itemAction = subMenu->addAction(item->name);
itemAction->setData(QVariant::fromValue(static_cast<void *>(item)));
itemAction->setText(item->label);
itemAction->setToolTip(item->tooltip); /* this line is missing */
connect(itemAction, &QAction::triggered, this, &WiresharkMainWindow::externalMenuItemTriggered);
}On Wed, 4 Jun 2025 at 18:51, chuck c <bubbasnmp@xxxxxxxxx> wrote:> external plugins or uses Lua code, documentation for those mentions and supports tooltipsWhere in the documentation?_______________________________________________On Tue, Jun 3, 2025 at 8:33 AM Tamás Regős <regost@xxxxxxxxx> wrote:I was trying to Google it but I was not able to find. :)Thanks for those links, seems to be quite old but I guess the overall mindset has not changed then.Just for curiosity, I tested it with setToolTipsVisible(true) in cpp code and it worked on Windows.The reason I was checking this is that if someone develops external plugins or uses Lua code, documentation for those mentions and supports tooltips but it never ends up working obviously. So it's confusing a bit.Not sure if it's worth raising a follow up issue on Gitlab?Could there be a new preference option added to turn it on/off?_______________________________________________On Tue, 3 Jun 2025 at 19:46, chuck c <bubbasnmp@xxxxxxxxx> wrote:https://gitlab.com/wireshark/wireshark/-/issues/16590 (Tooltips on menus don't work)https://gitlab.com/wireshark/wireshark/-/merge_requests/6221 (Tooltips for menu items that open browser windows)_______________________________________________On Tue, Jun 3, 2025 at 6:22 AM Tamás Regős <regost@xxxxxxxxx> wrote:Dear Developers,_______________________________________________Does anyone know why the toolTips for the Menu items are not enabled?Is this deliberate or a bug?It's only enabled for 'Help' in the ui file:<widget class="QMenu" name="menuHelp">
<property name="title">
<string>&Help</string>
</property>
<property name="toolTipsVisible">
<bool>true</bool>
</property>toolTipsVisible : bool
This property holds whether tooltips of menu actions should be visible
This property specifies whether action menu entries show their tooltip.
By default, this property is false.Thank you.Regards,Tamas
Wireshark-dev mailing list -- wireshark-dev@xxxxxxxxxxxxx
To unsubscribe send an email to wireshark-dev-leave@xxxxxxxxxxxxx
Wireshark-dev mailing list -- wireshark-dev@xxxxxxxxxxxxx
To unsubscribe send an email to wireshark-dev-leave@xxxxxxxxxxxxx
Wireshark-dev mailing list -- wireshark-dev@xxxxxxxxxxxxx
To unsubscribe send an email to wireshark-dev-leave@xxxxxxxxxxxxx
Wireshark-dev mailing list -- wireshark-dev@xxxxxxxxxxxxx
To unsubscribe send an email to wireshark-dev-leave@xxxxxxxxxxxxx
Wireshark-dev mailing list -- wireshark-dev@xxxxxxxxxxxxx
To unsubscribe send an email to wireshark-dev-leave@xxxxxxxxxxxxx
- Follow-Ups:
- [Wireshark-dev] Re: Tooltips in the Menu
- From: Tamás Regős
- [Wireshark-dev] Re: Tooltips in the Menu
- References:
- [Wireshark-dev] Tooltips in the Menu
- From: Tamás Regős
- [Wireshark-dev] Re: Tooltips in the Menu
- From: chuck c
- [Wireshark-dev] Re: Tooltips in the Menu
- From: Tamás Regős
- [Wireshark-dev] Re: Tooltips in the Menu
- From: chuck c
- [Wireshark-dev] Re: Tooltips in the Menu
- From: Tamás Regős
- [Wireshark-dev] Tooltips in the Menu
- Prev by Date: [Wireshark-dev] Re: Tooltips in the Menu
- Next by Date: [Wireshark-dev] Wireshark 4.4.7 is now available
- Previous by thread: [Wireshark-dev] Re: Tooltips in the Menu
- Next by thread: [Wireshark-dev] Re: Tooltips in the Menu
- Index(es):