Hi Roland,

There could be 2 aspects:

1. *Design decision*: as the old issue and merge request mentioned, it is
arguable to have or not to have tooltips in the Menu. Both have pros and
cons.
2. *Technical limitation*: yes, back in those days there could have been
some coding limitations across all the platforms which have not been
revisited/retested recently.

When I wrote the first e-mail, it was kind of related to aspect 1. I guess
if there were no requests and concerns for years about not having tooltips
then it seems it's not really something we need to consider. :) I still see
the point to have tooltips or at least to have a checkbox for it in the
Preferences to turn on/off tooltips.

When it comes to aspect 2, some tests can be done for sure. I have not done
any development or coding on MacOS and since this is a minor concern, it
might take a while before someone would test it.

As the way it is now, perhaps adding an additional sentence in the
README.plugin and mention that as a design decision tooltips are currently
not supported in the Main Menus except for URL links and in sub dialogs
such as Preferences.

ext_menubar_register_menu and ext_menubar_add_entry are easy to use in
general.
However, I do not see where there is a condition in extcap for these
functions. If there is any, I'd say the README.plugins should mention it.
I can only see LIBPCAP related condition for plugin_if_get_ws_info in
plugin_if.c .

Thank you.

Regards,
Tamas

On Thu, 5 Jun 2025 at 04:55, Roland Knall <rkn...@gmail.com> wrote:

> 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 <reg...@gmail.com>:
>
>> For example:
>>
>> *README.plugin*
>> 6.1 Implement a plugin GUI menu
>> The 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);
>>
>> https://www.wireshark.org/docs/wsar_html/plugin__if_8h_source.html
>>
>> https://www.wireshark.org/docs/wsar_html/plugin__if_8h.html
>> WS_DLL_PUBLIC void  *ext_menubar_add_entry* (ext_menu_t
>> <https://www.wireshark.org/docs/wsar_html/struct__ext__menubar__t.html> 
>> *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.cpp
>> void 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 <bubbas...@gmail.com> wrote:
>>
>>> > external plugins or uses Lua code, documentation for those mentions
>>> and supports tooltips
>>> Where in the documentation?
>>>
>>> On Tue, Jun 3, 2025 at 8:33 AM Tamás Regős <reg...@gmail.com> 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 <bubbas...@gmail.com> 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 <reg...@gmail.com> 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>&amp;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@wireshark.org
>>>>>> To unsubscribe send an email to wireshark-dev-le...@wireshark.org
>>>>>>
>>>>> _______________________________________________
>>>>> Wireshark-dev mailing list -- wireshark-dev@wireshark.org
>>>>> To unsubscribe send an email to wireshark-dev-le...@wireshark.org
>>>>>
>>>> _______________________________________________
>>>> Wireshark-dev mailing list -- wireshark-dev@wireshark.org
>>>> To unsubscribe send an email to wireshark-dev-le...@wireshark.org
>>>>
>>> _______________________________________________
>>> Wireshark-dev mailing list -- wireshark-dev@wireshark.org
>>> To unsubscribe send an email to wireshark-dev-le...@wireshark.org
>>>
>> _______________________________________________
>> Wireshark-dev mailing list -- wireshark-dev@wireshark.org
>> To unsubscribe send an email to wireshark-dev-le...@wireshark.org
>>
> _______________________________________________
> Wireshark-dev mailing list -- wireshark-dev@wireshark.org
> To unsubscribe send an email to wireshark-dev-le...@wireshark.org
>
_______________________________________________
Wireshark-dev mailing list -- wireshark-dev@wireshark.org
To unsubscribe send an email to wireshark-dev-le...@wireshark.org

Reply via email to