Commit graph

84 commits

Author SHA1 Message Date
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
5662419a06 Remove leftover "//".
svn path=/trunk/; revision=48242
2013-03-11 16:28:11 +00:00
Bill Meier
ed9c682383 From the proposed patch by Peter Hatina in Bug #8315.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8315


svn path=/trunk/; revision=48241
2013-03-11 16:18:41 +00:00
Anders Broman
5147d6cffa Use explicit casts.
svn path=/trunk/; revision=48187
2013-03-08 07:09:39 +00:00
Chris Maynard
e9907716a2 With Jim Young's suggestion, revert r43785. Currently the file->open dialog contains a *Read* filter field, not a display filter, so after the packets matching the read filter are loaded, there is no actual display filter applied. This resolves https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8344
svn path=/trunk/; revision=48046
2013-03-04 06:49:01 +00:00
Bill Meier
d649184e55 Fix indentation to match editor modelines.
svn path=/trunk/; revision=47009
2013-01-10 03:35:16 +00:00
Bill Meier
07651cf836 Fixes:
1. 'File ! Open' changes applied to the 'File ! Merge' window;
2. Small change made so that the GTk2 & Gtk3 behavior are the same (Finally !)
3. window structure picture and notes updated.

svn path=/trunk/; revision=47008
2013-01-10 02:51:36 +00:00
Bill Meier
3c022129bc Add a picture and some notes about the capture_file-dialog window.
svn path=/trunk/; revision=47007
2013-01-09 22:03:40 +00:00
Bill Meier
513e5eb177 Use ws_gtk_grid...() in place of gtk_table...().
The Gtk2 vs Gtk3 behavior is not precisely the same
when resizing the window hozizontally; IMO it's
"good enough" (after several days of playing around
trying to make the behaviour identical).



svn path=/trunk/; revision=47004
2013-01-09 21:04:44 +00:00
Gerald Combs
896eeaf187 The Wireshark file icon makes more sense than a floppy disk[1]. Switch
back to it and name it "Save" instead of "File".

  [1] http://www.hanselman.com/blog/TheFloppyDiskMeansSaveAnd14OtherOldPeopleIconsThatDontMakeSenseAnymore.aspx

svn path=/trunk/; revision=46696
2012-12-22 17:41:40 +00:00
Gerald Combs
0adca98fb7 R46374 replaced too many GTK_STOCK_SAVEs. Put them back.
svn path=/trunk/; revision=46690
2012-12-22 05:21:46 +00:00
Gerald Combs
c0c7a64d71 Replace GTK_STOCK_SAVE with WIRESHARK_STOCK_FILE in a few places,
including the GTK+ and Qt main toolbars.

svn path=/trunk/; revision=46374
2012-12-04 18:00:50 +00:00
Gerald Combs
71ed773862 Add a capture_file * element to packet_range_t and pass it explicitly in
packet_range_init(). Get rid of global cfile references in
packet-range.c. C++-ize packet-range.h. Shuffle some includes around.

svn path=/trunk/; revision=45333
2012-10-05 18:52:42 +00:00
Gerald Combs
bcd2cea774 Unify the GTK+ and Win32 versions of "Export Specified Packets". Add a
shared "file_add_extension" routine. We no longer support _MSC_VER <
1400 so get rid of some clutter. Add a gzip checkbox to the Win32 export
packets dialog. Windows code hasn't yet been tested (and is likely
broken). I'll fix it shortly.

svn path=/trunk/; revision=45296
2012-10-03 19:24:14 +00:00
Gerald Combs
068815cc67 Implement "Save" and "Save As".
svn path=/trunk/; revision=45156
2012-09-26 19:52:53 +00:00
Martin Kaiser
82654a12f0 fix compilation on linux
ui/gtk/capture_file_dlg.c needs ui/file_dialog.h

svn path=/trunk/; revision=45107
2012-09-24 18:59:44 +00:00
Gerald Combs
e9d4c115b5 Fix compilation on Windows.
svn path=/trunk/; revision=45106
2012-09-24 17:44:11 +00:00
Gerald Combs
25eab1c383 Unify some of the GTK+ and Win32 "Save As" code and behavior. This will
likely break compilation on Windows. I'll take care of it shortly.

svn path=/trunk/; revision=45105
2012-09-24 17:04:50 +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
3e05236eff Add gzip support to the Win32 "Save As" dialog. Don't crash in the Win32
merge dialog if we cancel. Adjust the size and location of the controls
in the Win32 open and merge file templates.

