Commit Graph

58 Commits

Author SHA1 Message Date
Martin Mathieson 43f09e67b4 Remove unneeded includes from ui folder
Change-Id: Ifd1eebff9080cd3867e44e4dcb2d2681370ed60a
Reviewed-on: https://code.wireshark.org/review/6128
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-01-01 23:11:10 +00:00
Guy Harris a3f7d1951d Get rid of #if 0'ed out includes of capture-pcap-util.h.
Change-Id: Ie3678a08ed9b3d46b22e7c59eef74e6e9636ae59
Reviewed-on: https://code.wireshark.org/review/3140
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-20 22:14:26 +00:00
Guy Harris 9e6487f247 Move utility routines for capturing into a libcaputils static library.
Some of those routines are used only in dumpcap; others are used in
TShark and Wireshark as well.

Change-Id: I9d92483f2fcff57a7d8b6bf6bdf2870505d19fb7
Reviewed-on: https://code.wireshark.org/review/2841
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-04 07:25:26 +00:00
Guy Harris ad1391aa4e Move capture.[ch] to libui.
Change-Id: I86e7e781cc9e14abab0374a18b95438529b046f0
Reviewed-on: https://code.wireshark.org/review/2711
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-30 05:38:57 +00:00
Guy Harris c46329c27b Add a routine to return a version string including VCS information.
Add a routine get_ws_vcs_version_info() that, for builds from a tree
checked out from Wireshark's version control system, returns a string
that includes both the Wireshark version number and an indication of
what particular VCS version was checked out, and just returns
Wireshark's version number for other builds.

Use that routine rather than manually gluing VERSION and the Git version
number together.

("vcs", not "git", just in case we do something bizarre or mercurial
some day. :-))

Change-Id: Ie5c6dc83b9d3f56655eaef30fec3ec9916b6320d
Reviewed-on: https://code.wireshark.org/review/2529
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-22 01:06:25 +00:00
Jeff Morriss a32dbae525 Don't crash when closing the Summary window if the file has been closed.
Yes, this is a Gtk-UI fix but it's a one-liner and easy enough.
Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8715

Bug: 8715
Change-Id: I554b6c953e83ff3d8cb57029e844f2f481b751dd
Reviewed-on: https://code.wireshark.org/review/2460
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-06-19 21:47:04 +00:00
Jan Kaisrlik 2aebb94aa6 fix of bug 9836. Avg. packet size in Statistics -> Summary is rounded to nearest. GTK QT
Change-Id: I34e84e6cf4587fee999764435fa1a407c8aa04bb
Reviewed-on: https://code.wireshark.org/review/687
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-03-19 17:08:32 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04 14:27:33 +00:00
Gerald Combs f966980937 Replace "svn" with "git" all over the place.
Rename "SVNPATH" to "GITBRANCH" since that seems more appropriate.
Rename "svnversion.h" to "version.h" as Evan suggested. Update some
URLs. In make-version.pl, make sure we don't set an improper upstream
branch name. Use the number of commits + short hash from `git describe`
for package names by default.

Change-Id: I922bba8d83eabdf49284a119f55b4076bc469b96
Reviewed-on: https://code.wireshark.org/review/139
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-02-07 23:03:03 +00:00
Alexis La Goutte c6022b3b85 Drop support of Visual Studio 2005
* Remove _MSC_VER < 1500 check
* Cleanup config.nmake

See http://www.wireshark.org/lists/wireshark-dev/201305/msg00159.html

svn path=/trunk/; revision=54965
2014-01-26 12:56:32 +00:00
Jeff Morriss f56aa72157 Don't do our own line wrapping of the display filter, let GTK do it for us.
(With this change all the right-hand columns in this dialog will wrap if
necessary whereas before only the display filter would wrap lines.)

svn path=/trunk/; revision=53282
2013-11-12 20:47:03 +00:00
Guy Harris 853da2eb9b The "file types" we have are actually combinations of types and
subtypes, e.g. Network Monitor version 1 and Network Monitor version 2
are separate "file types", even though they both come from Network
Monitor.

Rename various functions, #defines, and variables appropriately.

svn path=/trunk/; revision=53166
2013-11-08 09:53:01 +00:00
Stig Bjørlykke aadc33fbab Do not use overlapping memory in g_snprintf.
Use consistent spacing between title and value.

