Commit Graph

144 Commits

Author SHA1 Message Date
Gerald Combs ea6fa049c9 Update the simple dialog code.
Rename simple_dialog_qt.{cpp,h} to simple_dialog.{cpp,h}. Make it a
subclass of QMessageBox. Queue messages at startup similar to GTK+.

Move the GTK+-specific simple_dialog declarations to
gtk/simple_dialog.h.

Don't yell at the user so much. Replace exclamation points with periods.

Change-Id: I1cc771106222d5e06f1f52d67ac29d6dc367cce4
Reviewed-on: https://code.wireshark.org/review/4288
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-25 22:02:43 +00:00
Gerald Combs 31e86998fb Qt: Add zoom and column resize actions.
Plumb signals and slots for changing the text size in the main window.
Remove the bold font code from WiresharkApplication. It was only used in
ByteViewText. Adjust the icons a bit.

Bug: When we change the font preferences the packet list stops drawing
cached strings. I haven't been able to track down the cause.

Change-Id: I609d740c9f26265628fa4b7de1b75b0e56651387
Reviewed-on: https://code.wireshark.org/review/4269
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-23 22:32:53 +00:00
Gerald Combs 717ff08f32 Qt: Add the colorization action.
Change-Id: I846a48c35c4ef3bbbcf17d03885acc5be8c9a6b5
Reviewed-on: https://code.wireshark.org/review/4259
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-23 14:26:45 +00:00
Gerald Combs d3cd4c4b28 Qt: Re-enable menu icons.
The GNOME HIG says "Where a corresponding toolbar icon exists, a menu
icon should mirror its design." The Windows and OS X HIGs say that you
should use them for common or familiar actions but otherwise avoid
clutter. I think icons in the "File" menu look like crap. Try to strike
a balance.

Use the 16x16 application icon for both the main web site and the wiki
since that's the favicon used on both sites.

Assume that "Reload" isn't used very often and remove it from the
toolbar.

Don't use a menu icon for the about box.

Other minor fixups.

Change-Id: I855211c218d266c2e9ed5acbe05a08750ab6d157
Reviewed-on: https://code.wireshark.org/review/4246
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-23 02:42:14 +00:00
Gerald Combs 5d1aafbb36 Qt: Multi-state capture start icon.
Add ".on" versions of the x-capture-start icon along with corresponding
code in the StockIcon constructor to look for ".on" variants and add
them with the QIcon::On state.

Make the plain versions of x-capture-start blue to match the general
application icon. The goal is to make the toolbar and app icon fins blue
when Wireshark is "at rest" and green when it's capturing.

Change-Id: I31f4f9d910fc99c41d7c63bd9a722db1611760c7
Reviewed-on: https://code.wireshark.org/review/4225
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-21 16:45:14 +00:00
Gerald Combs 8576e1c103 Qt: Add stock icons.
The new icons are patterned after the existing capture icons. They could
probably benefit from some adjustments here and there.

Start moving toward icon names and a directory layout compliant with
freedesktop.org's Icon Naming Specification and Icon Theme
Specification. We aren't fully compliant and might never be but anyone
with exposure to FDO icon themes should at least know where everything
is.

Make Capture Start (x-capture-start) the first icon in the toolbar.

Define the Colorize Packets, Auto Scroll, and zoom icons even though the
Qt UI doesn't use them yet.

Leave the Capture Filter, Display Filter, Coloring Rules, Preferences,
and Help icons off for now. The GTK+ toolbar is overly cluttered and I'm
not sure they're necessary.

Try not to break ui/gtk/toolbar_icons.h.

Remove welcome.qrc. I initially added it in case we needed to overlay
the welcome screen with translucent .pngs but that never happened.

To do:

- Move the old GTK+ icons to their own directory.

- Find a better name for the "toolbar" directory. "stock"?

- Make the toolbar configurable.

Change-Id: Ie07592113d307b8db786aedace672312a870fe38
Reviewed-on: https://code.wireshark.org/review/4182
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-20 19:54:04 +00:00
Guy Harris fdff1b3b18 Don't connect to non-existent slots.
(Run-time warning, not compile-time error, alas.)