svn path=/trunk/; revision=45014
2012-09-19 23:06:39 +00:00
Gerald Combs
38b0e99c4d Fix breakage from r44859.
svn path=/trunk/; revision=44862
2012-09-10 21:55:55 +00:00
Gerald Combs
f764eabb67 Combine some of the the Windows and non-Windows merge code and make it
behave the same on each platform. This might break the non-Windows builds.
I'll test & fix any problems shortly.

svn path=/trunk/; revision=44859
2012-09-10 21:27:49 +00:00
Gerald Combs
4333dd03f4 Don't use a variable after we've freed it.
svn path=/trunk/; revision=44796
2012-09-06 22:39:42 +00:00
Jörg Mayer
12a0aa4849 - Replace packet_list_recreate_visible_rows -> packet_list_recreate_visible_rows_list
- Replace new_packet_list_ -> packet_list_


svn path=/trunk/; revision=44765
2012-09-04 02:35:25 +00:00
Jörg Mayer
380fe63a6d Rename new_packet_list.[ch] to packet_list.[ch]
svn path=/trunk/; revision=44764
2012-09-04 01:57:36 +00:00
Evan Huus
15ef40176c Split test_file_close out of do_file_close and use it in file_open_cmd_cb.
Means we don't end up closing the current file if the user decides not
to open a new file after all.

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

svn path=/trunk/; revision=44589
2012-08-19 21:24:02 +00:00
Gerald Combs
75564d57c1 Remove the filename from the GTK+ open file preview.
svn path=/trunk/; revision=43878
2012-07-21 01:18:57 +00:00
Anders Broman
aa1dd4546d Shoul be gtk_box_pack_start(GTK_BOX (vbox), message_type_fr, TRUE, TRUE, 0);
svn path=/trunk/; revision=43828
2012-07-19 14:02:47 +00:00
Anders Broman
d3ecc1431f gtk_container_add() -> gtk_box_pack_start().
svn path=/trunk/; revision=43825
2012-07-19 13:06:04 +00:00
Gerald Combs
e1bf3c011e Fill in our display filter after we open a file.
svn path=/trunk/; revision=43785
2012-07-18 15:29:13 +00:00
Guy Harris
3074044f77 Set the folder to the containing directory of the file name in question,
not to the file itself (the file itself will be a plain file, so that
will fail).

svn path=/trunk/; revision=43776
2012-07-17 21:44:41 +00:00
Gerald Combs
0f0b5efcc1 Pass the correct widget to gtk_open_file. If we're filling in a display
filter make sure we check its syntax. Return a boolean.  --This line,
and those below, will be ignored--

M    ui/gtk/capture_file_dlg.c

svn path=/trunk/; revision=43757
2012-07-16 21:01:16 +00:00
Gerald Combs
281e18d636 Move most of file_open_cmd to gtk_open_file. Make gtk_open_file
and win32_open_file behave similarly. _snwprintf is "banned". Use
StringCchPrintf instead. Tested on Windows. I'll test on OS X shortly.

svn path=/trunk/; revision=43756
2012-07-16 20:46:13 +00:00
Anders Broman
81531a65dd Change the button order in all places.
svn path=/trunk/; revision=43639
2012-07-10 07:50:34 +00:00
Anders Broman
0696f30690 From Michael Mann:
GUI use external name resolver proliferation

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

svn path=/trunk/; revision=43615
2012-07-09 01:36:54 +00:00
Pascal Quantin
7e38fe433a Fix compilation with gcc 4.3.2 and without GEOIP
svn path=/trunk/; revision=43587
2012-07-06 12:25:54 +00:00
Anders Broman
c19583b72c From Michael Mann:
Generic preferences implementation - Printing and Name Resolution.

svn path=/trunk/; revision=43579
2012-07-06 04:48:36 +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
c96179ed1e In the "Save As" dialog box, default to compressed if the file is
compressed and the default file format supports compression.

svn path=/trunk/; revision=43475
2012-06-25 17:56:29 +00:00
Guy Harris
16f582176b In the Windows capture file "Save As" dialog code, do the same sort of
checks for the inability to save comments that we do for UN*X.  This
should fix bug 7222, although the UI isn't currently as nice, as the
dialog boxes are Windows dialog boxes and we don't set the button labels
to reflect the actual choices being offered to the user.  (We may be
able to do that by using template resources to construct the message
boxes.)

