Commit Graph

410 Commits

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