Change-Id: I002ca132d2c7cbc2cfd802438edb4509ff76bcbc
Reviewed-on: https://code.wireshark.org/review/3155
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-22 00:15:56 +00:00
Guy Harris c7a2c89e40 Rename ifListChanged to localInterfaceListChanged.
That better indicates that it reflects changes to the list of local
interfaces on the system, as supplied by libpcap/WinPcap, not to any
other interface list we maintain, such as lists of remote interfaces, or
the list of non-hidden interfaces.

Change-Id: Idf79b365e07f2e3eaa83c105ae9cd7ace54c435e
Reviewed-on: https://code.wireshark.org/review/3154
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-21 23:30:58 +00:00
Guy Harris 48986f4fb9 Make the Qt version update displays when interfaces appear or disappear.
Change-Id: If1218baaae9dcd93ddb1cea81ac5457f90a57c6c
Reviewed-on: https://code.wireshark.org/review/3152
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-21 19:07:28 +00:00
Guy Harris a3f7d1951d Get rid of #if 0'ed out includes of capture-pcap-util.h.
Change-Id: Ie3678a08ed9b3d46b22e7c59eef74e6e9636ae59
Reviewed-on: https://code.wireshark.org/review/3140
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-20 22:14:26 +00:00
Gerald Combs d1d88f575d Add plumbing for stat commands ("-z ...").
Trigger dialog creation by passing a method name to
QMetaObject::invokeMethod. I'm not entirely sure this is sane but it
seems to work OK. Move getopt processing further down in the main initialization sequence
to more closely match GTK+ and allow for stat command registration.

Change-Id: I5cd5375fa71dbadac69d528b2ba3bb13598dc3f6
Reviewed-on: https://code.wireshark.org/review/2964
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-07-11 20:52:10 +00:00
Guy Harris 9e6487f247 Move utility routines for capturing into a libcaputils static library.
Some of those routines are used only in dumpcap; others are used in
TShark and Wireshark as well.

Change-Id: I9d92483f2fcff57a7d8b6bf6bdf2870505d19fb7
Reviewed-on: https://code.wireshark.org/review/2841
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-04 07:25:26 +00:00
Irene Ruengeler f3c5f14bc4 Manage Interfaces
- Add dialog to manage interfaces
- Add and delete pipes
- Hide local interfaces

Change-Id: I08323c306c2ea736f99e57c28e2fe3170a0c2216
Reviewed-on: https://code.wireshark.org/review/2613
Tested-by: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Tüxen <tuexen@wireshark.org>
2014-07-02 20:56:37 +00:00
Guy Harris ad1391aa4e Move capture.[ch] to libui.
Change-Id: I86e7e781cc9e14abab0374a18b95438529b046f0
Reviewed-on: https://code.wireshark.org/review/2711
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-30 05:38:57 +00:00
Guy Harris b33512b704 Move capture_session.h to capchild; what it declares is defined there.
Change-Id: I8b1407839390b7ac0b45bf6f583c1a509073f002
Reviewed-on: https://code.wireshark.org/review/2709
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-30 05:09:31 +00:00
Guy Harris df5833723c Move capture_ui_utils.[ch] to libui.
Change-Id: Id0f3d4d60a1acc7aa64fd3737b8f16df5bca4e5a
Reviewed-on: https://code.wireshark.org/review/2708
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-30 01:36:56 +00:00
Alexis La Goutte 11243e3977 Qt: fix loading of language translation
But need always restart to apply change...

Based on http://qt-project.org/wiki/How_to_create_a_multi_language_application


Change-Id: I0f95afb68aa5b125e0707b0af1ce096dab9c29e4
Reviewed-on: https://code.wireshark.org/review/2286
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-06-17 00:08:51 +00:00
Irene Ruengeler df8c4bf264 Capture Interfaces Dialog:
- allow to change the interface options in the table
- save the options to preferences when the dialog is left
- add a field for setting a capture filter for all selected interfaces
- add a "Compile BPF" button and a window to show the compiled filter output
- try to address Alexis' and Evan's comments

