Commit Graph

130 Commits

Author SHA1 Message Date
Guy Harris 39779a7bee Send the output of the -D and -L options to the standard output rather
than the standard error.

In Wireshark on Windows, create a console before doing so and destroy it
before exiting.  Don't do that in TShark or dumpcap, as those are
console-mode programs on Windows.

This should fix bug 8609 and still allow "wireshark -D" and "wireshark
-L" to work when the standard output isn't redirected.

svn path=/trunk/; revision=49025
2013-04-25 05:47:11 +00:00
Irene Rüngeler bcf7a98be1 Select the interface, if only one exists.
svn path=/trunk/; revision=48813
2013-04-11 08:31:59 +00:00
Irene Rüngeler afb0e76c8b The default interface should now be selected also on Windows.
svn path=/trunk/; revision=48799
2013-04-09 08:41:01 +00:00
Jeff Morriss c2ced4a2ab Don't try to open <home>/.wireshark on Windows: Wireshark hasn't written to
that directory since 2001 and reading from that directory was only left in for
backwards compatibility with versions prior to r4702.  I think it's now safe
to remove that backwards compatibility.

This eliminates the last argument of get_persconffile_path().

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

svn path=/trunk/; revision=48797
2013-04-09 02:48:03 +00:00
Guy Harris d49404236c Get rid of main_capture_set_main_window_title(), as it just wraps
set_titlebar_for_capture_in_progress(); make the call directly, to make
it a bit clearer when it needs to be called (which helps us do the
equivalent in the Qt version).

svn path=/trunk/; revision=48687
2013-04-01 17:57:20 +00:00
Guy Harris a94307adcf Move the knowledge about what the window title should be to
ui/gtk/main_titlebar.c, with set_titlebar_for_capture_file() for either
no capture file or an opened capture file and
set_titlebar_for_capture_in_progress() for an in-progress capture.

svn path=/trunk/; revision=48683
2013-04-01 00:21:44 +00:00
Guy Harris 78ab71cc9d Rename set_display_filename() to set_titlebar_for_capture_file(), as
it affects more than just the file name, it also affects whatever "you
have unsaved changes" indicator the UI provides.

Put a comment in the Qt code as a reminder of how to set the "you have
unsaved changes" indicator.

svn path=/trunk/; revision=48680
2013-03-31 22:17:43 +00:00
Evan Huus 6fa584b0db Move wireshark's display filter flag to -Y for consistency with tshark.
Part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8223

svn path=/trunk/; revision=48653
2013-03-30 12:15:42 +00:00
Evan Huus 20e049795f If wireshark is started with a file and a display filter, apply the display
filter *after* initially reading the file so that we get the expected multi-
pass behaviour and forward-looking filters (like response_in) work properly.

svn path=/trunk/; revision=48615
2013-03-28 14:54:33 +00:00
Pascal Quantin 5a877ea9fe From Jim Young via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8531 :
Fix compilation when building with HAVE_GTKOSXAPPLICATION

svn path=/trunk/; revision=48585
2013-03-27 12:29:44 +00:00
Gerald Combs d1b87423df More icon updates.
Use the PNG versions of the new application icons.

Remove the XPM versions of the Wireshark application and capture icons.
To paraphrase Zoidberg, XPMs are bad and we should feel bad. Remove
xpm_to_widget_from_parent (which we weren't using and likely won't use
in the future).

Replace wiki_24.xpm (which was a GNOME or GTK+ stock icon IIRC) with the
16x16 and 24x24 versions emblem-web.png from GNOME icon theme 2.30.3.
This version was used specifically because it's GPLv2 and later versions
are GPLv3.

Update image/README.

svn path=/trunk/; revision=48565
2013-03-26 19:51:33 +00:00
Anders Broman 684c9e5d5c From Jim Young:
Add casts to support c++ when HAVE_GTKOSXAPPLICATION is defined.

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

svn path=/trunk/; revision=48557
2013-03-26 05:02:05 +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
Anders Broman 2cc00294c7 Use explicit casts.
svn path=/trunk/; revision=48260
2013-03-12 06:41:00 +00:00
Anders Broman ac2515ee6f Use explicit casts.
svn path=/trunk/; revision=48239
2013-03-11 06:47:34 +00:00
Jeff Morriss 19214234ae Followup to r48081: use the DEFAULT_CAPTURE_BUFFER_SIZE macro from r47942.
svn path=/trunk/; revision=48085
2013-03-05 15:22:28 +00:00
Chris Maynard 2b93c3b31e Default capture buffer size is now 2MB. (See also r47920 and r47937)
svn path=/trunk/; revision=48081
2013-03-05 02:09:37 +00:00
Bill Meier 162817ad33 it's ==> its & its ==> it's as needed.
In a few cases:
 Fix spelling;
 Clean up whitespace and formatting style.

