Commit Graph

389 Commits

Author SHA1 Message Date
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