Commit graph

480 commits

Author SHA1 Message Date
Guy Harris
cccc9f0a2d If we don't have AirPcap, don't bother with the IF_AIRPCAP case; if we
ever add support for it on additional platforms, HAVE_AIRPCAP will be
defined.

svn path=/trunk/; revision=43533
2012-06-28 20:40:44 +00:00
Guy Harris
c51a19cc43 get_interface_type() contains no GUI code, so just move it up to
capture_ifinfo.c.

svn path=/trunk/; revision=43532
2012-06-28 20:16:39 +00:00
Guy Harris
8381581aa1 capture_get_if_icon() is no longer platform-dependent; the
platform-dependent work is now done in get_interface_type().

That means we also don't need to protect the handling of IF_DIALUP or
even IF_AIRPCAP in #ifdefs, just in case we add support for those types
in other OSes.

Nothing's uisng the capture_ethernet_16.xpm image here, so don't bother
including it.  (Does *anybody* use it?  I couldn't find any uses, but
maybe we should use that.)

svn path=/trunk/; revision=43531
2012-06-28 20:06:37 +00:00
Guy Harris
1ae8203b46 No pcap, no interfaces to monitor.
svn path=/trunk/; revision=43530
2012-06-28 19:10:40 +00:00
Guy Harris
5e077c6d6c <wsutil/file_util.h> is needed on Windows.
svn path=/trunk/; revision=43529
2012-06-28 19:09:22 +00:00
Guy Harris
05d6212a62 Make more routines static.
svn path=/trunk/; revision=43528
2012-06-28 19:08:11 +00:00
Guy Harris
6d5271b856 Make some routines static to ui/gtk/capture_dlg.c; they're not used
outside it.

svn path=/trunk/; revision=43527
2012-06-28 18:57:23 +00:00
Guy Harris
79e11663b1 <wsutil/file_util.h> is needed by ui/gtk/iface_lists.c on Linux as it
does a ws_stat64() to check for the existence of files in /sys.

It's *not* needed in ui/gtk/main.c any more, as that code was moved out
of ui/gtk/main.c.

svn path=/trunk/; revision=43525
2012-06-28 18:33:53 +00:00
Guy Harris
b191653a04 Get rid of a couple of tabs.
svn path=/trunk/; revision=43524
2012-06-28 18:22:02 +00:00
Guy Harris
879189564a Move the stuff to manage the global interface list and to update
displays of that list into a separate iface_lists.c file.

svn path=/trunk/; revision=43523
2012-06-28 18:16:18 +00:00
Guy Harris
fde7f31b4f No pcap, no interfaces to monitor.
svn path=/trunk/; revision=43522
2012-06-28 17:01:57 +00:00
Guy Harris
1d1391ed47 From Pontus Fuchs:
Add an interface monitor that, on Linux distributions with libnl,
watches for interfaces to appear or disappear and, on such an event,
causes windows showing interface lists to update.

svn path=/trunk/; revision=43521
2012-06-28 16:21:51 +00:00
Guy Harris
28f866815a Update some refresh_interfaces_cb() calls appropriately.
svn path=/trunk/; revision=43520
2012-06-28 15:13:53 +00:00
Guy Harris
b52000fc78 Comment/#ifdef out a currently-unused variable.
svn path=/trunk/; revision=43519
2012-06-28 15:11:01 +00:00
Guy Harris
4e893a71fe Make scan_local_interfaces() local to ui/gtk/main.c; widgets/windows
that want a list of interfaces should either call
fill_in_local_interfaces() to make sure the list has been populated at
least once or refresh_local_interface_lists() if they want the list to
be rescanned.

Also make get_interface_type() local to ui/gtk/main.c, as it's not
called from outside ui/gtk/main.c.

Don't declare fill_in_local_interfaces() or hide_interface() unless we
have pcap - we don't define them unless we have pcap.

svn path=/trunk/; revision=43518
2012-06-28 08:25:17 +00:00
Guy Harris
5e7ca579ce Detangle the code that manages the interface list on the welcome screen:
fill_capture_box():

	if there are interfaces on which to capture, constructs the
	interface list, otherwise destroys the interface list and puts
	up a message.

    update_capture_box():

	updates the interface list to reflect current reality.

    welcome_if_panel_reload():

	if there is an interface list, and if there are interfaces on
	which to capture (so that we still want that list), updates the
	list by calling update_capture_box(), otherwise creates or
	destroys it by calling fill_capture_box() (as either it doesn't
	exist but now needs to or does exist but needs to go away).