Change-Id: Ic1272e29183ec80e2d2f4b3e494c79dabe2c3b6f
Reviewed-on: https://code.wireshark.org/review/1946
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-12 05:54:59 +00:00
Guy Harris 6db77b000f Allow wtap_read() and wtap_seek_read() to return records other than packets.
Add a "record type" field to "struct wtap_pkthdr"; currently, it can be
REC_TYPE_PACKET, for a record containing a packet, or
REC_TYPE_FILE_TYPE_SPECIFIC, for records containing file-type-specific
data.

Modify code that reads packets to be able to handle non-packet records,
even if that just means ignoring them.

Rename some routines to indicate that they handle more than just
packets.

We don't yet have any libwiretap code that supplies records other than
REC_TYPE_PACKET or that supporting writing records other than
REC_TYPE_PACKET, or any code to support plugins for handling
REC_TYPE_FILE_TYPE_SPECIFIC records; this is just the first step for bug
8590.

Change-Id: Idb40b78f17c2c3aea72031bcd252abf9bc11c813
Reviewed-on: https://code.wireshark.org/review/1773
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-05-24 18:31:25 +00:00
Evan Huus 25ba4a2a44 Guard closing capture window with ifdef.
That variable is only defined if we HAVE_LIBPCAP. Should fix OSX10.5 buildbot.

Change-Id: I0bafc48955ef4af3c0b8d9d7a35b1e8b27577d31
Reviewed-on: https://code.wireshark.org/review/1669
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-05-17 12:07:45 +00:00
ruengeler 53eeff6c91 Do not leave the Options Interfaces Dialog open, when the Main Window is closed.
Change-Id: Ifd4fb88ceff24561131fad1d72531889e323f5ac
Reviewed-on: https://code.wireshark.org/review/1651
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-15 11:58:57 +00:00
Gerald Combs a5cb72fe9e Add a Qt I/O Graph dialog.
For each graph you can set:
- Its visibility
- A name
- A display filter
- Color, from a fixed list
- Plot style: Line, Impulse, Bar, Stacked Bar, Dot, Square, Diamond
- Basic Y Axes (packets/s, bytes/s, bits/s)
- Computed Y Axes (SUM, MIN, AVG, MAX)
- Smoothing

You can pan and zoom using the mouse and keyboard. Clicking on a graph
selects the last packet for that interval. If all graphs have the same Y
axis a single label is shown, otherwise a legend is shown.

The time scale (X axis) can be toggled between relative seconds and the
time of day.

Graphs can be saved as PDF, PNG, BMP, and JPEG. Settings are "sticky"
via the io_graphs UAT.

To do:
- Minimize graph drawing delays.
- Figure out why smoothing differs from GTK+
- Everything else at the top of io_graph_dialog.cpp
- Fix empty resets.

A fair amount of code was copied from TCPStreamDialog. We might want to
subclass QCustomPlot and place the shared code there.

Move common syntax checking to SyntaxLineEdit.

Move some common code from ui/gtk/io_stat.c to ui/io_graph_item.[ch] and
use it in both GTK+ and Qt.

Make the io_graph_item_t array allocation in io_stat.c static. The
behavior should be identical and this gives us additional compile-time
checks.

Change-Id: I9a3d544469b7048f0761fdbf7bcf20f44ae76577
Reviewed-on: https://code.wireshark.org/review/435
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Gerald Combs <gerald@wireshark.org>
2014-04-07 20:56:42 +00:00
Alexis La Goutte 2a9294356a Add Export PDU Dialog (Wireshark Qt)
Rebase with last change and add Logcat export

Change-Id: Idc9b444b1bf14b95ff60e8466e94f7eecd875b47
Reviewed-on: https://code.wireshark.org/review/14
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-12 09:29:43 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04 14:27:33 +00:00
Michal Labedzki 579e7e19ce Wireshark: Add option to choose format type of capture file
The best heuristic can fail, so add possibility to manually choose
capture file format type, so not correctly recognize file format can be
loaded in Wireshark.

On the other side now it is possible to open capture file
as file format to be dissected.

