Bug ID |
11819
|
Summary |
Incorrect information in README.plugins Section 6
|
Product |
Wireshark
|
Version |
Git
|
Hardware |
x86
|
OS |
Windows 7
|
Status |
UNCONFIRMED
|
Severity |
Minor
|
Priority |
Low
|
Component |
Documentation
|
Assignee |
[email protected]
|
Reporter |
[email protected]
|
Build Information:
Version 2.1.0-TmSyncro (v2.1.0rc0-844-g6952c1c from master)
Copyright 1998-2015 Gerald Combs <[email protected]> and contributors.
License GPLv2+: GNU GPL version 2 or later
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Compiled (64-bit) with Qt 5.5.1, with WinPcap (4_1_3), with libz 1.2.8, with
GLib 2.42.0, with SMI 0.4.8, with c-ares 1.9.1, with Lua 5.2, with GnuTLS
3.2.15, with Gcrypt 1.6.2, with MIT Kerberos, with GeoIP, with QtMultimedia,
with AirPcap.
Running on 64-bit Windows 7 Service Pack 1, build 7601, with locale C, with
WinPcap version 4.1.3 (packet.dll version 4.1.0.2980), based on libpcap version
1.0 branch 1_0_rel0b (20091008), with GnuTLS 3.2.15, with Gcrypt 1.6.2, with
AirPcap 4.1.0 build 1622.
Intel(R) Core(TM) i5-5300U CPU @ 2.30GHz (with SSE4.2), with 8082MB of physical
memory.
Built using Microsoft Visual C++ 12.0 build 31101
--
The notes in section 6 of README.plugins show examples of menu entries. An
example is:
ext_menubar_add_entry(ext_menu, "TestEntry2", "Test Entry 2",
NULL, menu_cb, <user_data>);
But using this example causes an IntelliSense error in VS indicating there are
too many parameters. The extern definition in plugin_if.h is:
WS_DLL_PUBLIC void ext_menubar_add_entry( ext_menu_t * parent_menu,
const gchar *label, const gchar *tooltip, ext_menubar_action_cb callback,
gpointer user_data);
The example indicates a label and a unique name are needed, but the definition
shows just a label. Looking at the code it seems that the name is now
generated in ext_menubar_add_generic_entry like this:
/* Create unique name, which is used by GTK to provide the menu */
entry->name = g_strdup_printf("%sI%02d", parent->name, parent->item_cnt);
Eliminating the unique name from the parameter list stops the error and
produces code that seems to work fine.
You are receiving this mail because:
- You are watching all bug changes.