Commit Graph

94 Commits

Author SHA1 Message Date
Jeff Morriss 0a669967fa Move merge.{h,c} into wiretap: these modules use wiretap to merge files.
svn path=/trunk/; revision=50656
2013-07-16 02:35:33 +00:00
Jeff Morriss 45449ce1a8 Move some more modules into epan.
svn path=/trunk/; revision=50517
2013-07-11 23:57:11 +00:00
Guy Harris 89afc91ccf Give file_selection_new() an argument to specify the parent window of
the file selection dialog.

Call gtk_file_chooser_set_do_overwrite_confirmation() in
file_selection_new() for FILE_SELECTION_SAVE file selection dialogs,
rather than doing it in the individual callers of file_selection_new().

Use gtk_dialog_set_alternative_button_order() in file_selection_new() to
set the alternative button order, rather than using #ifdefs.

Use file_selection_new() and file_selection_run() in the graph analysis
code.  (We should clean up other code that uses file_selection_new() to
use file_selection_run(), and clean up other code that uses
gtk_file_chooser_dialog_new() to use file_selection_new() and
file_selection_run().)

svn path=/trunk/; revision=49308
2013-05-14 21:53:57 +00:00
Guy Harris 67a18cd0e6 Fix indentation.
svn path=/trunk/; revision=49295
2013-05-14 19:06:20 +00:00
Guy Harris 231757c4d5 Use gtk_dialog_set_alternative_button_order() to set the "alternative"
button order (that order is what's used on Windows).

Put the affirmative answer on the right by default.

svn path=/trunk/; revision=49284
2013-05-14 02:46:17 +00:00
Guy Harris 039a075699 Eliminate some includes of ui/simple_dialog.h by files that don't use
anything from it.

svn path=/trunk/; revision=49277
2013-05-13 22:50:29 +00:00
Guy Harris 432e914dbd Rename cf_not_saved() to cf_has_unsaved_data() to clarify what it
indicates.  (Note: "unsaved data" is more than just "unsaved changes";
it could also mean "temporary file that hasn't been saved anywhere".)

svn path=/trunk/; revision=48709
2013-04-02 20:35:46 +00:00
Guy Harris d942759401 Add routines to file.c to indicate whether:
a save can be done ("can" in the sense of "there's something to
	save" and in the sense of "we can write that something out");

	a "save as" can be done (in the sense of "we can write what we
	have out");

	there's unsaved data to save (which might be unsaved changes or
	might be a temporary file full of packets);

and use them as appropriate.  This means that the "unsaved data"
indicator in the UI will be turned on for temporary files full of
packets as well as for files with unsaved changes; that's what we want.

svn path=/trunk/; revision=48693
2013-04-01 23:44:29 +00:00
Guy Harris b1ecd8d217 Add a wtap_dump_can_write() routine that indicates whether Wiretap
supports writing files with a given set of encapsulations and comment
types.  Use it, rather than asking for a list of file formats that
support the given set of encapsulation and comment types and checking
whether we got back such a list, or duplicating its logic.

Having file.c use it means that nobody's using
wtap_dump_can_write_encaps() any more; get rid of it.  Instead, have a
private routine that checks whether a given file format supports a given
set of encapsulations *and* comment types, and use that internally.

svn path=/trunk/; revision=48690
2013-04-01 21:17:50 +00:00
Guy Harris 82a602d697 Define a collection of bits for different types of capture file comments.
For each capture file type, have a bitset of comment types supported by
that capture file type.

Add a Wiretap routine that, for a given file type, returns the bitset of
comment types it supports.

Have wtap_get_savable_file_types() take a bitset of comment types that
need to be supported by the file types it returns.

Replace cf_has_comments() with a routine that returns a bitset of
capture file comment types in the capture file.

Use those routines in the capture file dialogs; don't wire in the notion
that pcap-NG supports all comment types and no other file formats
support any comment types.  (That's currently true, but we don't want to
wire that in as being forever true.)

svn path=/trunk/; revision=48689
2013-04-01 20:36:42 +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 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