Commit Graph

477 Commits

Author SHA1 Message Date
Stig Bjørlykke ebdaace002 Lua: Added reload_lua_plugins
This makes it possible to trigger reloading Lua plugins from
within a Lua plugin.  This can be used when having a plugin to
update local plugins from a external source.

Renamed reload() to reload_packets() to clarify what's reloaded,
and added a alias (marked as obsoleted) from reload().

Change-Id: I4e529992af5f651613950329e73718dbda317d2e
Reviewed-on: https://code.wireshark.org/review/13024
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-01-11 07:43:36 +00:00
Stig Bjørlykke 2440f534b1 Qt: Fix testCaptureFileClose without packets
In MainWindow::testCaptureFileClose() we must always stop a running
capture if closing, even if not having any packets, because
cf_close() will fail (assert) if still in progress.

This fixes an issue (crash) when closing the application with
a running capture without packets.

This also fixes restarting current capture without packets, both
with and without "Confirm unsaved capture files".

Bug: 11981
Change-Id: Id0655fcc799682a4f45c855bc2e76386dffc35a5
Reviewed-on: https://code.wireshark.org/review/13121
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-01-10 19:23:19 +00:00
Gerald Combs 308b653da2 Qt: Queue up redissection.
Make the WiresharkApplication::packetDissectionChanged →
MainWindow::redissectPackets connection queued rather than direct.
redissectPackets eventually calls update_progress_dlg, which processes
UI events.

This should keep the profile dialog from destroying itself prematurely
in a nested event loop when the user hits "OK".

Bug: 11979
Change-Id: I7276e08c1911708c3aca5ff05ab6a40bfc336add
Reviewed-on: https://code.wireshark.org/review/13134
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-01-08 21:44:48 +00:00
Alexis La Goutte 936359053a Qt: Add gui.prepend_window_title option
Bug: 11102
Change-Id: I659b6be4652a65542c217370e01340e4696c0e31
Reviewed-on: https://code.wireshark.org/review/12653
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-12-29 18:01:27 +00:00
Alexis La Goutte 6c42a103e8 Qt: Add support of gui.window_title
Ping-Bug: 11102
Bug: 11691
Change-Id: I7b1673ffafcda644f4905265061ba11733dd91d3
Reviewed-on: https://code.wireshark.org/review/12650
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-12-29 18:00:47 +00:00
Alexis La Goutte f145108f5e Qt: Remove usage of setWindowFilePath
Change-Id: I29591709d88d1858e44c753d09e4a29d0f28ce53
Reviewed-on: https://code.wireshark.org/review/12781
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-12-29 18:00:14 +00:00
Michael Mann ea2a3ac402 Initialize Qt info_data_t structure in constructor.
GTK and TShark should already have structure initialized to 0 because they are global variables.

Change-Id: I43a38c58f32967d201ddf78e450b2483f28f8bd6
Reviewed-on: https://code.wireshark.org/review/12847
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-23 18:22:38 +00:00
Stig Bjørlykke 8bd135366e Added HAVE_LIBPCAP guards
The info_data struct is only when HAVE_LIBPCAP.

Change-Id: I30a3f974cbe3c1474bfe288b222f5871d674bada
Reviewed-on: https://code.wireshark.org/review/12846
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-23 12:11:21 +00:00
Roland Knall 35ee09e0f0 capture_info: Fix initialization of packet counter
g_hash_table_destroy will crash, if it is called on
 non-initialized memory. For some reason, this does not happen
 with other glib lists (e.g. GList seems to guard cleanly).

 This change initializes at the earliest possible time the
 packet counter hash with NULL

Change-Id: Ice66652fc9639d10b49d006ecbe80efe3f41e2ff
Reviewed-on: https://code.wireshark.org/review/12841
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-23 11:35:25 +00:00
Michael Mann 39bdeb2706 Confirm discarding data before restarting capture.
Modify existing MainWindow::testCaptureFileClose() to handle restart scenario.

Bug: 9605
Change-Id: Ie57624ca482b050745474f5e1c61343f60292a42
Reviewed-on: https://code.wireshark.org/review/12733
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-21 13:26:30 +00:00
Stig Bjørlykke e73fc7e51e Qt: Removed applyRecentColumnWidths from recentFilesRead
Adjusting column widths from recent settings is only needed
when columns has changed.

Don't recreate the columns when changing timestamp options or
name resolution, only reset columns.

Change-Id: I4c9a9f63c34542935dd282188d98b2b5b013c5f3
Reviewed-on: https://code.wireshark.org/review/12579
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-13 18:50:53 +00:00
Pascal Quantin afaf929d0d Qt: various fixes to VoIP calls / RTP player windows
- Flush any remaining tapped packets before emitting captureFileRetapFinished().
  This ensures that all packets have been treated before returning from retapPackets().
- Remove VoIP tap listeners when captureFileRetapFinished() is emitted.
  This avoid summing stats each time the RTP player is opened, leading to wrong
  information in VoIP calls window
- Change voip_calls_tapinfo_t redraw member from a boolean to bitmap so as to identify
  which tap should call the tapinfo->tap_draw() callback. This allows fixing a race condition
  where the RTP player can be empty in Qt UI
- Reset some more statistics in voip_calls_reset_all_taps()

Change-Id: Ie7681702c81d338185c1813f2d340a437edf3a04
Reviewed-on: https://code.wireshark.org/review/12474
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-12-09 16:54:33 +00:00
Stig Bjørlykke d7ddebbfb2 Qt: Update menus with new recent settings when changing profile
Update all View options to new recent settings to reflect the changes.
Also show/hide toolbars and packet panes accordingly.

Change-Id: Idb07bd5c51c01810b1f4467d2401936dc533731b
Reviewed-on: https://code.wireshark.org/review/12405
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-03 14:58:58 +00:00
Stig Bjørlykke 6b7da34b4b Qt: Check display filter when changing profile
The Display Filter Macros may have changed and if a macro is currently
used in the display filter then cf_redissect_packets() will bail
out in an assert if trying to apply an invalid filter.

Change-Id: I842016360672d76d190454ce80ccc7604f2075b3
Reviewed-on: https://code.wireshark.org/review/12388
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-12-03 04:54:50 +00:00
Alexis La Goutte 78d664ce7e main_window: fix no previous prototype for function 'plugin_if_mainwindow_gotoframe' [-Wmissing-prototypes]
Change-Id: I2ac9d2250e8553b4cbd4146f931b618424dffdf5
Reviewed-on: https://code.wireshark.org/review/12304
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-30 20:49:57 +00:00
Guy Harris cc9e444b4e We *do* use setWindowModified; remove the XXX comment saying to do so.
Change-Id: I00ffc4c787681a6bf2c84da9e44b3b3a33c0cec5
Reviewed-on: https://code.wireshark.org/review/12039
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-22 18:48:06 +00:00
Stig Bjørlykke 358615019b Qt: Added translate for "Capturing from ".
Change-Id: Ibd7b47169229395e5468ee2422c3dab7abe36413
Reviewed-on: https://code.wireshark.org/review/12022
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-22 14:51:46 +00:00
Stig Bjørlykke a02fc3b094 Qt: Set normal window icon when capture file closed.
Also rename and use setDefaultWindowTitle() to set the window title
back to "The Wireshark Network Analyzer".

Change-Id: Ifa87d1a9b9140de4f256effdfca8485f65e2f839
Reviewed-on: https://code.wireshark.org/review/12025
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-22 14:49:37 +00:00
Stig Bjørlykke 13297438d9 Lua: Disable Reload Lua Plugins while reading file.
Hide the menu item if built without Lua.

Change-Id: I316cddd55064da590eb4167b495a7fb00a41581f
Reviewed-on: https://code.wireshark.org/review/11931
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-18 07:18:50 +00:00
Gerald Combs 7518a74dbb Qt: Fix a merge crash.
Update the logic in ui/qt/main_window.cpp:mergeCaptureFile to match
ui/gtk/capture_file_dlg.c:file_merge_cmd. This ensures that we don't try
to use a stale (and freed) read filter.

Call cf_set_rfcode in both.

Bug: 11718
Change-Id: I6da65e428bff39e907f45992bac7337880c02ce9
Reviewed-on: https://code.wireshark.org/review/11895
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-17 09:40:39 +00:00
Stig Bjørlykke 2dc3b98cca Qt: Removed obsolete comments.
Change-Id: I7c0905b38a668a7a6dcaeee6ec16761c9b5c0a55
Reviewed-on: https://code.wireshark.org/review/11901
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-17 07:39:40 +00:00
Alexis La Goutte d3f68e5766 Qt: avoid crash when use Go Next/Previous Conversation
Only enable this menu when there is a packet

Change-Id: I750f2af6e9f565afce83a5e84394cc96b3b071f9
Reviewed-on: https://code.wireshark.org/review/11868
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-17 07:35:14 +00:00
Pascal Quantin 4224aab345 Qt: do not clear display filter when merging files
The merge file dialog box contains a read filter, not a display filter.

Bug: 11713
Change-Id: Iff160e552e0440ea4c626d54d834d32f38dc54c2
Reviewed-on: https://code.wireshark.org/review/11875
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-16 20:40:08 +00:00
Gerald Combs 661c9771f6 Qt: Add go to next + previous packet in conversation.
Add "Go→Next Packet in Conversation" and "Go→Previous Packet in
Conversation" menu items. Make sure the shortucts ("Ctrl+." and
"Ctrl+,") don't get switched to "Cmd+." and "Cmd+," on OS X. "Cmd+," is
already taken by the preferences dialog.

Change-Id: Iab9c7f60fdcf55f12c055b4d0948019bf667ebc9
Reviewed-on: https://code.wireshark.org/review/11771
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-13 09:43:24 +00:00
Gerald Combs 757fe65474 Qt: Freeze+thaw the main window during nested operations.
As noted in main_window.cpp:

// Our event loop becomes nested whenever we call update_progress_dlg, which
// includes several places in file.c. The GTK+ UI stays out of trouble by
// showing a modal progress dialog. We attempt to do the equivalent below by
// disabling parts of the main window. At a minumum the ProgressFrame in the
// main status bar must remain accessible.

Move the freeze+thaw code from captureFileRetapStarted and
captureFileRetapFinished to its own set of member functions. Call them
when we {,un}mark and {,un}ignore packets and note that we should
probably call them elsewhere. Disable mark and ignore actions when we
freeze and restore their states when we thaw.