svn path=/trunk/; revision=51181
2013-08-07 10:02:03 +00:00
Guy Harris f32a839bb0 Handle the case of there being no comment view.
svn path=/trunk/; revision=48708
2013-04-02 20:19:54 +00:00
Guy Harris 019cc8fbd2 Show the comment area only if we could write out the comments were the
user to enter any.

svn path=/trunk/; revision=48707
2013-04-02 20:01:10 +00:00
Bill Meier 8112ecc321 From beroset:
remove C++ incompatibilities
 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 attachment #10404

Note: The following parts of the patch had been previously done:
 asn1/snmp/packet-snmp-template.c
 epan/dissectors/packet-snmp.c
 epan/dissectors/packet-x11.c

Also; hostlist_table.c: code under '#ifdef HAVE_GEOIP'
 didn't compile and needed a few additional patches.


svn path=/trunk/; revision=48447
2013-03-21 02:29:09 +00:00
Bill Meier 1fb0ac3983 Fir Gtk 3.8 & newer: gtk_scrolled_window_add_with_viewport() ==> gtk_container_add().
svn path=/trunk/; revision=48065
2013-03-04 19:20:39 +00:00
Bill Meier aed95072b4 Replace gtk_table...() with ws_gtk_grid...();
Also; do some whitespace cleanuyp.

svn path=/trunk/; revision=47118
2013-01-16 17:09:22 +00:00
Pascal Quantin deb4f08cb2 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8105 :
Allow use of huges values for localtime / ctime / gmtime with MSVC 2008 or later

svn path=/trunk/; revision=46930
2013-01-04 14:56:27 +00:00
Bill Meier 22447e47e7 Add a vertical scrollbar to the summary dialog window.
(The window has gotten pretty tall;
 Creating a multiline 'Capture File Comments'" entry
 may make the buttons inaccessible w/o a scrollbar).

##backport 1.8

svn path=/trunk/; revision=46844
2012-12-29 19:07:48 +00:00
Anders Broman fe7a2570db Move summary related stuff to summary_dlg
svn path=/trunk/; revision=46782
2012-12-26 12:29:43 +00:00
Pascal Quantin 0594b41113 Add missing newline at end of file
svn path=/trunk/; revision=46284
2012-11-29 14:57:06 +00:00
Anders Broman 20abe45694 Add more information about the capture.
svn path=/trunk/; revision=46224
2012-11-27 16:46:00 +00:00
Anders Broman 18d5f2dbfc Start including info from Statistics/Summary.
svn path=/trunk/; revision=46219
2012-11-27 13:35:33 +00:00
Martin Kaiser 0836b3b16b update the capture comment icon in the statusbar
when a capture comment was edited via Statistics/Summary

svn path=/trunk/; revision=45238
2012-10-01 19:11:14 +00:00
Chris Maynard 296d2900a1 Add displayed and marked percent columns and percent calculations for dropped and ignored packets in summary dialog. Also display percent calculations for displayed, marked, ignored and dropped packets in statusbar. Like ignored packets, only display marked packet count and percent in the statusbar if there are any.
Fixes enhancement bug: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2377

svn path=/trunk/; revision=45226
2012-09-30 18:28:04 +00:00
Jeff Morriss 3729335973 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45016
2012-09-20 01:48:30 +00:00
Gerald Combs a234d1215c Move capture_globals.h from ui/gtk/ to ui/. Show interface activity
using sparklines in the qtshark main window.

