Thanks Roland, I’ll review your feedback and look a bit further. For the record, I’m trying to build this for the Qt environment and the source is v2.1.0rc0-615-gf38bd00 from master Thanks and regards…Paul From: wireshark-dev-bounces@xxxxxxxxxxxxx [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx]
On Behalf Of Roland Knall Hi I do not have anything standing in front of my callbacks, therefore I would remove WS_DLL_PUBLIC_DEF completely. It is not necessary in your case. Secondly, if you are using the latest git source of Wireshark or the 2.0 source, the correct prototype for the callback would be: void menu_cb(ext_menubar_gui_type gui_type, gpointer gui_data, gpointer user_data _U_) In which gui_type is defined as GTK or Qt to allow different callback handling for each interface (which is needed if you are opening a dialog window for example). My code for opening the Qt Dialog is as follows: void GuiHandler::executeDialog(QDialog * dialog) { bool hasGuiApp = (qobject_cast<QApplication*>(QCoreApplication::instance())!=0); if ( ! hasGuiApp ) { /* Necessity for creating the correct app context */ int argc = 1; char * argv = (char *) "Test"; /* In Gtk there is no application context, must be created and displayed */ QApplication app(argc, &argv); dialog->show(); app.exec(); } else { /* With Wireshark Qt, an application context already exists, therefore just * displaying the dialog */ dialog->exec(); } } hasGuiApp searches for an existing QApplication object, which may only be instated once for each process, and will already exist for WS 2.0, otherwise it creates a QApplication context and opens the dialog. If the application exists, it
simply executes the dialog. Hope this helps, regards, Roland On Fri, Nov 27, 2015 at 8:27 AM, Paul Offord <Paul.Offord@xxxxxxxxxxxx> wrote:
______________________________________________________________________ This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Advance Seven Ltd. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. Advance Seven Ltd. Registered in England & Wales numbered 2373877 at Endeavour House, Coopers End Lane, Stansted, Essex CM24 1SJ ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ |
- References:
- Re: [Wireshark-dev] plugin_if menu problems
- From: Paul Offord
- Re: [Wireshark-dev] plugin_if menu problems
- From: Roland Knall
- Re: [Wireshark-dev] plugin_if menu problems
- Prev by Date: Re: [Wireshark-dev] plugin_if menu problems
- Next by Date: Re: [Wireshark-dev] README.plugins regarding menus incorrect?
- Previous by thread: Re: [Wireshark-dev] plugin_if menu problems
- Next by thread: [Wireshark-dev] NSIS packaging not working
- Index(es):