Have refresh_local_interface_lists(), which re-fetches the list of local
interfaces and updates every interface list that includes local
interfaces, and refresh_non_local_interface_lists(), which only updates
interface lists that (also) include interfaces other than local
interfaces (such as pipes and remote interfaces).  Call them in the
apprpriate places (if we know the list of local interfaces has been
updated, call refresh_local_interface_lists(), otherwise, if we know
interfaces other than local interfaces have been added or removed, call
refresh_non_local_interface_lists()).

Don't have any routine that updates the interface list for one widget
update the interface list for any other widget; leave the global
updating of interface lists up to refresh_local_interface_lists() and
refresh_non_local_interface_lists() - only call one of them if any
interface lists are to be updated.

svn path=/trunk/; revision=43517
2012-06-28 08:13:21 +00:00
Guy Harris
234628c616 No pcap, no interfaces, no interface lists to refresh.
svn path=/trunk/; revision=43516
2012-06-28 02:19:12 +00:00
Guy Harris
9650d477b3 From Pontus Fuchs:
add a capture_dlg_refresh_if() routine to redraw the list of
	interfaces in the Capture -> Interfaces dialog if the lsit of
	known interfaces is updated, and have it do that not by
	destroying and reconstructing the entire dialog box, but just by
	destroying and reconstructing the table containing the
	interfaces and their statistics.

From me:

	have a refresh_interfaces_cb() routine in ui/gtk/main.c that
	scans the local interfaces and refreshes *all* the widgets that
	have interface lists;

	add a "Refresh Interfaces" item to the Capture menu that calls
	that;

	have the "Refresh" button in the "Manage Interfaces" window also
	call that;

	rename the Capture Options window routine dlg_window_present()
	to capture_dlg_window_present() to make it clearer *which*
	dialog it checks for;

	fix Pontus' patch to call capture_stat_stop() *before* nulling
	out the global pointer for the statistics cache - if it's called
	*after* nulling it out, the argument passed to
	capture_stat_stop() is null, and it doesn't kill off the dumpcap
	gathering the statistics so they just pile up (and, at least on
	OS X, chewing up BPF devices until you run out of BPF devices
	that have the right ownership and permissions for dumpcap to use
	as a normal user);

	if refreshing the interfaces fails to get an interface list,
	close the Capture Interfaces dialog.

svn path=/trunk/; revision=43515
2012-06-28 01:54:42 +00:00
Guy Harris
f321db7c99 Rename the GArray of interfaces "if_array", to indicate what it really
is, and rename the routine that creates it to "make_if_array()".

svn path=/trunk/; revision=43514
2012-06-27 23:15:28 +00:00
Bill Meier
9489edfbde Commit file which should have been part of SVN #43506
From Jakub Zawadzki: Fix "typeahead search broken in Display Filter Expression Window"
 
 Revert SVN #42291.
 
 Fixes Bug #7412: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7412


svn path=/trunk/; revision=43511
2012-06-27 14:58:32 +00:00
Bill Meier
bd91ce6af3 Fix for "predefined values sometimes missing in Display Filter Expression window.
See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7413

Essentially: BASE_CUSTOM was being used as a mask rather than a field value.


svn path=/trunk/; revision=43507
2012-06-27 13:57:39 +00:00
Bill Meier
45ca434f32 From Jakub Zawadzki: Fix "typeahead search broken in Display Filter Expression Window"
Revert SVN #42291.

Fixes Bug #7412: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7412


svn path=/trunk/; revision=43506
2012-06-27 13:37:13 +00:00
Guy Harris
cbb028bd47 Have the toolbar "Save" button just be a "Save" button, working the same
as the File -> Save menu item.

svn path=/trunk/; revision=43493
2012-06-26 04:26:04 +00:00
Jeff Morriss
3294c9876a Don't let the user set the frequency or channel when we don't HAVE_PCAP;
instead disable the toolbar items (I hope).

Hopefully this will fix the MacOS buildbots' --without-pcap builds.

svn path=/trunk/; revision=43492
2012-06-25 23:30:23 +00:00
Jeff Morriss
af63e14c68 Get rid of a couple of unused variables and parameters.
svn path=/trunk/; revision=43486
2012-06-25 21:45:21 +00:00
Anders Broman
3814106d7e From Michael Mann:
generic preferences implementation

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

