Commit Graph

42 Commits

Author SHA1 Message Date
Anders Broman e6e6d6217b From Tony Trinh:
Update Lua from 5.1 to 5.2

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7400

svn path=/trunk/; revision=43482
2012-06-25 20:42:07 +00:00
Guy Harris f272aaeb80 Only allow "Save" if
the file has unsaved changes, and we can save it in some format
	through Wiretap

or

	the file is a temporary file and has no unsaved changes (so that
	"saving" it just means copying it).

Only allow "Save As" if

	we can save it in some format through Wiretap

or

	the file is a temporary file and has no unsaved changes (so that
	"saving" it just means copying it).

This means that we don't support using "Save As" for just copying the
file unless we can do that with Wiretap; copying the file byte-for-byte
only works as "saving" if there are no unsaved changes *and* we're
saving it in the same format that it's in *and* we're saving it with the
same form of compression (if any) that it has.

Rename cf_can_save_as() to cf_can_write_with_wiretap() to better reflect
what it really does.

svn path=/trunk/; revision=43477
2012-06-25 18:37:52 +00:00
Jörg Mayer 1b1d6ff096 set_menu_visible needs to be protected to avoid defined but unused
warning turned error.

svn path=/trunk/; revision=43372
2012-06-19 15:53:22 +00:00
Anders Broman 5b64a10d18 Get rid of the remnats of NEW_MENU_CODE.
It's probably not a good idea to read the menu bar code from file as it causes problems with permissions when Wireshark is run fom build dir.

svn path=/trunk/; revision=43367
2012-06-19 14:49:12 +00:00
Anders Broman d2b78d48f2 The option to activate the Wireless toolbar should always be available, even if the toolbar is useless.
(As it was before as we compiled with HAVE_AIRPCAP 1 ).

svn path=/trunk/; revision=43356
2012-06-19 13:14:25 +00:00
Anders Broman 227eb36c83 Start to have an generic wireless toolbar. Sligtly modified patch from
Pontus Fuchs.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6973

svn path=/trunk/; revision=43354
2012-06-19 12:42:06 +00:00
Guy Harris 480e2c351b Move some code to manipulate the toolbar and capture interface dialog
out of main_menubar.c into routines in main.c.

Move some routines that are only used by main.c into
main_menubar_private.h.

svn path=/trunk/; revision=43298
2012-06-17 00:00:25 +00:00
Guy Harris 57cc5fa784 ui/gtk/main_proto_draw.c isn't just used for the main window, it's also
used for popped-up packet windows, and it includes more than just code
to draw the protocol tree - it includes the hex dump pane code as well. 
Rename it packet_panes.c; the stuff specific to the main window should
be moved into a different file.

svn path=/trunk/; revision=43290
2012-06-16 20:52:04 +00:00
Guy Harris 9a0ba17ea5 Re-enable the File -> Quit menu item when the capture stops (or is
started again).

svn path=/trunk/; revision=43251
2012-06-14 03:50:28 +00:00
Guy Harris e1ec927708 Disable some menu items and toolbar items while we're waiting for a
capture to stop, so that we don't try to quit while we're in the middle
of quitting or try to stop or restart the capture we're in the middle of
stopping.

svn path=/trunk/; revision=43250
2012-06-14 02:19:46 +00:00
Guy Harris eb03bb0290 Add some more routines to main.c that handle updates to "auto scroll in
live capture" and colorization, so that the ones in main_menubar.c don't
have to know about anything other than the main menubar.

Move some toolbar routines that should only be used by routines in
main.c into a main_toolbar_private.h header.

svn path=/trunk/; revision=43053
2012-06-04 03:15:05 +00:00
Guy Harris 9c44d87610 Have a main_update_for_unsaved_changes() routine that, if changes are
made to the capture file (adding/removing/editing comments, for now) or
if a capture file with unsaved changes are unsaved, updates the menu
bar, the toolbar, *and* the titlebar, which now has a GNOME-style "*" to
indicate unsaved changes.