Bug: 11681
Change-Id: I6f015f7f5f6c98cd48ace2c87f43f48efe51a88b
Reviewed-on: https://code.wireshark.org/review/11690
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-11-11 05:28:10 +00:00
Gerald Combs 47172e7d51 Qt: Start adjusting icon sizes dynamically.
In the main toolbar get our initial icon size using the PM_SmallIconSize
pixel metric. On Windows this varies directly with the system text
magnification setting.

Pinging bug 11675 since we still need to adjust the icon sizes in the
filter edits, progress frame, status bar, and likely other places.

Ping-Bug: 11675
Change-Id: I53a78627ce850bd6dbd4628da481badee63a1208
Reviewed-on: https://code.wireshark.org/review/11605
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-11-08 19:51:25 +00:00
Gerald Combs d02104c9a6 Qt: Check for a sane window geometry.
On Windows (and probably X11) it's possible to set an offscreen window
geometry. Add a rect_on_screen function to qt_ui_utils and use it as a
sanity check in MainWindow::loadWindowGeometry.

If this doesn't work well (e.g. if we end up with dueling Qt and GTK+
geometries) we might want to create separate Qt and GTK+ preferences.

Bug: 11568
Change-Id: Icde1181671770356e87f07d584894ec3148e1bd2
Reviewed-on: https://code.wireshark.org/review/11584
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-11-05 23:39:58 +00:00
Martin Kaiser eafc94c9ac [Qt recent files menu] make sure that the "Clear Menu" item is retranslated
this item is created along with the list of recent files
it looks like our only option to update its translation is to rebuild the
list of recent files

Change-Id: If740571fb9c939d65ca4f1f432aadf22c38dcb27
Reviewed-on: https://code.wireshark.org/review/11462
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-03 12:21:36 +00:00
Gerald Combs 81bf8edc52 Update the taskbar icon when we start a capture.
Call both QMainWindow::setWindowIcon and QGuiApplication::setWindowIcon
when we switch between normal and capture icons. The former sets the
window title bar icon and the latter (depending on your OS and Qt version)
sets the taskbar or dock icon.

Change-Id: Ida523d423bef4df44696f6cd75208986c8787d0f
Reviewed-on: https://code.wireshark.org/review/11414
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-29 20:50:13 +00:00
Gerald Combs f449dcd8a5 Qt: Add the ability to add filter expressions.
Add a "+" icon to the display filter toolbar which allows the addition
of a new filter expression button. (Hopefully this will be the last main
window UI change before 2.0.)

Change-Id: I52bf56bf699dddb7b387b9f4de1bf8b35eb3c4ce
Reviewed-on: https://code.wireshark.org/review/11375
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-29 19:00:34 +00:00
Gerald Combs 9f8d00c174 Add preferences for related packets and the scroll bar minimap.
Add gui.packet_list_show_related and gui.packet_list_show_minimap.
Show_related enables and disables the related packet delegate.
Show_minimap enables and disables the minimap. Start calling it the
"intelligent scroll bar" since that's the best suggestion for a name
I've seen so far.

Leave them out of the Appearance preference pane for now.

Change-Id: I5869c446fda5c8e62d6b1e49a74d63ba3b117b0f
Reviewed-on: https://code.wireshark.org/review/11332
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-27 23:28:56 +00:00
Gerald Combs e70a23f49d Qt: Add a filter expression item to the display filter edit menu.
Add an item to the display filter bookmark menu which opens the filter
expression preferences. We also need an expression editor frame similar
to the column editor frame, but hopefully this will suffice until that
exists.

Change-Id: If4c159bb769f0f8e7f89db55f1c6fd7c0bf65c87
Reviewed-on: https://code.wireshark.org/review/11315
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-27 19:28:19 +00:00
Gerald Combs 08e44b8b43 Convert SIP statistics to the stat tap API.
It looks like this one fell through the cracks because it dynamically
registered itself via register_tap_listener_gtksipstat and wasn't listed
in the "/Telephony/" path in main_menubar.c.

Ping-Bug: 11638
Change-Id: I4c82b36d204207c81e82a19efce98b6a091351ca
Reviewed-on: https://code.wireshark.org/review/11293
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-27 15:21:12 +00:00
Michal Labedzki ae1c81d6bb Qt: Add switch between Capture and FileFormat
You can switch now between Capture mode and FileFormat of it.
This works only if there is MIME FileFormat dissector of opened file.

Change-Id: I9e98e972775561cfbe731ee1a1b99300d119efc6
Reviewed-on: https://code.wireshark.org/review/10090
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-10-17 09:20:47 +00:00
Martin Mathieson 3221dbf542 LTE RLC graphs - initial version
Change-Id: Ic5f2c353ae1f787ac19cb575a938cb093ff5f6dc
Reviewed-on: https://code.wireshark.org/review/10930
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-10-11 21:59:45 +00:00
Gerald Combs 2496aed28e Qt: Don't update the recent list while capturing.
If a recent file is on a network share we'll create traffic which can
show up in the capture.

This doesn't fix the issue entirely, e.g. if you're capturing in one
instance of Wireshark and have another one open. The proper fix in that
case is to switch to QFileSystemWatcher as described at the top of
::WiresharkApplication.

Ping-Bug: 11546
Change-Id: If21f1bb213fe1d862c09b1b2edd78c8baf983461
Reviewed-on: https://code.wireshark.org/review/10774
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
2015-10-05 02:58:28 +00:00
YFdyh000 05e0375659 Remove tr() for setObjectName
Change-Id: I4561ded123df3c2152da543e8a6786cb8b386dd5
Reviewed-on: https://code.wireshark.org/review/10790
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-05 02:57:45 +00:00
Martin Mathieson 32849b2877 LTE RLC Statistics Dialog
Change-Id: Id0af0227a398fd06ba37c23097fa6809db432d0f
Reviewed-on: https://code.wireshark.org/review/10669
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-09-28 16:14:06 +00:00
Martin Mathieson 29be7bf82f LTE MAC Statistics Dialog
Change-Id: I2463fdc0ac209e92d2f2c1abf9da22866d6e22e8
Reviewed-on: https://code.wireshark.org/review/10578
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-09-23 16:20:50 +00:00
Pascal Quantin f2c5dee77c Qt: refresh column content after editing it
Also save the new value in preferences

Change-Id: Ie1a942669ebc2824c999621ecd948425b3b49574
Reviewed-on: https://code.wireshark.org/review/10500
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-13 18:54:12 +00:00
Gerald Combs b4e972b729 Fix a bunch of leaks found by Valgrind.
Change-Id: I8862ed15d354aee487bacd80ab5fb4918423287e
Reviewed-on: https://code.wireshark.org/review/10487
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-11 20:37:09 +00:00
Gerald Combs 2ec5e5484e Add the Telephony→LTE menu.
Add an empty (for now) Telephony→LTE menu ahead of upcoming changes.

Change-Id: Ic6686b653d2fa51f1eb6854ab0952f92d679bccc
Reviewed-on: https://code.wireshark.org/review/10452
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-09 20:13:14 +00:00
Roland Knall 6f1c9fd432 PluginIF: Parent menu and goto frame
The developer may provide a given menu as parent menu for the
 sub menu. If the menu does not exist, the main menu will be used.

 Has been implemented for Qt as well as GTK.

Change-Id: I3f26684862fd0b08f59eeb4d6f4a24ce7dc3d428
Reviewed-on: https://code.wireshark.org/review/9939
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
2015-09-08 11:03:35 +00:00
Stig Bjørlykke 91d863cc16 Qt: Fix use-after-free pattern
This fixes crashes due to use of deallocated memory in:
- Export Packet Dissections
- Merge Capture Files
- Edit Packet Comment

Change-Id: I3dab8c0735eb5e642d6a4580d20bc3c81cf1345b
Reviewed-on: https://code.wireshark.org/review/10392
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-09-08 06:30:02 +00:00
Gerald Combs 628f65a984 Keep focus rects from showing through the welcome screen.
Change-Id: I5785890c70f3a3f6f4ccb0c7b609a19e5d2b88c9
Reviewed-on: https://code.wireshark.org/review/10406
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-06 19:01:57 +00:00
Gerald Combs 0e9389bb47 Display filter edit updates.
Have the bookmark button operate on saved display filters, similar to
the "Filter:" button in the GTK+ UI. Expose the saved display filter
list via a popup menu.

Update the display filter icons. Make the "Apply" button wider. Remove
the old icon assets.

Add a StockIconToolButton class along with note explaining why it's
necessary.

Rename the "Filter Bookmarks" preference to "Filter Shortcuts".
Suggestion for a better name are welcome.

Change-Id: I0082d3f01b017253fa75e51cbff9beb17c41a209
Reviewed-on: https://code.wireshark.org/review/10390
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
2015-09-06 01:43:21 +00:00
Gerald Combs db2fdfd7ef Fixup the main window tab order.
Make sure the packet list is directly after the display filter edit in
the main window tab order. When we press enter in the display filter
edit, go to the next child in the tab order.

Change-Id: If46e178365dbd59feb5985e9f8fa8b55d004d864
Reviewed-on: https://code.wireshark.org/review/10342
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-01 17:39:04 +00:00
Gerald Combs 377d215e0f Convert the MTP3 stats to new "generic stat API".
Convert both the MTP3 statistics and summary. As with the GSM stats this
is mostly untested.

Change-Id: I7af8d5f21c8161dc95f7f2c710f32364b6f6a431
Reviewed-on: https://code.wireshark.org/review/10338
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-31 23:06:09 +00:00
Gerald Combs f19a173a84 Speed up column sorting.
The GTK+ UI sequentially dissects and caches column strings for all rows
before sorting a column. Do the same in the Qt UI, which can improve
performance considerably.

Don't colorize packets when sorting in the Qt UI unless it's necessary.

When sorting in the Qt UI, let the user cancel the initial packet
dissection.  Note that we'll need to replace std::sort in order to
cancel out of sorting.

Use a pre-allocated and pre-compiled GRexex when we prime columns. Note
that we probably shouldn't parse a regular expression there.

Cache the last result of proto_registrar_get_byname.

Note performance hot spots elsewhere in the code.

To do:

GeoIP in packet-ip.c is pretty slow.

Bug: 11467
Change-Id: Ib34038fee08ef0319261faeffc4eca01e52f4bd3
Reviewed-on: https://code.wireshark.org/review/10275
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-28 02:54:20 +00:00
Gerald Combs 01fb470acd More retapping fixups.
Disable the main file close and reload actions while we're retapping,
otherwise many of our dialogs will crash.