svn path=/trunk/; revision=47889
2013-02-25 23:35:13 +00:00
Gerald Combs b0d958c4ed Don't yell at the user quite so much. Remove exclamation points from
some error messages and rephrase some others.

svn path=/trunk/; revision=47787
2013-02-21 01:00:44 +00:00
Gerald Combs bd4cffae58 When any of our executables start on Windows create or open a "Wireshark
is running" mutex. Have the NSIS installer check for this mutex and ask
the user to close Wireshark if it's found. While not perfect this makes
the WinSparkle update process much less annoying.

svn path=/trunk/; revision=47758
2013-02-20 01:19:42 +00:00
Gerald Combs e48236a436 Add automatic software update checks for Win32 using WinSparkle. Add
preferences (currently hidden) to disable updates, set the update
frequency, and set the update "channel" (stable vs development). Add a
"Help" menu item to manually check for updates.

svn path=/trunk/; revision=47748
2013-02-19 22:21:17 +00:00
Chris Maynard 73b49715c9 Fix Coverity CID 973548: Dereference null return value.
#BACKPORT(1.8, 1.6)


svn path=/trunk/; revision=47568
2013-02-08 16:23:02 +00:00
Jeff Morriss 446926fa34 Move the get-runtime-version stuff back outside of #ifdef WIN32.
svn path=/trunk/; revision=47454
2013-02-03 18:31:23 +00:00
Anders Broman d7b98a02d1 call load_wpcap before collecting the run-time version information.
svn path=/trunk/; revision=47451
2013-02-03 15:11:53 +00:00
Gerald Combs 2dff8d7605 Add font and color preferences. Unfortunately Qt doesn't have a color
picker widget so we're back to popping up dialogs. Move the contents of
monospace_font.{cpp,h} to wireshark_application.{cpp,h}.

Pango and Qt use completely different string representations for fonts.
Add a separate gui.qt.font_name preference so that they don't clobber
each other.

svn path=/trunk/; revision=47240
2013-01-24 01:10:12 +00:00
Gerald Combs 6ef1fc5002 GTK+:
Get rid of user-hostile behavior. In the layout preferences pane 2 & 3
radio buttons overrode the user's selection if a duplicate item was
selected. Now we assume that the user knows what he or she is doing and
steal duplicate selections from the other panes.

Qt:

Match the new GTK+ behavior in the layout preferences. Add padding
around the layout images. Add toolbar style preferences to the
Appearance pane (instead of the layout pane).

All:

Remove the selection mode and scrollbar placement prefs and mark them
obsolete as recently discussed on -dev.

Adjust the layout images yet again after more Awful Monitor Testing.

svn path=/trunk/; revision=47214
2013-01-22 18:27:18 +00:00
Jaap Keuter 3c6ff474fa Fix for CID 715142.
Be aware that the short-circuit evaluation only applies to the 
first operand of a logical AND expression.

svn path=/trunk/; revision=47188
2013-01-20 21:45:43 +00:00
Gerald Combs ae7ee61e84 Rename the "saved_val" preference element to "stashed_val" in order to
more clearly indicate that it's a copy of a preference value rather than
something we've saved in the preferences file. Update
prefs_pref_to_str() to handle default, stashed, and current prefs.

Create ui/preference_utils.[ch] and move some common routines there. Use
prefs_pref_type_name() in the GTK+ preferences dialog.

Make the "OK" button in the Qt preferences dialog work. We simply write
the prefs and redissect on "OK" and do nothing on "Cancel". This is
intentionally different from the Apply/OK/Cancel behavior in the GTK+
version.

Add a general "emitAppSignal" method to wsApp and use it for packet
dissection and preference changes.

Suggest that we might want to create a WsString class to make conversion
between QStrings, gchar *s, and GStrings easier.

svn path=/trunk/; revision=47139
2013-01-18 00:50:14 +00:00
Guy Harris a694ccd013 Set the crash info as early as possible in main(), so that it shows up
in crashes that happen early in the process.

Clean up white space.

svn path=/trunk/; revision=47108
2013-01-16 00:12:27 +00:00
Evan Huus 4e642fde4c Tweak the order of the UI updates when finishing a live-update capture so that
certain menu items are enabled correctly.

Should fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8108

svn path=/trunk/; revision=46629
2012-12-20 04:06:44 +00:00
Gerald Combs 6df94431ac Remove an unused variable. Use ITEM_LABEL_LENGTH instead of a magic
number.

svn path=/trunk/; revision=46384
2012-12-05 01:02:40 +00:00
Guy Harris d415d3d87c On error, have capture_opts_trim_iface() return the exit status that
should be used (on success, have it return 0).  Exit with that exit
status; if the problem is that we couldn't get the interface list or if
there are no interfaces in that list, return 2, as that's not a
command-line syntax error.