Make set_menus_for_capture_file() a private interface between main.c and
main_menubar.c, and have its callers, such as
main_update_for_unsaved_changes(), be responsible for updating the
toolbar as well.

svn path=/trunk/; revision=43051
2012-06-04 02:24:42 +00:00
Guy Harris 6014035703 Use GTK+'s GtkMessageDialog for the questions we ask in the process of
saving files, and run it modal (which we're already doing with the
GtkFileChooserDialog); this means less callback-based state machine
stuff, simplifying the code paths a bit.

If we're saving a file before closing it, don't bother reloading it
after saving it.

svn path=/trunk/; revision=42855
2012-05-25 21:25:55 +00:00
Jeff Morriss b32c6c0658 menu_dissector_filter(): free the action_name when we're done with it.
capture_cb(): if we strrchr() didn't find a seperator, don't use
g_strdup_printf() to format the action_name (since that would have to be
freed), just set it to the action_name.

svn path=/trunk/; revision=42829
2012-05-24 18:26:52 +00:00
Guy Harris c2bb7956c2 "Save As" always saves everything and, when the save is done, makes the
new file the current file, as is the case in most if not all other GUI
applications.

A new "Export Specified Packets" menu option allows you to specify which
packets to write out, with the default being the displayed packets (and
those on which the displayed packets depend for, e.g.  reassembly), and
never makes the resulting file the current file.

The two operations are conceptually distinct.  Lumping them into one
menu item, with the default for "Save As" being "displayed packets only"
and thus making it behave like the latter operation, was causing some
confusion; see, for example, bug 6640.

Make the dialog popped up if you try to "Save As" or "Export Specified
Packets" on top of an existing file ask the "do you want to do this?"
question in the main part of the message, and note in the secondary text
that doing that will overwrite what's in the file; that matches what
TextEdit on OS X and the GNOME text editor say.

svn path=/trunk/; revision=42792
2012-05-22 22:17:57 +00:00
Guy Harris 1d41075db1 Replace the File -> Export menu with separate:
File -> Export Packet Dissections

	    (for the "print to file", "export as CSV", "export as C array",
	    "export as PSML", and "export as PDML" items)

	File-> Export Selected Packet Bytes

	File -> Export SSL Session Keys

	File -> Export Objects

	    (for exporting objects transferred over HTTP, DICOM, or SMB)

menu items.

The operations under Export really weren't that related - about all they
had in common was that they wrote to a file stuff other than packets
in a capture file format; the operations in the groups *under* Export
were related, so the groups are now menu items of their own.

This way, the File menu more immediately indicates what options of that
sort are available.

It also means that the Export Packet Dissections item might make it
clearer that what you get from that is *NOT* something that can just be
read back into Wireshark, as at least one user who asked "how do I get
my capture back from this?" on ask.wireshark.com thought.  If that
doesn't suffice, perhaps renaming it to "Export Dissected Packets" would
help; if *that* doesn't suffice, perhaps Kevin Cullimore's suggestion
that it say "Report" rather than "Export" will do the trick:

	From: Kevin Cullimore <kcullimo@runbox.com>
	Subject: [Wireshark-users] Re: Should the "export as text" item be in an "Export Human-readable..." item in the File menu?
	Date: May 19, 2012 8:31:23 PM PDT
	To: wireshark-users <wireshark-users@wireshark.org>

	Would classifying the asymmetric export (ones that lack a
	corresponding "import" action) formats as "reports" help clear
	up the original ambiguity/misunderstanding? It seems that most
	of the gui-based network tools I'm forced to periodically
	interact with rely upon that term with at least some success.