Disable the TapParameterDialog filter entry while we're retapping. This
keeps us from enabling the "Apply" button when we shouldn't.

Don't prematurely disconnect our signals in WiresharkDialog.

Change-Id: Iaf507eb4503b9c296766f109f2b8c71343263982
Reviewed-on: https://code.wireshark.org/review/10274
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-27 21:27:32 +00:00
Stig Bjørlykke 6151946ffe Qt: Fixed some memory leakages
Change-Id: I5bccf706001f9ff41197ed13b1be5a7404ca594f
Reviewed-on: https://code.wireshark.org/review/10251
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-27 09:14:29 +00:00
Alexis La Goutte db2692c44c Qt (main_window) fix no previous prototype for '...' [-Wmissing-prototypes]
Change-Id: I43901d37817f9b79d508336253e766d740939e70
Reviewed-on: https://code.wireshark.org/review/10003
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-12 21:04:30 +00:00
Stig Bjørlykke ecc4f756bd Added Reload Lua plugins.
This is initial support for reloading Lua plugins without
restarting the application.

Still todo:
- Deregister FileHandlers
- Support deregister ProtoField with existing abbrev (same_name_hfinfo)
- Add a progress dialog when reloading many plugins
- Search for memory leakages in wslua functions

Change-Id: I48870d8741251705ca15ffe1068613fcb0cb18c1
Reviewed-on: https://code.wireshark.org/review/5028
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-11 12:09:07 +00:00
Gerald Combs 9fd3bcc25e Add an elide mode preference for the Qt packet list.
Change-Id: I081cc1e9b2a0eea7f0a3ef1157561c50beb4c4db
Reviewed-on: https://code.wireshark.org/review/9902
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-06 21:06:34 +00:00
Gerald Combs b7f5eaa524 Convert the GSM MAP stats to new "generic stat API".
Convert both the MAP statistics and summary. As with the GSM A stats
this are mostly untested.

Change-Id: Ibd3a7346b09d1401e78724c0197ec2a38deb97a3
Reviewed-on: https://code.wireshark.org/review/9883
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-06 01:59:10 +00:00
Gerald Combs 4d673b24cd Convert Camel tap stats to new "generic stat API".
Migrate the Camel stats similar to the recent BOOTP and H.225
migrations.

Change-Id: If82617068ff4b8fa186899f66dc34a08585f66cb
Reviewed-on: https://code.wireshark.org/review/9865
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-04 19:12:00 +00:00
Gerald Combs d8d3c52f1e Use an ellipsis character instead of three dots.
The OS X Human Interface Guidelines at

https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/OSXHIGuidelines/TerminologyWording.html#//apple_ref/doc/uid/20000957-CH15-SW3

says:

"Be sure to create the ellipsis character using the key combination
 Option-; (Option-semicolon). This ensures that an assistive app can
 provide the correct interpretation of the character to a disabled user.
 If you use three period characters to simulate an ellipsis, many
 assistive apps will be unable to make sense of them. Also, three period
 characters and an ellipsis don't look the same because the periods are
 spaced differently than the points of an ellipsis."

The Windows desktop applications guidelines has a section on ellipses:

https://msdn.microsoft.com/en-us/library/windows/desktop/dn742478.aspx

but doesn't specify the a single glyph vs three dots.

The GNOME HIG at

https://developer.gnome.org/hig/stable/typography.html.en

says "Take Advantage of Unicode" then specifically says to use U+2026
HORIZONTAL ELLIPSIS.

Remove the ellipsis from "Find Next" and "Find Previous". Neither
requires user interaction.

Change-Id: I0e6c28bb8b3a84b242731e2ca96f1a6f6f42c303
Reviewed-on: https://code.wireshark.org/review/9833
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-31 18:55:06 +00:00
Gerald Combs d6f59cd10f Main menu and packet list menu updates.
Enable and disable packet list-relasted menu items in one place. Add
"Colorize Conversation" items to the packet list context menu.

In the GTK+ UI we tend to disable entire menus, which makes their items
inaccessible. Try not to do that in the Qt UI so that menu items are
always visible even if they're disabled.

Remove commented items which are now complete.

Change-Id: I69b878b45334bf88014694b1bf016278fa55a94b
Reviewed-on: https://code.wireshark.org/review/9819
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-29 22:38:43 +00:00
Gerald Combs 01bc31cded Fixup packet list context menu behavior.
Add logic to setMenusForSelectedPacket for setting the enabled states
for the "Apply As" and "Prepare A" actions. Update the PacketList
context menu code to fill in the right filter at the right time.

Exit out of setMenusForSelectedTreeRow if the packet list has focus so
that we don't clobber the enabled states of various actions.

Take the "Apply As" and "Prepare A" context menu titles from their main
window counterparts. Remove actionApply_as_Filter and
actionPrepare_a_Filter.

Remove completed to-do items.

Change-Id: I8f6f538bb7786d8df02a999f3b449dfde640e847
Reviewed-on: https://code.wireshark.org/review/9810
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-27 23:26:04 +00:00
Gerald Combs e30a0ff765 Add manual name address resolution.
Make it an editor frame instead of a dialog similar to the column editor
and prototocol preference editor.

Change-Id: If1a0cdf02dcab0eca98e8d39c94a3c2fe236df5a
Reviewed-on: https://code.wireshark.org/review/9743
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-21 22:43:05 +00:00
Gerald Combs 63edb9904f Add general a busy progress indicator.
Rename CaptureFileProgressFrame to ProgressFrame. It's not limited to
capture files. Add "busy" routines there and in MainStatusBar. Show a
busy indicator while sorting columns.

Use toByteArray().constData instead of .data. I'm not sure if it matters
in our case but it's more correct.

Change-Id: Ibe35fee9b9dd3fabb5ff8ddcc21f6bf59dec4af6
Reviewed-on: https://code.wireshark.org/review/9720
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-20 19:48:43 +00:00
Gerald Combs d2acb04b4c Add the RTP Stream Analysis dialog.
Combine the GTK+ RTP Stream Analysis and RTP Graph Analysis dialogs into
one. Yell at the user less. Disable the Analyze RTP Stream menu item if
we don't have an RTP stream selected.

There are a *lot* of moving parts in this dialog. I've tested with the
few RTP captures I have but it's by no means complete.

"To do" items are listed at the top of rtp_analysis.cpp.

Change-Id: Id503977f069bebc46cc68bc749f0c9cbf4d37bf6
Reviewed-on: https://code.wireshark.org/review/9650
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-16 00:30:14 +00:00
Gerald Combs c305f08921 PacketList column fixes.
Add a columnsChanged slot to PacketList and move the column update code
from redrawVisiblePackets there. Make sure we call
packet_list_model_->recreateVisibleRows, which should fix the behavior
described in bug 11324. Call columnsChanged when we, uh, change columns.

Add a sectionMoved slot to handle column reordering.

Don't rebuild the column list when we update the widgets in the column
preferences frame.  Do enable and disable the "remove" button as needed.

Try to keep the user from removing all of the columns in both the packet
list and column preferences.

Left as an exercise for the reader: The GTK+ UI also fails when you
remove all of the columns via the preferences:

  packet_list.c:377:packet_list_sort_column: assertion failed: (col)

Bug: 11324
Change-Id: Id58cf98e42cbda9aa2fc370ea06b8bcc6098c8ca
Reviewed-on: https://code.wireshark.org/review/9591
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-13 02:36:41 +00:00
Gerald Combs d564ea9bea Qt: Add Colorize Conversation menu items.
Add the "View→Colorize Conversation" menu similar to the GTK+ UI. Add
the "Reset" item under the "Colorize Conversation" menu instead of the
top-level "View" menu. Make sure the "Reset" shortcut is Ctrl+Space even
on OS X. Normally Qt would convert it to Cmd+Space, but that's used by
Spotlight.

Add StockIcon::colorIcon and use it to create filled square icons.

Change-Id: I2af9e26d025cdaf97482422bbb9440e28e18d1ac
Reviewed-on: https://code.wireshark.org/review/9595
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-11 00:41:01 +00:00
Gerald Combs fdd07c4d3a Make sure we uncheck the "Find Packet" action.
Make sure we uncheck the "Find Packet" action when we're done finding
packets. Make the "Go To Packet" action checkable and ensure that it's
properly checked an unchecked as well.

Change-Id: I979cabfd950ec4807ebcd40664b44b600557cf48
Reviewed-on: https://code.wireshark.org/review/9577
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-09 17:33:59 +00:00
Gerald Combs a8faa04234 Qt: Add dynamic menu support.
Generalize the dynamic menu code and make it possible to connect
multiple types of actions to their corresponding slots.

Change-Id: Ib915ad5a666310e2a6e366fada006336820d1653
Reviewed-on: https://code.wireshark.org/review/9568
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-09 00:05:51 +00:00
Gerald Combs 4eca268935 Add SimpleStatisticsDialog.
To do:
- Refactor dynamic menu item placement.

Change-Id: I087de9f2fa3c2ff7dc08e5d54bc9c1b984fdd7b1
Reviewed-on: https://code.wireshark.org/review/9561
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-08 17:01:15 +00:00
Gerald Combs e91ca72a44 Qt: Add initial Lua support.
Add a FunnelStatistics class, which is the main interface between the Qt
UI and the Funnel API.

Add FunnelTextDialog, which implements the text_window, ProgDlg, menu,
and other routines. Add FunnelStringDialog, which implements dlg_new.

We currently only support "Tools" menu items (MENU_TOOLS_UNSORTED, aka
REGISTER_TOOLS_GROUP_UNSORTED). Add a disabled placeholder to the
"Tools" menu in case we don't load any scripts.

Use "struct progdlg" instead of needlessly casting to
funnel_progress_window_t.

To do:
- Add support for MENU_STAT_UNSORTED, MENU_STAT_GENERIC, etc.
- Make the firewall config generator a Lua script?
- Add FunnelGraphDialog? It seems like it would be useful to
  make QCustomPlot accessible to Lua scripts.

Ping-Bug: 9845
Change-Id: Iefff02e9032ed1853666f7902509ed08b431e7a7
Reviewed-on: https://code.wireshark.org/review/9523
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-07 20:49:30 +00:00
Gerald Combs fdb85029fd Add ServiceResponseTimeDialog.
Add ServiceResponseTimeDialog as a subclass of TapParameterDialog,
similar to StatsTreeDialog. Add initial plumbing for statistics menu
items and command line invocation.