Change-Id: I5a9f662b32ff7e042f753a92eaaa86c6e41f400a
Reviewed-on: https://code.wireshark.org/review/16
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
Tested-by: Evan Huus <eapache@gmail.com>
2014-02-25 17:43:13 +00:00
Alexis La Goutte 3aaa131000 On 'You have unsaved packets' dialog, expected D or <Alt>D to use as accelerator to discard and S or <Alt>S of save [Wireshark Qt].
From me : Add window title and fix missing text (Do you want to ....)

Change-Id: I1448d7b85ad9490a92dac7e89d9fd2fdb51a145e
Partial-Bug: 9003
Reviewed-on: https://code.wireshark.org/review/239
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-02-17 21:46:06 +00:00
Gerald Combs 648769497a Fix a Qt version comparison.
Change-Id: I7df90d53a2d8f29042994bd0c2bc7bf4450fab10
Reviewed-on: https://code.wireshark.org/review/177
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-02-11 19:46:10 +00:00
Gerald Combs 2a5618b5d1 Qt 5.2.1 for Mac has QtMacExtras but not QMacNativeToolBar.
Change-Id: I55e68a7fd84d36b50e6084cd82b51df7c91c6476
Reviewed-on: https://code.wireshark.org/review/159
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Gerald Combs <gerald@wireshark.org>
2014-02-10 20:07:57 +00:00
Martin Kaiser fba61a31be add ssl detection to proto_get_frame_protocols()
svn path=/trunk/; revision=54439
2013-12-24 13:44:00 +00:00
Guy Harris e2735b15e0 No libpcap, no capturing, no capture interfaces. Ifdef the entire
capture interfaces dialog code, *and* the code that calls it, under
HAVE_LIBPCAP.

Still more stuff to remove from the no-pcap UI, such as the Capture
menu, the capture filter in the main window, and the list of interfaces
in the main window.

svn path=/trunk/; revision=53582
2013-11-25 21:50:58 +00:00
Alexis La Goutte 43b1f47695 From Thomas ERSFELD (GSoC13) : Add Capture interface dialog window
* Reuse sparkline from welcome
* Split settings in tab (!= GTK)
* No all feature work (Work In Progress...)
* ...

Comments (and review) are welcome !

svn path=/trunk/; revision=53563
2013-11-25 14:15:49 +00:00
Gerald Combs b3a24c5cc4 Replace similar code with a common routine.
svn path=/trunk/; revision=53519
2013-11-23 01:06:30 +00:00
Gerald Combs 213d47a82e Fix packet list selection signaling.
It looks like resetting the packet list model during freezing and
thawing disconnects the selection changed signal between the model and
the main window. Rename the packet list's setMenusFollowStream signal to
packetSelectionChanged and use it to trigger menu updates in the main
window.

svn path=/trunk/; revision=53516
2013-11-22 17:59:15 +00:00
Michael Mann 64c687346b Remove packet_info->ipproto and packet_info->ethertype uses in the GUI. Convert to walking packet protocol list looking for desired protocols.
I may eventually switch this to use proto_* values instead of strings, but just the addition of the loop is more jarring as compared to the simple comparing of ip or ethernet values.  But it should lead to a smaller (less protocol specific) packet_info structure.

svn path=/trunk/; revision=53476
2013-11-21 16:42:10 +00:00
Guy Harris db25270df8 Move the epan/filesystem.c routines to wsutil; they're not specific to
packet dissection, they're specific to the entire Wireshark suite of
programs.

svn path=/trunk/; revision=53377
2013-11-17 02:55:14 +00:00
Gerald Combs b0063a025b Highlight selected sequence diagram items.
Create a new dialog each time the user follows a stream. A lot of the
follow code seems to assume one and only one dialog so there are likely
outstanding bugs.

Don't use the global cfile (should we deprecate its usage?). We want to
move closer to multiple documents, not further away.

Clean up after ourselves. Free our payload list and unlink our temp
file. Make a bunch of gchar*s QStrings. Make sure our destructor gets
called and use it.

Make member variable and method names more consistent.

svn path=/trunk/; revision=53306
2013-11-13 22:18:01 +00:00
Gerald Combs e78924d5a4 Use the correct event filter.
From Richard Moore via bug 9410.