(Or perhaps some other verb would be right in some cases, e.g. "Save SSL
Session Keys".)

This also sets a pattern for another upcoming change - splitting "Save
As" into "Save As", which always saves every packet and makes the new
file the current file, and "{Verb} Specified Packets", which lets you
specify which packets to save and does *not* make the new file the
current file.  That'd simplify the code a bit, and might clear up the
new only-in-the-trunk issue in bug 6640 - having "Save As" default to
saving displayed packets currently means that it acts more like the
latter of those functions.

svn path=/trunk/; revision=42778
2012-05-22 11:44:55 +00:00
Guy Harris 4a9b825c49 Change the "user_saved" member of a capture_file structure to
"unsaved_changes", and have it be TRUE iff changes have been made to the
file since it was read - *not* if it's a temporary file from a live
capture.

Check the "is_tempfile" member, and the "unsaved_changes" member, when
appropriate.

Just have a set_toolbar_for_capture_file() routine that updates the
"save", "close", and "reload" toolbar as appropriate, given a
capture_file structure - absorb the function of
set_toolbar_for_unsaved_capture_file() into it.

svn path=/trunk/; revision=42721
2012-05-20 08:56:06 +00:00
Guy Harris 661afd4ba9 Consistently InterCapitalize StatusBar.
Separate "Toolbar" from the toolbar name in the View menu items.

Use "l", rather than "W", as the whatchamacallit for the wireless
toolbar - "W" is already used for "show packet in new window".

svn path=/trunk/; revision=42275
2012-04-26 18:02:04 +00:00
Guy Harris 99a66a0e77 While we're at it, add back the shortcuts, or whatever the heck the
Alt+{letter}+... things are called, for the Expand and Collapse items.

svn path=/trunk/; revision=42274
2012-04-26 17:36:39 +00:00
Anders Broman 47fdd93c3c Restore Accelerators for "Expand Subtree", "Expand All" and "Collapse All".
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7197

svn path=/trunk/; revision=42261
2012-04-26 15:17:01 +00:00
Anders Broman 03e3fdd79c Replace gtk_vbox_new() and gtk_hbox_new() with ws_gtk_box_new().
svn path=/trunk/; revision=42176
2012-04-21 16:40:14 +00:00
Guy Harris 70f67d065f From Evan Huus: fix a memory leak. Fixes bug 7097.
svn path=/trunk/; revision=42088
2012-04-15 22:21:50 +00:00
Anders Broman 653a1bb918 From Martin Kaiser: Fix for main_menubar.c:3874: error: set_menu_visible defined but not used
svn path=/trunk/; revision=41868
2012-03-31 09:22:07 +00:00
Jeff Morriss 48b1c7ae5c As I think Guy said a while back (quoting some HIG): anything you can do in a
popup should also be available through a regular menu.  So, make the
"Manually resolve address" function availble in under View->Name Resolution .
(Yes, technically this is an "Edit"-like action, but it just fits so well
under Name Resolution.)

While there, move "Resolve Name" from main_menu_bar_toggle_action_entries[]
into main_menu_bar_entries[] so it doesn't get a (useless) toggle indicator.
(At least as I understand this function, it's supposed to allow you to tell
Wireshark to go off and try to resolve the names in the current frame;
unfortunately it doesn't seem to actually work.)

svn path=/trunk/; revision=41747
2012-03-23 02:37:25 +00:00
Bill Meier 2df5dc3d53 From Reinhard Speyerer: Fix several misspellings/typos in Wireshark
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6967

svn path=/trunk/; revision=41645
2012-03-18 22:24:24 +00:00
Bill Meier a7041cacb0 From Bill Schiller: New dissector for the HART/IP protocol
I'm contributing a new dissector for the HART/IP protocol.  This
protocol is specified by the HART Conformance Foundation (HCF).  It is
a standard protocol used in the process control industry.  It
essential wraps the multip-drop serial HART packets in TCP or UDP
packets.  The standard has been approved by the HCF and has been
assigned UDP/TCP port 5094 by IANA.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6961
--This line, and those below,
will be ignored--

M    AUTHORS
M    epan/CMakeLists.txt
M    epan/dissectors/Makefile.common
AM   epan/dissectors/packet-hartip.c
M    ui/gtk/main_menubar.c

svn path=/trunk/; revision=41644
2012-03-18 19:51:39 +00:00
Jeff Morriss 80a7287360 Get the Lua menus working again: when adding UI menus, it appears that our
description of existing menus must be accurate: if a name and action are
both specified then the to-be-added-XML must include both the name and the
action.

It appears that the formats given in stat_group_name()'s value_string were
designed to take this into account, but there was no code to separate the menu
name from its action.  Adding that separation is complicated by the fact that
menus are separated by /'s and actions may also contain that character.  To
deal with that, "escape" the /'s in actions by replacing them with #'s.
make_menu_xml() then un-escapes them back into /'s.

There has to be an easier way to do all of this...

svn path=/trunk/; revision=41591
2012-03-16 02:36:32 +00:00
Jeff Morriss a2c94ef9bf Fix menu path typos: Stataistics->Statistics, LUA->Lua
svn path=/trunk/; revision=41588
2012-03-16 02:24:56 +00:00
Jeff Morriss 57f331b9ea Followup to r41415: don't enable *any* of the file operations during a live
capture.

svn path=/trunk/; revision=41416
2012-03-08 02:33:14 +00:00
Jeff Morriss 2f33dbb8f4 As reported by Joerg on -dev: don't enable File->Save if we're still reading
the file (as is the case during a live capture).

Replace tabs with spaces (for consistency with the rest of the file).

svn path=/trunk/; revision=41415
2012-03-08 02:18:12 +00:00
Guy Harris 96b89de3e9 Capitalize the "P" in "Packet" in "Add or Edit Packet Comment". Add
"..." after it, as it pops up a dialog box to let you actually type in a
comment.

Add "Add or Edit Packet Comment" to the menubar's Edit menu.

svn path=/trunk/; revision=41005
2012-02-12 23:09:14 +00:00
Anders Broman f78145ca9f Add the edit packet comment menu entry and the empty files
to actually handel the menu to edit the comments.

svn path=/trunk/; revision=40980
2012-02-12 14:56:06 +00:00
Anders Broman b7c03d8235 From a.piesk:
no menu item Fle->Export->SSL Session Keys in GTK
Ported to 1.7 by me.

#BACKPORT
Use the patch in the bug report.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6813

svn path=/trunk/; revision=40937
2012-02-08 19:56:48 +00:00
Stig Bjørlykke dcc82dd2bf Disable the File->Merge... menu item if we cannot save-as,
because this will assert.

svn path=/trunk/; revision=40927
2012-02-08 11:16:30 +00:00
Alexis La Goutte 34813d66aa Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=40890
2012-02-06 22:02:36 +00:00
Ronnie Sahlberg 8537bfbce8 SMB response time stats dissapeared a while ago.
This adds it back.


svn path=/trunk/; revision=40874
2012-02-06 09:39:00 +00:00
Stig Bjørlykke d86b90ce04 Disable the save-as button in the toolbar if we cannot save-as,
because this will assert.

svn path=/trunk/; revision=40769
2012-01-30 13:05:27 +00:00
Anders Broman 008dd26ff5 Remove a debug statement.
svn path=/trunk/; revision=40668
2012-01-23 19:48:05 +00:00
Anders Broman dcf10c7c10 Not working Conversation Filter in (analyse menu)
(Fix the path to the fileter menu.)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6751

svn path=/trunk/; revision=40661
2012-01-23 17:55:52 +00:00
Guy Harris dacb4133e8 Restructure the recent file code so that recent.c is GUI-independent;
move it to the top-level source directory for now, and move
ui/gtk/recent.h to the ui directory.

svn path=/trunk/; revision=40561
2012-01-18 19:38:34 +00:00
Guy Harris d7b2aad043 Move some headers for UI stuff, and the alert_box.c UI-specific file, to
the ui directory.  (Perhaps some other files that would be used by all
flavors of Wireshark, for any GUI toolkit or for someting such as
ncurses, and not for any command-line tool such as TShark, should be
moved there as well.)

Shuffle some #includes to put the "ui/XXX.h" includes together.

svn path=/trunk/; revision=40529
2012-01-16 01:07:52 +00:00
Jörg Mayer be706c6380 Move gtk to ui/gtk.
This looses the last checkin to gtk, will add this manually back.

svn path=/trunk/; revision=40518
2012-01-15 21:59:11 +00:00