svn path=/trunk/; revision=43444
2012-06-23 08:18:14 +00:00
Jakub Zawadzki
557ed446c9 Change #if USE_WIN32_FILE_DIALOGS to #ifdef
It should fix buldbot compilation error:
  capture_file_dlg.c(2107) : fatal error C1017: invalid integer constant expression

svn path=/trunk/; revision=43441
2012-06-22 08:22:11 +00:00
Guy Harris
204ea39c5d Move a bunch of common code in the file chooser dialog loops into a
routine to run a file chooser dialog.

On Windows, add to that code to resolve shell links ("shortcuts"),
adopted from the Sylpheed mail reader.  (That code requires a pile of
OLE stuff, so link with the OLE library.)

Make it a bit easier to configure ui/gtk/capture_file_dlg.c to use GTK+
dialogs on Windows, but continue to default to using the Win32 dialogs,
at least for now.

svn path=/trunk/; revision=43439
2012-06-21 22:21:02 +00:00
Guy Harris
3e7ea12e96 Clean up white space (no tabs).
svn path=/trunk/; revision=43397
2012-06-20 05:48:06 +00:00
Guy Harris
750d666e73 Handle the case where the user has added comments to a file that's not
in a format that supports comments and they do a "Save" by popping up a
similar question to the one we pop up in the "Save As" case and, if they
say "choose another format", pop up a "Save As" dialog box.

svn path=/trunk/; revision=43395
2012-06-20 04:44:14 +00:00
Guy Harris
06474b4330 If the file has an SHB comment or any packet comments, and the user
tries to do "Save As" in a format for which we don't support comments
(currently, we only support them for pcap-ng), ask whether they want to
discard the comments and save anyway or, *if* the file can be saved in a
format for which we *do* support comments, they want to save the file in
some other format.

Keep a count of packet comments so that we don't have to scan all the
frame_data structures to determine whether we have any comments.

svn path=/trunk/; revision=43392
2012-06-20 01:11:01 +00:00
Guy Harris
475b8d9bcd The GTK+ file chooser already *includes* UI code to ask the user whether
they want to overwrite an existing file; just use that.  (The Win32 file
chooser also does that itself.)  Just do UI for "do you want to
overwrite this {user-immutable,unwritable} file?".

svn path=/trunk/; revision=43381
2012-06-19 19:20:47 +00:00
Guy Harris
c63aa61658 Have wtap_get_savable_file_types() take an array of encapsulations and
only return file types that could handle a single file with all those
encapsulations - this means that

	1) if there's more then one encapsulation, the file format has
to handle per-packet encapsulation;

	2) just because a file format handles per-packet encapsulation,
that doesn't mean that it can handle the *particular* encapsulations
being handed to it.

This fixes some cases where we were claiming that a file could be saved
in a format that doesn't actually support it (e.g., ISDN files being
reported as savable in pcap-NG format - there's no LINKTYPE_ value for
ISDN including B and D channels).

svn path=/trunk/; revision=43300
2012-06-17 01:32:50 +00:00
Guy Harris
d86f0b5271 No pcap, no capture to stop.
svn path=/trunk/; revision=43249
2012-06-14 02:11:34 +00:00
Guy Harris
481c44b78b When stopping the capture before asking whether to save the results, run
the main loop until we're done reading the captured packets.  Hopefully
this clears up bug 7318 in Evan Huus's case; I can't reproduce that
myself.

svn path=/trunk/; revision=43248
2012-06-14 01:34:52 +00:00
Guy Harris
99536cc8da Distinguish between "failed" and "user stopped it" for "save as" and
"export specified packets".  For "failed", let the user try again with a
different file, in case it failed due to, for example, running out of
space or quota (probably the most likely failure mode for writing, and
trying to a different volume might be the best workaround).  For "user
stopped it", presumably they don't want to try again (the most likely
reason is "it was taking too damn long").
 
Put "Exporting to: ...", not "Saving: ..." in the statusbar if we're
doing "export specified packets".

In process_specified_packets(), allow a null range pointer to be
specified, meaning "save 'em all"; that avoids the possibly-expensive
(with a large capture) operation of initializing the range.

If a "safe save" atop an existing file fails or is stopped, get rid of
the temporary file we created.

svn path=/trunk/; revision=43095
2012-06-05 02:46:54 +00:00