Don't append "..." to menu item names. Don't add menu icons. In each
case this avoids repetitive UI clutter.

Change-Id: I463b95c93090160bb81d2e80b16aad389dc0bd6c
Reviewed-on: https://code.wireshark.org/review/8864
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-03 23:09:13 +00:00
Evan Huus 78e71f6f5a Remove the other g_hash_table_contains
Missed a bunch of them in g131f8f0.

Change-Id: I5b1df810a31c26c3ab3cd778f8774519283217c8
Reviewed-on: https://code.wireshark.org/review/9143
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-25 18:56:15 +00:00
Martin Kaiser 534d1d5eae Qt: use <> for including the generated ui_*.h files
this should make Visual Studio pick up the generated include files
from the build directory instead of the source directory (which may
contain lefovers from an in-tree build)

Change-Id: Ie3de4cdd85a2865e203118a42ab10f443372f03b
Reviewed-on: https://code.wireshark.org/review/9129
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-25 17:11:19 +00:00
Roland Knall acc581081e Plugin Interface: Add GUI callbacks
Rename ext_menubar to a more appropriate plugin_if.

 External menus can be implemented by plugins to present
 additional menus for deep-packet analysis. One side-effect
 of such menus being implemented as plugins is, that they
 are being executed in different threads and therefore can
 only use limited access to the main GUI. Also, there is
 no safe cross-gui (GTK and Qt) way for many features.

 This patch implements a first functionality, by which a
 plugin implemented using ext_menubar can apply a display
 filter to the main view.

 For now the implementation supports filtering, as well as
 saving a preference.

Change-Id: Iffe4caa954bbeb8ce356352de4dae348a50efba9
Reviewed-on: https://code.wireshark.org/review/8773
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-25 16:23:08 +00:00
Martin Kaiser cb84022296 Qt: fix crashes when Wireshark is closed while running a capture
if we haven't captured any packets yet, don't display a warning about
unsaved changes

make sure that we're not running into a scenario where
MainWindow::testCaptureFileClose() tries to close the capture file at
the same time as the pipe handler who sees an eof on the pipe

cf_has_unsaved_data() should return false if we have a temporary file
that contains no packets

Change-Id: I18d75bd658b85d45dd3313d49e2cd654c6300de5
Reviewed-on: https://code.wireshark.org/review/9109
Reviewed-by: Evan Huus <eapache@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-25 15:55:36 +00:00
Evan Huus 89cc85b5ef Disable "Refresh Interfaces" when capturing
It breaks restarts, and doesn't do anything useful at this point anyways.

Bug: 11176
Change-Id: I6a010becf851fea8690b445874b29b54546fb2e3
Reviewed-on: https://code.wireshark.org/review/9106
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-24 21:43:13 +00:00
Alexis La Goutte 17c59f5090 Qt: Add Reload button on MainToolBar
Add @2x versions of x-capture-file-reload as well.

Change-Id: I08819cf66903884e0344a4f9bcd891befb582e90
Reviewed-on: https://code.wireshark.org/review/9066
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-06-24 17:10:01 +00:00
Gerald Combs 1dc608a05e Morph ProgressBar into CaptureProgressFrame.
Switch from a plain QProgressBar to a QFrame with a QProgressBar and a
stop button.

Add a stop_flag boolean to the capture_file struct.

To do:
- Start adding the progress bar to dialogs.
- Don't complain so loudly when the user stops a capture.

Change-Id: Iedd1d7d79f2044f1a53e4fb22186d25930a3ef03
Reviewed-on: https://code.wireshark.org/review/9029
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-23 06:06:37 +00:00
Gerald Combs 9c28594529 Add a preferences editor frame.
This replaces the single preference editor dialog in the GTK+ UI.

Change-Id: I10e030981e9f7d1ec121811593586b65cf0797c5
Reviewed-on: https://code.wireshark.org/review/8966
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-18 00:46:50 +00:00
Gerald Combs 053f792d30 Fix the Qt main window popup behavior.
By default QMainWindow::createPopupMenu shows a checkable list of
toolbars which aren't synced with our actions under the View menu.
Replace it with a version that handles all the main window widgets.

Change-Id: I5f5c23880133e97e815d3bbbf19ea3bacc482096
Reviewed-on: https://code.wireshark.org/review/8958
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-17 03:53:33 +00:00
Gerald Combs 26dacfc8c3 Qt: Add protocol preferences menus.
Add protocol preferences in the packet list and packet detail context
menus. Note that we need a PreferencesEditorFrame in the main window for
editing numeric and string preferences. For now we just show the prefs
dialog.

Change-Id: Ice0cc8e9bc25963cc14aa47698f042f2a73088d8
Reviewed-on: https://code.wireshark.org/review/8957
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-17 01:25:27 +00:00
Gerald Combs ece4b01f21 Add the wireless toolbar.
Add the wireless toolbar to the Qt UI.

Start adding AirPcap support to ui/80211_utils. Add FCS validation
routines to ws80211_utils.

Move a bunch of AirPcap routines that require epan from caputils to
ui/gtk. They were required for driver key management, which we'll
leave to the AirPcap Control Panel in the Qt UI.

Move frequency-utils to wsutil.

Change-Id: I44446758046621d183f5c2ba9f6526bf01e084f1
Reviewed-on: https://code.wireshark.org/review/8910
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-16 03:45:54 +00:00
Gerald Combs 60ab49592b Accept drop events immediately.
Accept drop events before opening our capture file instead after.

Change-Id: I48fe1cd1e3b5e6f7b076aaa0e3a0d035938a5af7
Reviewed-on: https://code.wireshark.org/review/8929
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-15 23:53:27 +00:00
Gerald Combs f661b3c99e Include QUrl.
It's apparently required by Qt4.

Change-Id: Ic5f32b9acd0a244477b7631bff39b3ed5ba86a39
Reviewed-on: https://code.wireshark.org/review/8918
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-14 18:30:31 +00:00
Gerald Combs d42e0f7f12 Qt: Enable Drag and Drop in the main window.
Change-Id: I446163dd9e1a277118caab2f7296a3605cb23fd5
Reviewed-on: https://code.wireshark.org/review/8917
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-14 18:06:35 +00:00
Guy Harris 2e76bb466a Use pid_t on UN*X, and HANDLE on Windows, for the process ID.
This avoids type punning; at least with Xcode 7 beta on El Capitan beta,
that produces warnings that get turned into errors.

Change-Id: I57f47455b9630f359828c07c92a190b5cb33816f
Reviewed-on: https://code.wireshark.org/review/8862
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-10 00:30:57 +00:00
Anders 4e60e8fb39 [MSVC 2015] Use intptr_t for "pointer stored as int" to make MSVC happy.
Change-Id: I5dbbea8527a8bb73b17e5a8a5611c3923d82459c
Reviewed-on: https://code.wireshark.org/review/8852
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-09 14:13:14 +00:00
Gerald Combs ec3f923e3e Add the Display Filter Expression dialog.
Changes from the GTK+ UI:
- The display filter is built on the fly with immediate syntax feedback.
- Slightly different layout.
- You can search for fields.

Make the plain SyntaxLineEdit a bit more plain.

Bug: 11128
Change-Id: I06a48cd7b9ba7b9dc193b0199540aede4eb62fa7
Reviewed-on: https://code.wireshark.org/review/8742
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-03 02:27:00 +00:00
Gerald Combs b18309c07f Qt: Update the status bar when saving.
Plumb in more capture file callbacks. Add common functions for setting
the status bar file information. Add and update code to match the GTK+
status bar behavior.

Make sure we update the capture file length when rescanning.

Bug: 10943

Change-Id: Ie84c7a57ee421d57ba3477f8dde3847aaafa1cd1
Reviewed-on: https://code.wireshark.org/review/8594
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-23 00:31:08 +00:00
Gerald Combs e9d8769d5b Qt: Don't crash after "Save As".
Rename "stay_closed" to "dont_reopen" to match cf_save_records and its
GTK+ equivalent. Set "dont_reopen" to FALSE when we "Save As", otherwise
we crash on Windows.

Bug: 10904
Change-Id: I4bb10abc230439e10cc55ffbd5595bfbc0a34b6f
Reviewed-on: https://code.wireshark.org/review/8592
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-22 20:05:04 +00:00
Gerald Combs a04a894731 Qt: Stop tapping when the I/O Graph dialog closes.
Add a setCaptureStopFlag function to ProgressBar. Add a stopTapping
function and setCaptureStopFlag signal to CaptureFile. Use the new
plubming to stop tapping when the IO Graph dialog closes.

Bug: 10116
Change-Id: Ic46814eed18933f511d9d1ff37e2e7918741f353
Reviewed-on: https://code.wireshark.org/review/8480
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-15 21:48:03 +00:00
Gerald Combs 2156413bf9 Qt: Column preference fixes.
Don't call redrawVisiblePackets in PacketList::sectionResized. Otherwise
we trigger the crash in bug 11179. Call recent_set_column_width instead.

Clean up the slots called when column preferences change and when recent
column widths change.

Update our column visibility in redrawVisiblePackets.

Use recent_get_column_width when writing the recent file. columnWidth
doesn't return a valid value when we're not visible.

Bug: 11179.
Change-Id: I34ab93d944b341e42129a1c8ff94ba8f7ad4f5fc
Reviewed-on: https://code.wireshark.org/review/8457
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-14 15:37:35 +00:00
Gerald Combs f77e02ccc6 Expert Info dialog.
Show all expert messages in a combined view. Group top-level items by a
(severity, group, protocol) tuple.

Let the user enable and disable messages via a check menu.

Add ProtoTree::goToField and expert_info_t.hf_index. Use them to jump to
what we hope is the afflicted item.

Enable the context menu only if the user has selected a packet item.

Add a free-form search field that matches expert summaries.

This differs from the GTK+ version but hopefully provides a smoother
workflow.

Bug: 10931
Change-Id: Ia12cb7c27cdea1634fa2798fb7e4c1b23bd16ad2
Reviewed-on: https://code.wireshark.org/review/8294
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-08 04:29:59 +00:00
Roland Knall 5727ebe689 extcap: Implement QT extcap options
Implementing a button in the interface list, to bring up
 the extcap options dialog, as well as a dialog, which will
 be generated depending on the selected extcap options.