svn path=/trunk/; revision=43484
2012-06-25 21:05:36 +00:00
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
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
Jeff Morriss
06e81d59b4 Fix up some white space (get rid of 4-space tabs.
svn path=/trunk/; revision=43468
2012-06-24 23:52:05 +00:00
Jörg Mayer
5cab183cfb Pontus Fuchs (via bug 6973):
Make the wireless toolbar actually appear.

svn path=/trunk/; revision=43465
2012-06-24 19:43:09 +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
a862178702 We now need <epan/filesystem.h> regardless of whether we're being built
on Win32 or not, as we need test_for_directory().

svn path=/trunk/; revision=43440
2012-06-21 22:49:22 +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
07d3f84d28 The symbolic names for column indices are unused outside of
capture_dlg.c; move them there.  (There are no routines exported by
capture_dlg.c that use them.)

svn path=/trunk/; revision=43436
2012-06-21 20:45:22 +00:00
Jeff Morriss
5cfd2561f8 ws80211_init() only returned ENOTSUP back when it could be a stub when we
did not HAVE_LIBNL.  Now that we only compile the modules when we HAVE_LIBNL
(and thus the stub no longer exists) there's no need to check for it.

svn path=/trunk/; revision=43430
2012-06-21 18:07:52 +00:00
Jeff Morriss
536cc401ad Try to use the gtk-compat macros correctly.
svn path=/trunk/; revision=43424
2012-06-21 00:37:42 +00:00
Jeff Morriss
e5fc8b288c GtkComboBoxText is only available in 2.24 and later; use GtkComboBox instead.
svn path=/trunk/; revision=43422
2012-06-21 00:11:06 +00:00
Jörg Mayer
b5c1bd803c Copy over Makefile.common changes to CMakeLists
svn path=/trunk/; revision=43416
2012-06-20 18:46:16 +00:00
Jörg Mayer
646212685c Makefile.common:
- ws80211_utils.c is only needed to build dumpcap, not to build wireshark.
  If it were different it would probably indicate a bad api design.
ui/gtk/Makefile.common:
- Sort in the toolbar in the right place (alphabetically)

svn path=/trunk/; revision=43415
2012-06-20 18:45:25 +00:00
Jörg Mayer
d2b4825558 Comment back in the body of tb80211_do_set_channel to avoid warnings about
unused parameters. Add the missing functions by applying the skipped patches
to capture_sync.[hc]

svn path=/trunk/; revision=43414
2012-06-20 18:42:45 +00:00
Anders Broman
5f156576cb #if 0 out code to make it build in it's current state
svn path=/trunk/; revision=43413
2012-06-20 17:35:38 +00:00
Anders Broman
a2f2c49074 Add the toolbar of bug https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6973
sligtly modified to compile on Windows. See if it breaks any other platform.

svn path=/trunk/; revision=43411
2012-06-20 17:02:07 +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
6ba80adfed The "save as" dialog is modal, so we don't need to worry about keeping
track of multiple such "save as" windows.

Use modal dialog boxes to report errors, while we're at it.  That lets
us keep the dialog open if we get an error.

svn path=/trunk/; revision=43380
2012-06-19 18:47:22 +00:00
Jörg Mayer
ebc9046f2d Replace last instance of airpcap_tb by wireless_tb for
consistency.

svn path=/trunk/; revision=43374
2012-06-19 16:32:05 +00:00
Jörg Mayer
bca451b663 capture_dlg.h:
- Replace airpcap_tb in comment
- Remove trailing whitespace
main.c:
- wireless_tb must always be defined now, even if compiling without
  HAVE_AIRPCAP

svn path=/trunk/; revision=43373
2012-06-19 16:13:11 +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
1992295e16 Revert:
airpcap_tb -> wireless_tb

Second try.

svn path=/trunk/; revision=43364
2012-06-19 14:37:46 +00:00
Anders Broman
eeb63c1297 Revert:
airpcap_tb -> wireless_tb

svn path=/trunk/; revision=43360
2012-06-19 14:08:15 +00:00
Anders Broman
890a3f66ea airpcap_tb -> wireless_tb
svn path=/trunk/; revision=43359
2012-06-19 13:36:35 +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
9ff274758a capture_get_if_icon() no longer determines the interface type itself, it
relies on get_interface_type() having done so.  Thus, we no longer need
to include <sys/types.h> or <sys/stat.h> on Linux, as we aren't doing,
and haven't been doing, ws_stat64()s on Linux.

svn path=/trunk/; revision=43351
2012-06-19 09:59:45 +00:00
Guy Harris
85e4574258 The file dialog run by file_selection_browse() is modal, so there will
only be one instance per "Browse" button up at a time - no need to check
for one already being open.

svn path=/trunk/; revision=43349
2012-06-19 08:11:30 +00:00
Anders Broman
4f5bdb67b2 From Pontus Fuchs:
If there are many interfaces the button bar is not visible
unless you manually resize the dialog. On a normal Linux PC
you can easily reach 15-20 interfaces due to USB monitor.

Add a vbox so that you get a scrollbar for the interface table
instead of on the window. This way the button bar is always
visible.

Also increase the default height to handle 20 interfaces.

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

svn path=/trunk/; revision=43345
2012-06-19 06:08:58 +00:00
Jakub Zawadzki
39f1f0bcb7 Fix r43338 once again :(
svn path=/trunk/; revision=43342
2012-06-18 21:33:08 +00:00
Jakub Zawadzki
fc881f6f37 Fix r43338
svn path=/trunk/; revision=43339
2012-06-18 20:15:42 +00:00
Jakub Zawadzki
6d06c68247 Change record->col_text_len type to unsigned short.
Maximal length of column is defined as 256, for COL_INFO it's 4096, 
so limiting it to 65535 bytes in GUI is OK.

XXX To save memory more, we could make col_text_len[] member of PacketList, not PacketListRecord.

svn path=/trunk/; revision=43338
2012-06-18 19:35:34 +00:00
Guy Harris
c92fced5b8 Add initialization to squelch compiler warnings.
svn path=/trunk/; revision=43327
2012-06-18 05:59:33 +00:00
Guy Harris
128126c1e6 Use the GTK+ message type, not the Wireshark message type, in GTK+
calls.

svn path=/trunk/; revision=43325
2012-06-18 05:57:26 +00:00
Guy Harris
4d7c097f17 Stuff the "Don't show this message again" checkbox in the dialog's
content area.

svn path=/trunk/; revision=43323
2012-06-17 23:24:06 +00:00
Guy Harris
29e4e24184 Add "simple dialog" routines to pop up modal message boxes. Use them in
file.c and routines called from it; non-modal dialogs end up, in some
cases, either hidden, devoid of the input focus and not dismissable, or
both.

svn path=/trunk/; revision=43321
2012-06-17 22:32:03 +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
5237a5efa2 Move a bunch of toolbar routines into main_toolbar_private.h; they
should only be called by the main window code.

svn path=/trunk/; revision=43299
2012-06-17 00:06:13 +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
8bd9df6671 Oops, main_packet_panes.h no longer exists.
svn path=/trunk/; revision=43297
2012-06-16 23:29:57 +00:00
Guy Harris
9a3a2642f5 Reflect the move of main_proto_draw.c to packet_panes.c.
svn path=/trunk/; revision=43296
2012-06-16 23:11:12 +00:00
Guy Harris
26d50fb7a0 There's not much of note in ui/gtk/main_packet_panes.c; just do those
operations directly in ui/gtk/main.c.

svn path=/trunk/; revision=43295
2012-06-16 23:10:06 +00:00
Guy Harris
6cb63bbc6f Clean up indentation.
svn path=/trunk/; revision=43294
2012-06-16 21:39:16 +00:00
Guy Harris
c22b539731 Rename clear_tree_and_hex_views() to main_clear_tree_and_hex_views(), as
it specifically works on the main window's tree and hex dump views (it
doesn't apply to packet windows - they are always showing data from a
particular packet), and move its declaration to main_packet_panes.h.

svn path=/trunk/; revision=43293
2012-06-16 21:37:24 +00:00
Guy Harris
75dba53ad6 Move some routines that specifically handle the main window's packet
panes to main_packet_panes.c.

Rename main_tree_view_new() to proto_tree_view_new() - it's not just for
creating the main window's protocol tree view, it's also for creating
protocol tree views in packet windows.

svn path=/trunk/; revision=43292
2012-06-16 21:30:24 +00:00
Guy Harris
95988da72b 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=43291
2012-06-16 20:59:12 +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
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
Jakub Zawadzki
c43b7b8b93 highlight_field: use passed GtkTreeView for proto_tree_draw.
highlight_field() is also called when we open packet in new window and we click some bytes,
it caused redrawing packet details in *main window* but with protocol tree from (possibly) another frame.

svn path=/trunk/; revision=43277
2012-06-15 23:04:59 +00:00
Guy Harris
21d35d275a In effect, disable closing the main window while a capture is being
stopped - there's no guaranteed way to make the UI's close button
inactive (on X11, it depends on whether the window manager allows that),
but we can just do nothing and return TRUE from the delete event handler
to ignore the delete event.

svn path=/trunk/; revision=43252
2012-06-14 03:50:39 +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
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
98ec2ab440 Update a comment to reflect new-packet-list reality.
svn path=/trunk/; revision=43242
2012-06-13 21:08:18 +00:00
Bill Meier
d0868be051 Add '*.sbr' to 'clean'
svn path=/trunk/; revision=43233
2012-06-13 16:19:35 +00:00
Jeff Morriss
4fdc3c3cc2 Create, and start using, file name preferences.
File name preferences are basically just string preferences except that the
GUI will present a "Browse" button that allows the user to go and find the
file s/he wants (rather than having to blindly type in the full path).

svn path=/trunk/; revision=43228
2012-06-13 01:13:12 +00:00
Chris Maynard
e9b173b306 Set the default for printing or exporting packets to displayed packets only.
svn path=/trunk/; revision=43193
2012-06-11 02:43:16 +00:00
Jakub Zawadzki
2252800809 Missing proto_tree_model.c in CMakeLists (r43189 for cmake)
svn path=/trunk/; revision=43190
2012-06-10 22:35:48 +00:00
Jakub Zawadzki
f372010ee8 Custom model for packet details
Original patch tracked in bug #7224

svn path=/trunk/; revision=43189
2012-06-10 22:07:54 +00:00
Jakub Zawadzki
a2bb94c3b3 Clear GtkTreeStore before freeing edt
When building current data for packet details treeview we store two things.
- Generated string with item label
- Pointer to node field_info structure

After epan_dissect_{free, cleanup} pointer to field_info node is no longer
valid so we should clear GtkTreeStore before freeing.

svn path=/trunk/; revision=43188
2012-06-10 22:03:17 +00:00
Jeff Morriss
12bd8f51b3 Add casting to keep Windows happy.
svn path=/trunk/; revision=43140
2012-06-06 20:04:03 +00:00
Jeff Morriss
4ccdf8aa67 Split the Advanced unit COUNT(*) into COUNT FRAMES(*) and COUNT FIELDS(*).
(Before checking the code it wasn't clear to me what COUNT(*) was counting
and--especially with SCTP's bundling of user messages--counting fields was
really what I wanted/needed.)

Remove a 32-bit cast (should have been part of r43136).

svn path=/trunk/; revision=43137
2012-06-06 19:14:30 +00:00
Jeff Morriss
ddcd688f74 Support math operations (SUM, MAX, MIN, etc.) on 64-bit fields.
svn path=/trunk/; revision=43136
2012-06-06 18:54:18 +00:00
Guy Harris
9fe3d4b4f3 If we do a Save or Save As with a move, don't reread the capture file,
just tweak the elements in the capture_file structure as necessary and
poke the UI to update stuff such as the windows title.

If we do a Save or Save As with a copy, don't reread the capture file,
just close the old wtap, open a wtap for the copy, and tweak the
elements in the capture_file structure as necessary and poke the UI to
update stuff such as the windows title.

Otherwise, don't do a full read-and-dissect pass on the capture file,
just close the old wtap, open a wtap for the new file, tweak the
elements in the capture_file structure as necessary and poke the UI to
update stuff such as the windows title, and rescan the file to update
the packet offsets (and cause Wiretap to regenerate, for a gzipped file,
the information needed to support fast random access to the gzipped
file).

This should speed up Save and Save As a bit, as well as removing some
glitches in the UI (e.g., you won't see the packet list disappear and
reappear).

svn path=/trunk/; revision=43101
2012-06-05 06:52:18 +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
Jörg Mayer
4a1a245c19 gtk3 libs for win are now available.
svn path=/trunk/; revision=43085
2012-06-04 21:54:29 +00:00
Pascal Quantin
5606383a72 C++ -> C-style comments
svn path=/trunk/; revision=43084
2012-06-04 21:31:18 +00:00