svn path=/trunk/; revision=46108
2012-11-21 17:14:54 +00:00
Anders Broman d54b681f84 From Jim Young and updated by Max Romanov:
The modification to acinclude.m4 adds a new test in the
AC_WIRESHARK_OSX_INTEGRATION_CHECK section to first look for the library
gtkmacintegration.  "gtkmacintegration" is the new internal name for GTK+ MAC
OSX library after the project was moved to www.gtk.org.  Previously this
library was known as igemacintegration.

The patches to the three gtk/*.c files update the conditional #include
<gtkmacintegration/gtkosxapplication.h> to use the new folder name.   The
Option 1 patch will break any build environment that expects to find the
gtkosapplication.h file in the older igemacintegration folder.  
In addition the patch includes updates to
gtk/main.c and gtk/main_menubar.c for a more standard looking App menu.

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

svn path=/trunk/; revision=45869
2012-11-02 09:58:43 +00:00
Pascal Quantin b439ae0d6a Revert r45692 and try to fix link failure another way: console_win32.[ch] definitely belong to ui/win32
Add console_win32.[ch] to Makefile.am

svn path=/trunk/; revision=45693
2012-10-21 19:12:18 +00:00
Alexis La Goutte 5af3defc46 Try to fix LINK : fatal error LNK1181: cannot open input file 'win32/console_win32.obj'
move ui/win32/console_win32.[ch] to ui/console_win32.[ch]

svn path=/trunk/; revision=45692
2012-10-21 18:10:31 +00:00
Alexis La Goutte 62ce10ced8 Move MSWindows console "windows" to ui/win32/console_win32.[ch]
svn path=/trunk/; revision=45677
2012-10-21 14:45:23 +00:00
Jakub Zawadzki 78631020b8 Add wtap_pseudo_header union to wtap_pkthdr structure.
Use pkthdr instead of pseudo_header as argument for dissecting.

svn path=/trunk/; revision=45601
2012-10-16 21:50:57 +00:00
Guy Harris 73dd0321ea Get rid of the always-null and unused argument to
host_name_lookup_process().  If, in the future, we find that we need an
argument for changes we're making, we can add it then.

svn path=/trunk/; revision=45269
2012-10-02 21:13:59 +00:00
Jakub Zawadzki 49ce5e127b protect_thread_critical_region, unprotect_thread_critical_region are no-ops, cleanup code by removing them.
svn path=/trunk/; revision=45201
2012-09-28 21:36:21 +00:00
Gerald Combs 3994ddc357 Call fileset_file_closed from cf_cb_file_closed.
svn path=/trunk/; revision=45163
2012-09-26 23:40:56 +00:00
Gerald Combs 998da54456 Add a cf_cb_file_opened callback and use it instead of calling
fileset_file_opened directly from file.c. This makes the code a bit more
consistenent and makes it easier to port the File Set dialog to Qt.

svn path=/trunk/; revision=45162
2012-09-26 23:33:11 +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
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
Jakub Zawadzki 78019edc99 cinfo.columns_changed is only used by ui/gtk, move it to cfile structure.
svn path=/trunk/; revision=44750
2012-09-03 15:12:49 +00:00
Michael Mann e0e533d643 Have (almost) all preferences use the generic preferences API (per https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7402). This cleaned up a lot of hardcoded code and allows breaking up the prefs structure (or at least prevent it from growing too large) if desired.
Bugfixed problems mentioned in
http://www.wireshark.org/lists/wireshark-dev/201208/msg00001.html

Column preferences now support default '#' character

svn path=/trunk/; revision=44348
2012-08-08 16:54:02 +00:00
Irene Rüngeler 3a3b4a1fdc Add -A as command line option to wireshark and tshark.
svn path=/trunk/; revision=44339
2012-08-08 14:30:55 +00:00
Gerald Combs a234d1215c Move capture_globals.h from ui/gtk/ to ui/. Show interface activity
using sparklines in the qtshark main window.

svn path=/trunk/; revision=44253
2012-08-03 23:30:47 +00:00
Gerald Combs bd855826a9 Move the common parts of iface_lists.[ch] from ui/gtk/ to ui/. Leave the
GTK+-specific parts behind in capture_dlg.c.

svn path=/trunk/; revision=44196
2012-08-01 22:32:14 +00:00
Anders Broman 88f8b100a2 Analyze->Apply as Filter and Analyze->Prepare a Filter cause crashes
user_data is NULL in the callbacks from the menu_bar, and when preparing filters we need to find the filter widget with g_object_get_data(G_OBJECT(data), E_DFILTER_TE_KEY).
The object is saved in the global variable popup_menu_object.
Use that in the filter callbacks from the menu bar.
- remove unused widget from a couple of callbacks.

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

svn path=/trunk/; revision=43961
2012-07-24 15:03:59 +00:00