Change-Id: I1733dc6a8c1a121089a9c353aff10bc4a53e86de
Reviewed-on: https://code.wireshark.org/review/8224
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-05-05 09:35:10 +00:00
Roland Knall 812d31122a ext_menubar: Change action name to remove warning
on_actionExternalMenu_triggered() triggered a warning, as no menu
 exists on the automatic UI configuration.

Change-Id: Ic3dc4c2c9e4c95ec4bbea01bd53af9a8c831e0d7
Reviewed-on: https://code.wireshark.org/review/8276
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-05-03 17:14:28 +00:00
Roland Knall eeed4d1121 UI: Implementing menus for plugins
Plugins may utilize the tap interface to provide special tools
 or analysis options, not otherwise available in Wireshark, or
 perhaps not allowed to be distributed freely. Up until now, those
 tools either had to start automatically, or could not be started
 at all, or had to be started separately.

 It should be possible, that those tools may be started using a
 menu entry directly from Wireshark. This interface tries to achieve
 exactly that.

 This interface uses a clean interface, which can be implemented in
 any plugin or dissector. Documentation for this has been added to
 README.plugins.

 Separators are only supported for now in the Qt interface, but
 URLs can now be added as a simple item, and the UI will use the
 same methods used for other URL calls to open them.

Change-Id: I170107dafb66f6badaa864d05a9091e5cbbf52c2
Reviewed-on: https://code.wireshark.org/review/7865
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-04-14 04:00:39 +00:00
Pascal Quantin 461666bcd1 Qt: fix maximized state apply
Preferences are not loaded yet when we call MainWindow::loadWindowGeometry()
Anyway, prefs.gui_geometry_save_maximized should only be checked when saving preferences (MainWindow::saveWindowGeometry() method) like what we do in GTK UI