svn path=/trunk/; revision=53239
2013-11-10 17:55:26 +00:00
Gerald Combs 46a0d3644d Try to make the animation a little more natural.
svn path=/trunk/; revision=52992
2013-10-31 00:01:51 +00:00
Gerald Combs 60d6458150 Move the geometry shenanigans a bit further ahead in the startup
sequence. Fix some prefs logic.

svn path=/trunk/; revision=52991
2013-10-30 23:54:46 +00:00
Gerald Combs b17d987960 Fix maximized geometry behavior on non-OS X systems.
svn path=/trunk/; revision=52990
2013-10-30 23:23:24 +00:00
Gerald Combs 8f21bfe46f Fix a comparison.
svn path=/trunk/; revision=52989
2013-10-30 23:14:11 +00:00
Gerald Combs 9075922f42 Add initial support for geometry settings in the main window.
In the current Qt startup sequence the main window + splash screen is
displayed before the main preferences are loaded which means we can't
immediately apply the correct geometry. For now, use an animation to
morph from the default to the saved geometry after the prefs are loaded.

Get rid of main_do_quit() (Qt) and main_window_exit() (Qt+GTK). It looks
like they were unused.

Add wsApp->isInitialized() and use it to see if we should exit() when
the main window is closed. Otherwise we won't shut the application down
and clean up properly.

svn path=/trunk/; revision=52988
2013-10-30 22:39:52 +00:00
Gerald Combs 13c1c9daf7 PacketList and ProtoTree need access to MainWindow at initialization
time in order to fill in their respective context menus. R52386 broke
that. Fix it and add comments about handling reparenting. Fixes bug
9265.

svn path=/trunk/; revision=52600
2013-10-14 16:54:41 +00:00
Gerald Combs 564ca2d5e9 Try to fix Qt compilation when libpcap is disabled.
svn path=/trunk/; revision=52552
2013-10-11 21:26:26 +00:00
Gerald Combs 259768dc1a Remove GTK+ and global cfile dependencies from file_dlg_win32.c.
Move the declaration of set_last_open_dir() to ui/util.h. It still
has separate GTK+ and Qt implemenations. We might want to move it to
ui/util.c at some point. Remove a lot of unnecessary GTK+ includes.
Remove most of the references to the global cfile while we're at it.

svn path=/trunk/; revision=52542
2013-10-11 17:20:50 +00:00
Gerald Combs c37cd6b66f Fix the white-rectangle-at-startup artifact with the help of GammaRay[1].
Make extra_split_ a member variable again. Make it and master_split_
full-on values. Set various parent/child relationships at startup
so that each widget is associated with a layout (which appears to be
the actual fix).

Make the throttled startup delay huge so that it's easier to browse
using GammaRay.

[1] https://github.com/KDAB/GammaRay

svn path=/trunk/; revision=52386
2013-10-05 22:39:49 +00:00
Gerald Combs 80d1fde12a Delete extra_split if we're not using it. This keeps its handle from
showing up in the main window. Make it local to layoutPanes().

svn path=/trunk/; revision=52211
2013-09-25 00:26:36 +00:00
Gerald Combs 6986eb4866 Move a lot of includes from follow_stream_dialog.h to
follow_stream_dialog.cpp. Remove the ones that we don't use. Use
QMessageBox in place of simple_dialog.

Move IP6OPT_HOME_ADDRESS and related definitions to packet-ipv6.c. It
looks like we only use it there and it conflicts with WinPcap.

Mark some items unused.

svn path=/trunk/; revision=51951
2013-09-11 17:39:49 +00:00
Alexis La Goutte 80f9326b2f From Thomas ERSFELD (GSoC13)
Add TCP/UDP/SSL Follow feature to QtShark

Known issue :
* Duplicate code with GTK (function need follow_info_t struct but in GTK there is some GWidget variable in struct)
* Sometimes TCP Follow fail...

svn path=/trunk/; revision=51883
2013-09-09 19:30:30 +00:00
Evan Huus 259ebc5269 Respect the other layout preference in qtshark: which pane goes in which spot.
svn path=/trunk/; revision=51723
2013-09-03 16:06:20 +00:00