svn path=/trunk/; revision=44253
2012-08-03 23:30:47 +00:00
Jakub Zawadzki 73b0691fd8 gtk_container_add() -> gtk_box_pack_start() [bug #7377]
svn path=/trunk/; revision=43874
2012-07-20 21:35:45 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Guy Harris d1128f6433 For a capture file, keep an array of all encapsulation types seen.
Show all of them in the summary dialog; we will be using it in the
future to figure out what capture file formats we can write to (just
because a capture file format supports per-packet encapsulations, that
doesn't mean that it supports *all possible* encapsulations).

svn path=/trunk/; revision=43278
2012-06-15 23:54:05 +00:00
Guy Harris 2d4bd31654 We need main.h for main_update_for_unsaved_changes(), regardless of
whether we have pcap or not.

svn path=/trunk/; revision=43052
2012-06-04 03:09:54 +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 53375198ec Don't use pcap LINKTYPE_ values in the iface_options structure, use
Wiretap encapsulation values; rename the field in question encap_type to
emphasize that.  (Code that looks at that field already assumes it's a
Wiretap encapsulation value.)

For live captures, map the LINKTYPE_ value to a Wiretap encapsulation
value.

wtap_encap_string() never returns NULL, so don't check for a null return
value.

svn path=/trunk/; revision=42871
2012-05-28 00:31:27 +00:00
Jeff Morriss 373e0925f3 Enable word wrapping for capture-file comments.
svn path=/trunk/; revision=42835
2012-05-24 21:35:41 +00:00
Jeff Morriss 9ea08d6b12 Get rid of the button row for the capture-file comments. Instead, turn the
whole summary dialog into an editor-like dialog with an OK and Cancel buttons
(OK sets the new capture file comment, Cancel doesn't).

In order to keep the dialog the same regardless of the file type (and avoid
having a Cancel and OK button when there's no text field to edit), allow
users to create or edit capture-file comments even if the file type is not
PCAPNG (they can add a comment via the add/edit comment UI anyway).

Don't include a Clear button: the user can just Ctrl-A + backspace if they
want to do that.

Don't set the comment text to "[None]" if there's no comment, just leave it
blank.

Don't allow the user to create more than 1 Summary dialog at a time.

svn path=/trunk/; revision=42834
2012-05-24 21:33:25 +00:00
Jeff Morriss a4bbd97979 Use cf_update_capture_comment() to save the capture comment (instead of
summary_update_comment() which is no longer necessary).
cf_update_capture_comment() has the advantage that it doesn't mark the file
as unsaved unless the comment actually changed.

svn path=/trunk/; revision=42832
2012-05-24 18:59:39 +00:00
Jeff Morriss 474281be2a Free the new comment after calling gtk_text_buffer_set_text().
svn path=/trunk/; revision=42831
2012-05-24 18:55:38 +00:00
Jeff Morriss 56199c1328 Also allow the user to edit the capture-file comment if there is one (not
only if the capture file format is PCAPNG).  This can happen if the user
does not have a PCAPNG file but has added a capture-file comment via the
add/edit capture file comment UI.

Replace some tabs with spaces and wrap a few long lines.

svn path=/trunk/; revision=42827
2012-05-24 15:16:18 +00:00
Guy Harris cf6d9841e3 Keep track, in Wiretap, of whether the file is compressed, and provide
an API to fetch that.

When doing "Save" on a compressed file, write it out compressed.

In the Statistics -> Summary dialog and in capinfos, report whether the
file is gzip-compressed.

svn path=/trunk/; revision=42818
2012-05-24 05:05:29 +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
Bill Meier a703450659 AFAICT '#include sys/types.h' is not needed for these files.
svn path=/trunk/; revision=42443
2012-05-05 20:51:14 +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
Jakub Zawadzki 68ec58d385 Fix some: 'cast discards qualifiers from pointer target type' warnings
- Add const qualifier
- Remove some strange casts

svn path=/trunk/; revision=42131
2012-04-18 12:35:36 +00:00
Jakub Zawadzki 8fca2eb7e5 Add missing consts.
svn path=/trunk/; revision=42004
2012-04-10 10:20:20 +00:00
Guy Harris 541dab39eb Replace inconsistent tabs with spaces.
svn path=/trunk/; revision=41456
2012-03-10 09:01:48 +00:00
Anders Broman 376dde9371 summary_dlg.c:419: error: 'dl_description' undeclared (first use in this function)
svn path=/trunk/; revision=41424
2012-03-08 08:07:21 +00:00
Anders Broman 839b3e7481 Put a frame around capture comments, don't depend on LIBPCAP to print dl_description or capture filter info
svn path=/trunk/; revision=41422
2012-03-08 07:28:26 +00:00
Anders Broman 368ba24bef Use an OK button rather than save for consistency, wouldapply be more apropriate?
svn path=/trunk/; revision=41421
2012-03-08 06:59:38 +00:00
Jeff Morriss 7f96e88fc0 Set File->Save sensitivity after file or packet comments are changed.
svn path=/trunk/; revision=41409
2012-03-07 22:19:06 +00:00