Change-Id: I8eb01a5f4f7672fbf5846bc576584e28f72d5e31
Reviewed-on: https://code.wireshark.org/review/7978
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-04-07 21:03:18 +00:00
Guy Harris ba0b348d28 Show a count in the status bar for all captures.
(I'd have said "for non-update-list-of-packets-in-real-time captures",
but that's too long for the holy Git "first line of the commit message
is a summary" rule.)

For non-update-list-of-packets-in-real-time captures, show a packet
count in the status bar.

Change-Id: I31670770e3772e9f772f0c9a6438fc6d053560aa
Reviewed-on: https://code.wireshark.org/review/7957
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-06 21:56:49 +00:00
Gerald Combs 8664de017f Qt: Constify a bunch of strings.
Change-Id: I601e429408fc042fc5b18a4750d40e260da47f43
Reviewed-on: https://code.wireshark.org/review/7535
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-05 20:17:29 +00:00
Alexis La Goutte 6878122187 Main window (Qt): Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: Ia8d37b33ee30f09cfe5e0cd00820d84e171deb1c
Reviewed-on: https://code.wireshark.org/review/7494
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-03-02 19:02:43 +00:00
Michal Labedzki 2d4817966e Qt: Automatically scroll the packet list.
Add an "Auto Scroll in Live Capture" action to the Go menu. It's in the
View menu in the GTK+ UI but it seems to make more sense as a navigation
item.

Use a timeout interval for automatic scrolling. I haven't run any tests
to see if this makes a difference but it would seem that the less
drawing we do during a high speed capture the better, particularly for
remote displays.

Update the x-stay-last icons.

Note that we might want to make prefs.capture_auto_scroll a "recent"
setting.

Mark auto_scroll_live and packet_list_check_end GTK+ only.

Bug: 10601
Co-authored-by: Gerald Combs <gerald@wireshark.org>
Change-Id: I645d27c0814f0e4a0d5b01ae68be366847e2522d
Reviewed-on: https://code.wireshark.org/review/7292
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-27 20:27:14 +00:00
Gerald Combs 8ae714da5b Remove a dead assignment found by Clang.
The code in question was copied from ui/gtk/capture_file_dlg.c. The dead
assignment there was removed in 68ceffe.

Change-Id: I605f181b623fbd87ab41505d30a79d7a4fe649df
Reviewed-on: https://code.wireshark.org/review/7419
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-26 18:23:34 +00:00
Gerald Combs 30ed6a1d72 Qt: Apply recent settings.
Add PacketList::applyRecentColumnWidths which set the packet list
column widths from our recent settings. Make sure it gets called at
startup and when we change profiles.

Save the packet list header state so that we can restore it when we
reset the model (i.e. freezing and thawing) and load a new capture file.
Save the state when the user resizes a column. As a side effect this
works around a weird bug that adjusts the width of column 1 at an
inopportune time.

Add a profileChanging signal so that we can save the main window geometry
in each profile.

Get rid of MainWindow::configurationProfileChanged. It was unused.

Apply saved pane widths and heights. Note that we might want to add a
separate pair of recent settings for the Qt panes.

Use the last opened directory in the capture file dialog.

Git rid of some unneeded Q_UNUSEDs while we're here.

Bug: 10953
Change-Id: I812aff59818cf0b4d1598b580627d32728d2e9d7
Reviewed-on: https://code.wireshark.org/review/7247
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-24 09:58:03 +00:00
Gerald Combs ae9cc88c00 Qt: Fix unsaved changes behavior.
Check the return value of testCaptureFileClose in
MainWindow::openCaptureFile and add testCaptureFileClose to
MainWindow::closeEvent. Some of the file opening and closing behavior
still needs to be cleaned up but this should at least keep the user from
losing unsaved data.

Bug: 10944
Change-Id: I7d7b563a6b72f48b41a5a3aff2837655557869ff
Reviewed-on: https://code.wireshark.org/review/7283
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-21 02:06:54 +00:00
Gerald Combs 422ad100aa Qt: Apply the main window geometry directly.
As of g2c00d66 we create the main window after we've read the recent
settings. This means that we can get rid of the property animation
workaround in MainWindow::loadWindowGeometry.

Change-Id: I028061c5bdab9261f9394a1840bcdcb752a4f0c8
Reviewed-on: https://code.wireshark.org/review/7278
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-20 18:34:09 +00:00
Alexis La Goutte 5c60289753 Qt Wireshark - Once a live capture is stopped the title bar persists in reporting "Capturing from interface name"
With Qt Wireshark the title bar persists in reporting "Capturing from <interface name>" even though capturing has stopped.

With GTK Wireshark once a live capture is stopped the title bar is updated to report the interface name(s) used for the unsaved capture file.

Issue reported by Jim Young

Bug:10948
Change-Id: Ia6099f63f82b6610ade5c81af0cf257236f076ec
Reviewed-on: https://code.wireshark.org/review/7050
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-19 15:17:20 +00:00
Gerald Combs b5a3b65f7a Qt: Fix side effects of recent WiresharkDialog changes.
Quit the application when the main window closes. This cleans up any
other top-level windows that might be open.

Don't dereference a NULL pointer when opening the sequence dialog from
the VoIP calls dialog.

Change-Id: I9902d40ead1c5f2e541b6d79f3d957228e4e9687
Reviewed-on: https://code.wireshark.org/review/7107
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-14 00:19:58 +00:00
Gerald Combs 936f685af5 Qt: Allow shift-double-clicking on a frame link.
You can open a new packet window in the GTK+ UI by holding down the
shift key and double-clicking on a frame link in the protocol tree. Add
this behavior to the Qt UI. Document the different ways of opening a new
packet window and update the image.

Change-Id: I55caf6cc8089a6c305fafd47b4870e7c69dbfb10
Reviewed-on: https://code.wireshark.org/review/7101
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-13 17:30:26 +00:00
Gerald Combs a0498f177a Qt: Double clicking a packet opens the packet window.
Connect the packet list's doubleClicked signal to the main window's
openPacketDialog slot.

Change-Id: I5bc20c113fb1f22e2257fc1dbdef76c9920e05d0
Reviewed-on: https://code.wireshark.org/review/7092
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-13 03:02:47 +00:00
Gerald Combs 931807ea61 Qt: Add the "new packet" window^Wdialog^Wwindow.
Allow persistence across files. Preserve the use of "window" even
though we're really a dialog.

Update ByteViewTab and ProtoTree to support multiple instances.

Remove the need for a cast in frame_data.

Add more forward declarations.

Change-Id: I50d3d9d1455b8ecc158a37218f9e41fe696d5ae2
Reviewed-on: https://code.wireshark.org/review/7086
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-12 23:32:54 +00:00
Gerald Combs b3f3dd8d82 Qt: Fix preference change behavior.
Main window:

Keep track of our current layout and only change it if the preferences
change. This keeps the panes from resizing.

Re-select the current packet if the layout changes so that the proto
tree and byte view aren't left in an invalid state. This fixes a crash
similar to bug 10896.

Search frame:

Get rid of an invalid error message. Update coding style.

I don't think any of these fix bug 10921 since Xiaochuan seems to get a
crash immediately upon opening the dialog.

Change-Id: I0e880a50d3c9ac1c6ae6a01034b05fd2249444f4
Reviewed-on: https://code.wireshark.org/review/6989
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-06 23:23:02 +00:00
Gerald Combs 89e6f4c468 Qt: Add the Protocol Hierarchy statistics dialog.
Change-Id: I6872e323daca4798c638d764873f54c4c0dc0006
Reviewed-on: https://code.wireshark.org/review/6934
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-04 02:06:01 +00:00
Gerald Combs 21dfda65d7 Qt: Remove windowIcon property from our .ui files.
Setting the windowIcon property in foo.ui means we end up with a
setWindowIcon call in ui_foo.h. Along with setting the window title
bar icon, it also sets the taskbar icon on Windows. A 16x16 PNG gives
us a jaggy taskbar icon. (Windows ICO format is supported via a plugin
which might not be available everywhere, otherwise we could try using
a .ico resource.)

Move the setWindowIcon call from ge990d1b to the top of the MainWindow
constructor and enable it everywhere.

Change-Id: I4e9765200bb3676c4faa8e0ab1505ce02fb64870
Reviewed-on: https://code.wireshark.org/review/6762
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-23 19:15:29 +00:00
Gerald Combs e990d1b2e8 Try to fix the jaggy taskbar icon.
Possibly related to https://bugreports.qt.io/browse/QTBUG-19441.

Change-Id: Idf7ff8a247f459ce465907760ca0ebeaff2cffa8
Reviewed-on: https://code.wireshark.org/review/6746
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-23 12:14:58 +00:00
Guy Harris cfcbb28671 Clean up ftype-conversion and dfilter error message string handling.
Have dfilter_compile() take an additional gchar ** argument, pointing to
a gchar * item that, on error, gets set to point to a g_malloc()ed error
string.  That removes one bit of global state from the display filter
parser, and doesn't impose a fixed limit on the error message strings.

Have fvalue_from_string() and fvalue_from_unparsed() take a gchar **
argument, pointer to a gchar * item, rather than an error-reporting
function, and set the gchar * item to point to a g_malloc()ed error
string on an error.

Allow either gchar ** argument to be null; if the argument is null, no
error message is allocated or provided.

Change-Id: Ibd36b8aaa9bf4234aa6efa1e7fb95f7037493b4c
Reviewed-on: https://code.wireshark.org/review/6608
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-18 10:22:59 +00:00
Deon van der Westhuysen 7d43836b3a QT: stats_tree plug-ins not added to statistics menu
Wireshark Qt does not add plug-ins that register with stats_tree_register_plugin() to the statistics menu in the ui (like the gtk version does).

This patch dynamically adds all registered stats_tree plug-ins to the statistics menu.

Bug: 9528
Change-Id: I99f9415502ca9f7121d494c856861edc1a762079
Signed-off-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-on: https://code.wireshark.org/review/6336
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-16 00:27:35 +00:00
Gerald Combs 5fb2f27428 Qt: Add a context menu to the packet list header.
Don't carry over the sort items from the GTK+ UI (for now, at least).
Update some names. Add a column editor frame similar to the "Go to
Packet" and "Search" frames.

Change-Id: I1bd3834a26994de96894d2b7512bce2c19915c77
Reviewed-on: https://code.wireshark.org/review/6277
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-06 15:22:04 +00:00
Gerald Combs e8ec11fb7e Qt: Add a WiresharkDialog convenience class.
Add WiresharkDialog, a common base class for dialogs centered around
capture files. Make it a parent of Capture File Properties, Traffic
Table, Conversations, and Endpoints.

Rename CaptureFile::read_only_ to file_closed_. Add methods to
WiresharkApplication for generating consistent window titles.

Change-Id: Idc771556d8192e60f85dddc08fc4757698dee257
Reviewed-on: https://code.wireshark.org/review/6097
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-29 01:42:13 +00:00
Gerald Combs 8076f29fdb Qt: Fix status bar signal.
Change-Id: Ie935269f6cbe9495b95bcc24b45198fbd284fb35
Reviewed-on: https://code.wireshark.org/review/5963
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-22 00:42:15 +00:00
Gerald Combs 9ba9cd83a4 Qt: Add a CaptureFile class.
Wrap the capture_file struct in a QObject which translates cf_cb_* and
capture_cb_* events into signals. Move the global cfile to
capture_file.cpp.

Don't use a void pointer for the capture file struct.

Change-Id: Ic5d5efb4bb1db64aa0247245890e5669b1da723a
Reviewed-on: https://code.wireshark.org/review/5885
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-12-20 17:39:29 +00:00
Gerald Combs 56697c244e Qt: Add name resolution menu items.
Change the text from "Enable for" to "Resolve". Make the tooltips more
descriptive. List them in OSI model order.

Change-Id: Ie671ba9d55c609ce475f1681add0ad7d975f19cd
Reviewed-on: https://code.wireshark.org/review/5737
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-12 20:40:53 +00:00
Gerald Combs e4b0141769 Qt: Obey main toolbar icon preferences.
Remove the preferences for the filter toolbar and mark them GTK+-only.

Change-Id: Ie48b19aee29a1cfcea4c41ca6c08ddbba3102377
Reviewed-on: https://code.wireshark.org/review/5693
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-12-10 01:51:09 +00:00
Gerald Combs bcaa5d84b1 Qt: Update and rename the summary dialog.
Go back to a single view similar to the GTK+ UI. Apply layouts using Qt
Designer.

Rename the menu item and class to "Capture File Properties". It's not
really a summary if it contains details such as "marked average bits
per second". We might want to move this to a "Properties" item under
the "File" menu similar to other applications.

Add the GTK+ summary icon (for now) to the toolbar and open the
properties dialog on clicking.

Singleton dialogs delenda est[1]. Let the user open as many summaries on
as many capture files as he or she wishes. Also, global cfile delenda
est[2].

Don't blindly include QtGui. Add specific components instead.

Use consistent method names, variable names, and patterns. Try to
document what "consistent" means.

Adjust the way we display some statistics to match the summary bar, e.g.
displayed = captured if we don't have a filter applied.

[1] Not really.
[2] Yes, really.

Change-Id: I11793b1d79dd0c3f70414ac8592b86181da59916
Reviewed-on: https://code.wireshark.org/review/5274
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-09 19:02:41 +00:00
Maarten Bezemer f16376ed7b Fix showing error dialog when calling vsimple_error_message_box()
SimpleDialog requires a parent, when none is provided (as there is no parent available during startup), the error message is queued and displayed after MainWindow is available.
Calling SimpleDialog::exec() directly returns if no parent is set (hence the dialog is not shown)

This resulted in silently ignoring error messages that were shown using vsimple_error_message_box(), as this function did not provide a parent (and the queue messages were not dequeued anymore as the MainWindow was already available)

Change-Id: I2f4c1b4926c196ab40b035161cec530105396537
Reviewed-on: https://code.wireshark.org/review/5519
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-08 01:15:22 +00:00
Peter Wu cd14ff3288 qt: use qstring_strdup
Replaces the more verbose `g_strdup(foo.toUtf8().constData())` by
`qstring_strdup(foo)`. While at it, plug a minor memleak in
MainWindow dialogs.

Change-Id: I32b53f972b4e3998ac9beabd98647a381b7b42e3
Reviewed-on: https://code.wireshark.org/review/5531
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-12-01 01:13:54 +00:00
Stig Bjørlykke ea167053ff Improved deregistering fields.
This improvement avoids use of deallocated memory (crash) if using a
deregistered field in display filter, color filter, custom column and
other cases when the field is used as "interesting field".

This functionality is currently used in http, imf and ldap preferences.

Also removed unused proto_registrar_n() as this does not work correctly
after deregistering fields.

Change-Id: I043e3bf7a98bd773c9801e712a012d1eab8a7f94
Reviewed-on: https://code.wireshark.org/review/5161
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Stig Bjørlykke <stig@bjorlykke.org>
2014-11-10 08:01:12 +00:00
Michal Labedzki 5025bc258c Qt: Dynamic languages
- get language as soon as possible (before creating any Qt objects) to make all
  translations working
- dynamic list of supported languages
- runtime change of GUI language (no need to restart application)
- add flags icons support
- search for *.qm languages in buildin resources, then
  data dir called "languages" (main directory in sources or
  /usr/share/wireshark/languages), then user directory
  (UNIX: ~/.wireshark/languages); "languages" directory should contains
  files wireshark_xx.qm where xx is language code (en, en_GB, etc.),
  and optional xx.svg for flag icon
- try to fix some untranslated manually-created UI items
  (need manual reset text of those components)

Change-Id: I62ca8a8cddce47cec9dbcad6b0bd68b6cfd92229
Reviewed-on: https://code.wireshark.org/review/5041
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-11-04 08:21:55 +00:00
Pascal Quantin e4c257a169 Qt: fix what seems to be a copy/paste error in MainWindow::loadWindowGeometry() (Coverity CID 1158563)
Change-Id: Iaa2a6367fbb434514751e0ed4f273f883798ce8a
Reviewed-on: https://code.wireshark.org/review/5066
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-11-03 07:32:29 +00:00
Gerald Combs 1c159818fd Qt: ByteViewText hover information.
When the user hovers over a byte view field, highlight it and show a
description in the status bar.

Add a "byte" status bar context and fix a label stack pop bug.

Keep proto_find_field_from_offset from matching generated items.
Otherwise hovering and selecting finds things like GeoIP entries and
checksum validation information. This affects the GTK+ UI as well.

Change-Id: Ic81c0d8159510a72d30c41f961807d8a48d05e16
Reviewed-on: https://code.wireshark.org/review/4943
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-27 02:05:13 +00:00
Gerald Combs e2bece7733 Qt: Show / hide main widgets.
Remove existing code which uses the visibilityChanged signal. It exists
in QToolbar but not QWidget. Use the actions to drive visibility
instead.

Update MainWindow::layoutPanes to respect "recent" settings.

Move the show / hide actions to the top of the View menu to match GTK+.

Change-Id: I670682e2a094945dbd36c80f43cd14515bbca5a6
Reviewed-on: https://code.wireshark.org/review/4911
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-10-22 17:55:18 +00:00
Gerald Combs 9ddbc8de77 Qt: Fill in time display menu items. Other fixes and updates.
Reselect the current packet when we redraw the packet list.

Don't crash if we try to mark when no frame is selected. Try to
invalidate cached packet list strings when needed. Rename
PacketList::updateAll to redrawVisiblePackets so that its purpose is
more clear. When changing the font size, call redrawVisiblePackets
instead of rebuilding the entire list of visible rows.

Change-Id: I6e7a15067e7063d0efc26082170e1795ae3c0779
Reviewed-on: https://code.wireshark.org/review/4901
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-21 23:32:21 +00:00
Gerald Combs a17067abb1 Qt: Rename the "check for updates" slot.
The "Check for Updates..." action doesn't exist when
QMetaObject::connectSlotsByName is called. Rename
on_actionHelpCheckForUpdates_triggered to checkForUpdates so that we
don't get the warning

QMetaObject::connectSlotsByName: No matching signal for on_actionHelpCheckForUpdates_triggered()

at startup.

Change-Id: Icbd7eb98731023c323212e6ec3d3c98f1321e245
Reviewed-on: https://code.wireshark.org/review/4510
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-06 22:59:40 +00:00
Gerald Combs 798eb97053 Qt: Packet list column sorting.
Sorting behavior should be identical to GTK+.

Pass the correct position to beginInsertRows. Add a list of to-do items
to packet_list.cpp.

Change-Id: Ie6ab4b9f2d780a2af430d0f90529edca5485dada
Reviewed-on: https://code.wireshark.org/review/4481
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-06 21:10:11 +00:00
Gerald Combs ff307c72bc Add more HAVE_LIBPCAP checks.
Change-Id: I82e62f6be03a2ae1617cd5b8e430b73ca8fbe7f8
Reviewed-on: https://code.wireshark.org/review/4385
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-30 20:21:35 +00:00
Gerald Combs ced39b6de8 Qt: Start capture from the command line.
Fill in the capture-related mise en place so that -k and -i work. Get
rid of global_capture_session in ui/qt and make it a member of
MainWindow.

Copy over privilege checking from GTK+.

Move the global capture session struct to MainWindow.

Change-Id: Iab5ec683860a40255a7e1d82e3872ced24fd55cb
Reviewed-on: https://code.wireshark.org/review/4382
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-30 18:44:59 +00:00
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
Jörg Mayer 7cd3ff3a8e Fix for
QWidget::setWindowModified: The window title does not contain a '[*]' placeholder

a) Add [*] to the window title.
b) Also set the window title before calling setWindowModified

