forked from osmocom/wireshark
Add comments and reorder Lua example
Change-Id: Iabffbd43645914c92a98f45065ce3baee35d062f Reviewed-on: https://code.wireshark.org/review/33825 Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
09e3c4f693
commit
f27c30c2a8
|
@ -51,12 +51,8 @@ and then opens a text window with the output.
|
|||
|
||||
[source,lua]
|
||||
----
|
||||
if gui_enabled() then
|
||||
local splash = TextWindow.new("Hello!");
|
||||
splash:set("This time wireshark has been enhanced with a useless feature.\n")
|
||||
splash:append("Go to 'Tools->Lua Dialog Test' and check it out!")
|
||||
end
|
||||
|
||||
-- Define the menu entry's callback
|
||||
local function dialog_menu()
|
||||
local function dialog_func(person,eyes,hair)
|
||||
local window = TextWindow.new("Person Info");
|
||||
|
@ -67,7 +63,16 @@ local function dialog_menu()
|
|||
new_dialog("Dialog Test",dialog_func,"A Person","Eyes","Hair")
|
||||
end
|
||||
|
||||
-- Create the menu entry
|
||||
register_menu("Lua Dialog Test",dialog_menu,MENU_TOOLS_UNSORTED)
|
||||
|
||||
-- Notify the user that the menu was created
|
||||
if gui_enabled() then
|
||||
local splash = TextWindow.new("Hello!");
|
||||
splash:set("Wireshark has been enhanced with a useless feature.\n")
|
||||
splash:append("Go to 'Tools->Lua Dialog Test' and check it out!")
|
||||
end
|
||||
|
||||
----
|
||||
|
||||
[[wslua_dissector_example]]
|
||||
|
|
Loading…
Reference in New Issue