Not really understanding what I'm doing here, just following the hints
given in http://qt-project.org/forums/viewthread/2108

Original logmessages when closing Wireshark while running a capture.

17:23:39.652 Capture Msg  Capture stopped!
17:23:39.653 Main Dbg  Callback: capture update finished
QWidget::setWindowModified: The window title does not contain a '[*]' placeholder
FIX: packet list heading menu sensitivity
17:23:39.653  Dbg  FIX: capture_info_ui_destroy
17:23:39.653 Main Dbg  Callback: Closing
FIX: packet list heading menu sensitivity
17:23:39.655 Main Dbg  Callback: Closed


svn path=/trunk/; revision=51722
2013-09-03 15:35:32 +00:00
Evan Huus a795048300 Correctly update the pane layout whenever the preferences are changed, you no
longer need to restart for that to take effect. Hopefully I got all the slot
ordering right.

svn path=/trunk/; revision=51720
2013-09-03 13:29:09 +00:00
Evan Huus 78529b2038 Separate window creation from the laying out of the list/tree/byte panes. This
more-or-less restores the correct splash behaviour on startup.

svn path=/trunk/; revision=51719
2013-09-03 12:53:32 +00:00
Evan Huus 16cbf7d4cf Parent the list, tree and byte panes from the main UI rather than the
splitters they're actually layed out in. This should let us reorganize the
splitters at will (when the prefs change) without reconstructing the panes.

svn path=/trunk/; revision=51718
2013-09-03 12:21:14 +00:00
Evan Huus 785c1a5310 Respect the layout preference (just the horizontal/vertical splitting of the
panes, not yet which data goes in which pane).

You currently have to restart for the change to take effect. I also had to move
the preferences-reading (and thus the epan_init) call to before the main window
instantiation so that the preference was actually available for use. This means
that the progress-bar doesn't show up for very long any more, since most of the
work is already done by the time it appears.

I'm sure there is a way to delay just the layout setup until later, but I kept
getting slot errors I couldn't figure out...

svn path=/trunk/; revision=51647
2013-09-02 16:03:13 +00:00
Gerald Combs 186babc6ba When we close a main window, delete the welcome screen, which in turn
deletes the interface list, which in turn kills off the dumpcap process
it may be running. This should hopefully keep us from leaving dumpcap
processes running in the background on Windows. (Am I the only one
running QtShark on that platform?)

svn path=/trunk/; revision=51485
2013-08-23 02:34:51 +00:00
Gerald Combs 79454ef9fa Add initial capture filter support.
Add CaptureFilterCombo and CaptureFilterEdit classes, similar to their
display filter counterparts. Add a CaptureFilterSyntaxWorker class which
runs a syntax check in a background thread similar to the threaded code
in capture_dlg.c. Add a bunch of related signal and slot plumbing. Other
minor fixups.

svn path=/trunk/; revision=51200
2013-08-08 00:26:57 +00:00
Gerald Combs 946b736de2 Set the menuRole for actionCaptureOptions to NoRole similar to
actionEditConfigurationProfiles. This keeps it from being converted to
the default preferences item on OS X.

Remove a hack where we stored the text for
actionEditConfigurationProfiles in its iconText in order to keep it from
clobbering actionEditPreferences. It doesn't seem to be necessary.

svn path=/trunk/; revision=50636
2013-07-15 20:17:17 +00:00
Alexis La Goutte 43c3cb4884 From Thomas ERSFELD (GSOC13) via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8710 QtShark doesn't have a statistics summary window
Add Summary Statistics to qtshark (Statistics => Summary)
Now, use tabs to split summary display (File Capture details, Capture Statistics)

Add also Comment Summary tab (to replace Statistics => Comments Summary)

From me :
Fix order of summary files in Qtshark.pro

svn path=/trunk/; revision=50470
2013-07-09 18:08:40 +00:00
Gerald Combs af02ac36ac On OS X set the toolbar icon size to match our current icons.
svn path=/trunk/; revision=49919
2013-06-13 18:58:29 +00:00
Gerald Combs f5e892cbac Check for QtMacExtras, and if we have it use it to switch to a native
title + toolbar on OS X.

svn path=/trunk/; revision=49873
2013-06-10 21:21:51 +00:00
Guy Harris fb7ae678e4 More capture_options -> capture_session changes.
svn path=/trunk/; revision=49499
2013-05-22 08:47:17 +00:00
Alexis La Goutte 022ce2dea9 From Richard Turner via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8630 QtShark doesn't quit properly after closing the main window during initialization
When trying to close the QtShark application during its initialization process
(by hitting the "close" button), the processes "qtshark.exe" and "dumpcap.exe" don't terminate properly

The patch contains fix to:

1. QtShark doesn't quit properly after closing the main window during initialization

2. User is not prompted to save the capture to file when user chooses to exit
the program during capturing.

3. Bug exists in function MainWindow::testCaptureFileClose(bool from_quit, QString &before_what),
which prevent it from behaving correctly when from_quit == true.

svn path=/trunk/; revision=49454
2013-05-20 18:56:47 +00:00
Alexis La Goutte 36495e5e98 From report of mot990-8omk7tp8mio8ro via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8469 QtShark (wireshark-qt) doesn't use the saved preferences
Detail about this issue :
Bug is reproduced when accessing Preferences Dialog before QtShark start-up is finished,
specifically before preferences loading is completed which comes very late in the initialization process.

Fix from Richard Turner :
Patch to fix problems arising from users interacting with main interface before initialization is complete

Introduced a new slot function in main window for the locking of features before
init complete and for the unlocking of features after all systems good to go.

svn path=/trunk/; revision=49453
2013-05-20 18:56:33 +00:00
Alexis La Goutte a80ad2f9f2 Add Some missing text to translate
svn path=/trunk/; revision=49271
2013-05-13 20:23:46 +00:00
Jörg Mayer 9db6d700cd The porting guide for Qt5 requires that Q_OS_ be used instead
of Q_WS_ in Qt4 projects
See:
http://qt-project.org/doc/qt-5.0/qtdoc/portingguide.html

svn path=/trunk/; revision=49013
2013-04-24 11:07:25 +00:00
Guy Harris e4271a94fc OK, if we're setting the file path for the window - which we want to do,
at least on OS X, to set the "proxy icon" - we need to clear the window
title *and* the file path before we set it, otherwise the set doesn't
happen.

While we're at it, clear the file path whenever we're *not* using a
path.  For temporary files, don't set the file path.

The file path is, in fact, the *full path*, not just the last component.

svn path=/trunk/; revision=48715
2013-04-02 22:10:16 +00:00
Guy Harris 432e914dbd Rename cf_not_saved() to cf_has_unsaved_data() to clarify what it
indicates.  (Note: "unsaved data" is more than just "unsaved changes";
it could also mean "temporary file that hasn't been saved anywhere".)

svn path=/trunk/; revision=48709
2013-04-02 20:35:46 +00:00
Guy Harris d942759401 Add routines to file.c to indicate whether:
a save can be done ("can" in the sense of "there's something to
	save" and in the sense of "we can write that something out");

	a "save as" can be done (in the sense of "we can write what we
	have out");

	there's unsaved data to save (which might be unsaved changes or
	might be a temporary file full of packets);

and use them as appropriate.  This means that the "unsaved data"
indicator in the UI will be turned on for temporary files full of
packets as well as for files with unsaved changes; that's what we want.

svn path=/trunk/; revision=48693
2013-04-01 23:44:29 +00:00
Guy Harris 2deedfb1e1 Add a setTitlebarForCaptureInProgress() method to MainWindow, and use it
to set the title when we have a capture in progress.

svn path=/trunk/; revision=48688
2013-04-01 17:57:47 +00:00
Guy Harris 6c5c65b486 Add a setTitlebarForCaptureFile() and have it set the titlebar and the
"modified" indicator.  For some reason, it's not getting called in all
the right places.

svn path=/trunk/; revision=48682
2013-03-31 22:59:56 +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
Gerald Combs dcb3a4a8a5 Add support for software updates. Remove qtshark.rc and use
image/wireshark.rc (which contains resources needed by WinSparkle)
instead.

svn path=/trunk/; revision=48147
2013-03-06 22:04:17 +00:00
Gerald Combs 1c0deb0fc8 Add Filter Expressions^WButton^WShortcut^WBookmark preferences.
Add comments noting that

- We might want to do something different when the bookmark button is
  pressed.
- The display filters (dfilters file) and gui.filter_expressions
  preferences should be merged.
- Many buttons on Qt4 + OS X + unifiedTitleAndToolBarOnMac makes the
  main window really wide.

Add a qstring_strdup convenience routine. Add "disabled" display filter
edit icons. Fix up whitespace and descriptions in a couple of places.

svn path=/trunk/; revision=47522
2013-02-06 18:22:54 +00:00
Gerald Combs 21e66f0c6f Add column preferences.
svn path=/trunk/; revision=47231
2013-01-23 19:04:36 +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
Gerald Combs 5bd252c44f Remove some duplicate code from ui/profile.c and move in more code from
ui/gtk/profile_dialog.c. Use the correct profile list in
profile_dialog.c so that deletion works.

Add a profile dialog to the Qt port. For some reason it crashes when
changing configuration profiles, which might be related to bug 7722.
Move the Qt configuration profile initialization from main.cpp to
wireshark_application.cpp. Make sure QMenuBar doesn't grab the
configuration profiles action on OS X. Add more role color names to
tango_colors.h.

svn path=/trunk/; revision=46834
2012-12-29 01:39:02 +00:00
Gerald Combs 7cf5334332 Add an AccordionFrame class which can animate showing and hiding (except
when we detect a remote connection). Use it for the "go to" and search
frames. Properly detect remote connections in the splash overlay.

svn path=/trunk/; revision=46591
2012-12-18 17:21:20 +00:00
Gerald Combs 77e6140ba9 Implement the frame mark, ignore, and time reference actions. Update the
text of a few menu items.

svn path=/trunk/; revision=46576
2012-12-17 23:03:21 +00:00
Gerald Combs 5c2c5aed87 Rename the search type menu items to more accurately reflect what we're
actually doing and what users are likely to want to do.  Rename the
search enum values and functions to reflect what we're actually doing
and add a comment explaining why making searches more correct might make
searching worse.  Add a search bar to the Qt main window, thus
continuing the War On Gratuitous Dialogs.

Clear out any previous temporary label stack items before adding a new one.

svn path=/trunk/; revision=46541
2012-12-15 01:04:39 +00:00
Gerald Combs 59cd52b5ca Implement the items under "Edit→Copy", "Analyze→Apply as Filter" and
"Analyze→Prepare a Filter". Add a context menu to the protocol tree and
fill in the items we've implemented so far.

Add an "applyAllPreferences" method and corresponding
"preferencesUpdated" signal to wsApp. Use it to set the maximum display
filter combo count.

Move the packet filtering code from the display filter edit to the main
window (which makes more sense and matches what we're doing in the GTK+
version and gets rid of more global cfile references). Try to center the
display filter edit button images.

Use a different "close" button in the main toolbar. It looks better but
is still wrong (on OS X at least).

svn path=/trunk/; revision=46434
2012-12-07 01:46:20 +00:00
Gerald Combs 224666c60e Fix up a comment.
svn path=/trunk/; revision=46375
2012-12-04 18:20:28 +00:00
Gerald Combs c0c7a64d71 Replace GTK_STOCK_SAVE with WIRESHARK_STOCK_FILE in a few places,
including the GTK+ and Qt main toolbars.

svn path=/trunk/; revision=46374
2012-12-04 18:00:50 +00:00
Gerald Combs b2239669e2 Rename utilityToolBar to displayFilterToolbar and move the display
filter widget there. Add a few more items to the main toolbar. Note that
Qt 4.8 doesn't support a unified title+toolbar with multiple toolbar
rows on OS X (at least not easily) but Qt 5 might.

Disable icons-in-menus on OS X.

svn path=/trunk/; revision=46371
2012-12-04 17:16:09 +00:00
Gerald Combs 9e67335ea8 Update the interface list to reflect the recent interface name changes.
Allow multiple interface selections. Make sure we update the packet list
properly in a couple of places.

Use the right callback+signal to update capture statistics in the status
bar. Remove the global cfile from the main_statusbar.cpp

Add the version to the main window.

svn path=/trunk/; revision=46350
2012-12-03 19:58:55 +00:00
Gerald Combs 66b13e2961 Enable and disable the File→Print and Go menu items as needed. Have the
print dialog cancel itself if we don't hand it a capture file.

svn path=/trunk/; revision=45863
2012-11-01 22:12:57 +00:00
Gerald Combs 0a28fb8f6a Update the Qt byte view widget to reflect the recent changes in the GTK+
byte view.

Move the packet_char_enc enum from packet.h to frame_data.h. Make the
encoding flag a packet_char_enc and make it one bit.

Get rid of the "cfile" global in a few places. C++-ize some of the font
code. Clean up some variable names.

svn path=/trunk/; revision=45838
2012-10-30 19:21:24 +00:00
Gerald Combs 576b24c96e Move ui-independent object export routines to the common ui directory.
Implement DICOM, HTTP, and SMB object exports. Rename the GTK+ export
files. C++-ize epan/tap.h. Fix an apparent memory leak in
eo_save_all_clicked_cb.

The Qt dialog has an indeterminate progress bar. I tried adding
something similar to the GTK+ dialog but event processing led down a
rabbit hole.

svn path=/trunk/; revision=45647
2012-10-18 21:14:43 +00:00
Gerald Combs 677c913f42 Add "Export Packet Bytes".
svn path=/trunk/; revision=45567
2012-10-16 00:01:23 +00:00
Evan Huus d11b00d760 Reduce variable scopes where possible.
svn path=/trunk/; revision=45518
2012-10-13 01:29:29 +00:00
Gerald Combs 419f851e34 Fix Windows compilation problems from r45513. #ifdef out some non-Windows
code.  Get rid of a few uses of the global cfile.

svn path=/trunk/; revision=45514
2012-10-13 00:18:46 +00:00
Gerald Combs cfa22deaae Add a packet format group box, similar to the packet range group box.
Use it in the new "Export Packet Dissections" dialog.

I'm omitting PostScript exports on purpose. If you *really* need that
feature you can probably get better results than we produce using text +
enscript or print-to-PDF + pdf2ps/pdftops or PSML/PDML + XSL + ...

The Windows code is untested. I'll check in any needed fixes shortly.

svn path=/trunk/; revision=45513
2012-10-12 23:40:29 +00:00
Gerald Combs 445148ac0e Add a PacketRangeGroupBox widget. Use it to implement "Export Selected
Packets". Not yet tested on Windows. "Ignore Packet" hasn't been
implemented so we can't test that either.

Create a SyntaxLineEdit widget from the QLineEdit code in
DisplayFilterEdit. Use it in the file import and export dialogs and the
PacketRangeGroupBox widget. This lets us provide instant feedback
instead of popping up an error dialog.

Expand the Tango color list based on
http://emilis.info/other/extended_tango .

Rearrange QtShark.pro to (hopefully) work better with Qt Creator.

svn path=/trunk/; revision=45405
2012-10-08 20:01:59 +00:00
Guy Harris 1ef26ea00f Fix tpyo.
svn path=/trunk/; revision=45318
2012-10-04 18:49:35 +00:00
Alexis La Goutte 79d7ae18aa Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=45312
2012-10-04 18:16:08 +00:00
Gerald Combs 409b405d7c Move the main window slots to main_window_slots.cpp.
svn path=/trunk/; revision=45259
2012-10-02 18:47:05 +00:00
Gerald Combs e46cf2a726 Don't bother setting a background gradient in the toolbar on Windows.
svn path=/trunk/; revision=45246
2012-10-01 22:57:34 +00:00
Gerald Combs d02a2328ef Implement file sets.
Replace the original file set code with a UI form. Use more consistent
file names. List the files using a QTreeWidget instead of a grid.
fileset_is_file_in_set is only used in fileset.c so make it static.

In main_window.cpp reduce our usage of the global cfile variable.

svn path=/trunk/; revision=45243
2012-10-01 22:40:20 +00:00
Gerald Combs b3ced49412 Fix compilation on Windows.
svn path=/trunk/; revision=45160
2012-09-26 21:16:59 +00:00
Gerald Combs 068815cc67 Implement "Save" and "Save As".
svn path=/trunk/; revision=45156
2012-09-26 19:52:53 +00:00
Alexis La Goutte 3738ed7370 Use "common help_url function" for qtshark
Add links to Manual Pages...

svn path=/trunk/; revision=45139
2012-09-25 20:08:11 +00:00
Gerald Combs 7d8330f50a Remove a debugging mesage.
svn path=/trunk/; revision=44993
2012-09-18 23:48:59 +00:00
Gerald Combs c4d22dbe11 import_text_dialog.cpp: Use the common help URL routines.
main_window.cpp: QMessageBox::exec returns a StandardButton, not a ButtonRole.
help_dlg.c: Remove extra blank lines.

svn path=/trunk/; revision=44991
2012-09-18 22:52:34 +00:00
Gerald Combs 3069f22bd1 Add a text import dialog. Use libui.
svn path=/trunk/; revision=44956
2012-09-17 23:40:53 +00:00
Gerald Combs b74aa22317 Show our packets after we've loaded a file.
svn path=/trunk/; revision=44863
2012-09-10 23:02:34 +00:00
Gerald Combs 2bda67e82e Implement File→Merge.
The GTK+ and native Win32 versions are slightly different. The GTK+
version lets you select an output file type and the Win32 version uses
the existing capture filetype. We do the latter for now.

Start documenting significant UI changes in README.qt. This might be
better handled on the wiki.

svn path=/trunk/; revision=44797
2012-09-06 22:58:39 +00:00
Alexis La Goutte 42ace71553 Add modelines for Qtshark file
svn path=/trunk/; revision=44766
2012-09-04 08:18:31 +00:00
Evan Huus 752c00ea9b Temporarilly comment out param names while they're unused (basically
until the functions are implemented) so qtshark will compile with gcc.

svn path=/trunk/; revision=44726
2012-09-01 13:37:04 +00:00
Evan Huus 2f5b01c68a Fix part of build on latest GCC.
svn path=/trunk/; revision=44719
2012-09-01 02:56:32 +00:00
Gerald Combs 64346553f9 Don't try to read from our input pipe on Windows after we're done capturing.
svn path=/trunk/; revision=44718
2012-08-31 23:37:10 +00:00
Gerald Combs 3751353a70 Connect and disconnect our signals correctly.
Capture still doesn't work correctly under Windows.

svn path=/trunk/; revision=44717
2012-08-31 23:18:45 +00:00
Gerald Combs cf4ac2931e Fix compilation on Windows.
The moc man page says "The moc does not expand #include or #define,
it simply skips any preprocessor directives it encounters." This means
our signals and slots have to exist everywhere, even if they're empty
on some platforms.

Remove some duplicate definitions.

svn path=/trunk/; revision=44716
2012-08-31 23:13:43 +00:00
Gerald Combs d6ce6168bb Initialize a variable so that we can quit. Remove some debugging
statements.

svn path=/trunk/; revision=44715
2012-08-31 22:50:44 +00:00
Gerald Combs 5c715fcc19 It ain't Wireshark unless we can capture.
Implement basic capture start and stop. Add a lot of menu items and
enable and disable them when appropriate. Rename a few variables.

Next step: Let the user select an interface (we just use the default for
now).

svn path=/trunk/; revision=44714
2012-08-31 22:25:51 +00:00
Alexis La Goutte 070ccb3d5a File => Open (Ctrl+O) on Qtshark (broke with last change...)
Use Qt:Autoconnect SLOT/Signal

svn path=/trunk/; revision=44708
2012-08-31 07:56:24 +00:00
Gerald Combs fa0a6beb0e Catch key events where needed and direct them to the display filter
QLineEdit. Use Tango colors for syntax highlighting. Rename a few
variables.

svn path=/trunk/; revision=44620
2012-08-23 02:59:31 +00:00
Gerald Combs 4c32e01dfe Handle return/enter/escape in the Go to Packet QLineEdit.
svn path=/trunk/; revision=44616
2012-08-22 20:39:36 +00:00