Commit Graph

316 Commits

Author SHA1 Message Date
Stig Bjørlykke fe2656b407 Qt: Fix plural translations
Change-Id: I17df0c0a3462b7ccdda2105204c0ad72e80fc175
Reviewed-on: https://code.wireshark.org/review/13882
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-02-10 20:02:44 +00:00
Guy Harris ab977a86d0 Properly check the return value of color_filters_set_tmp().
It returns FALSE, not TRUE, on failure.

Bug: 12101
Change-Id: I2fb4f407d2040e7b84f17af197de81555d64c647
Reviewed-on: https://code.wireshark.org/review/13857
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-02-09 21:18:02 +00:00
Stig Bjørlykke 1b5382caa5 Qt: Add Show Packet Bytes Dialog
Show selected packet bytes as ASCII, HTML, Image, ISO 8859-1, Raw or UTF-8.
Images supported are what's supported by QImage, and HTML supported
is what's supported by QTextEdit.

Change-Id: I96fc5c5d222c5389078576463cf78d82cf55528d
Reviewed-on: https://code.wireshark.org/review/13807
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-02-08 16:54:12 +00:00
Stig Bjørlykke 4c144c5d8c Qt: Reset columns before auto resize time columns
When changing timestamp format, timestamp precision and display seconds
with hours and minutes we must reset columns before auto resizing the
time columns to get the size of the new column values.

Without this we will resize to the length of the preference we are
changing from, which is not what we want.

Change-Id: If7081bf0b9b6f6974232cea0b3fe0186c904f2a2
Reviewed-on: https://code.wireshark.org/review/13711
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>
2016-02-05 05:33:22 +00:00
Peter Wu 8899e006aa Fix memleaks related to get_dirname
get_dirname may return NULL instead of the original string, so avoid
patterns like get_dirname(strdup(x)). Writing to
cf_path.toUtf8().data() is fine btw, toUtf8() returns new memory.

This fixes two memleak reported by LeakSanitizer via fileset_add_dir and
MainWindow::captureFileReadFinished (both via cf_callback_invoke).

Change-Id: I0f1528763e77e1f55b54b6674c890a9d02302ee8
Reviewed-on: https://code.wireshark.org/review/13691
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-02-04 04:57:30 +00:00
Gerald Combs e57bb1919c Make Qt UI capture filter behavior more closely match the GTK+ UI.
If the user enters a capture filter in the Capture Interfaces dialog and
presses "Start", make sure we copy the filter to the main welcome
screen.

Back out capture filter code from g0ce9ac4. Leave out the code that set
the global capture filter. Move the code that set individual capture
filters to the welcome screen.

Fix multiple interface selection in the welcome screen.

Rename allFilterComboBox in the capture interfaces dialog to
captureFilterComboBox to match the main welcome screen.

If the user starts typing in captureFilterComboBox, make sure the
"Capture Filter" column is visible. Update the "Capture Filter" column
as the user types. Conversely, if the user edits the "Capture Filter"
column, update captureFilterComboBox accordingly.

If we're editing a per-interface filter make sure we commit its contents
before starting capture.

Map our device index directly to each tree item instead of using a
separate map which will no longer be valid any time our sort order
changes (which we do right away in our constructor).

Don't set prefs.capture_devices_filter in the Qt UI. The GTK+ UI doesn't
and doing so can lead to surprising behavior. Note that it's mostly
unused.

Note that we don't multiple selected filters very well.

Ping-Bug: 11886
Change-Id: I3c052f4f464411e2fb8fb7d96b218e1ce2bac3fd
Reviewed-on: https://code.wireshark.org/review/13410
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-01-27 16:13:19 +00:00
Stig Bjørlykke a7d07e9edc Qt: Check for file changes on Reload
Check if having unsaved changes and offer a save before reload
and reload as file format/capture.

Bug: 12003
Change-Id: Ic4282e0a17a4ec745e729eb93863fc15e7ec611b
Reviewed-on: https://code.wireshark.org/review/13535
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-01-26 18:14:17 +00:00
Stig Bjørlykke 06e5197867 Qt: Improved testCaptureFileClose dialog texts
Make the "Unsaved packets" dialog question and informative text
use the same layout for all cases.

Added before_what texts when opening another file and closing the
file.  Changed the texts for restarting the capture.

Renamed FileCloseButtons to FileCloseContext to use it for other
checks than just button texts.

Change-Id: I4a39852a1c18e8ffb7fa6b5c800a84500f995bc8
Reviewed-on: https://code.wireshark.org/review/13524
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-01-26 18:03:45 +00:00
Stig Bjørlykke 720f57d000 ui: Code cleanup
Fixed code layout to use common style in the file.
Mostly whitespace changes.

Change-Id: Id37b57717a9e26248fad07322dff09b1d1f45ac2
Reviewed-on: https://code.wireshark.org/review/13504
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>
2016-01-23 23:15:54 +00:00
Pascal Quantin 06b75181a0 Qt: fix a crash when trying to open TCP stream graph on a truncated TCP packet
Do not try to show TCP stream graph window if it was rejected in constructor

Change-Id: I4d1401e2c356391ceb8c8e3d37a668fc2a9fc92f
Reviewed-on: https://code.wireshark.org/review/13454
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>
2016-01-20 23:39:15 +00:00
Gerald Combs cd5b932812 Qt: "Conversation" → "Coloring"
Change actionViewColorizeNewConversationRule to
actionViewColorizeNewColoringRule and change its text accordingly.
We're building a rule based on a general filter, not a conversation.

Change-Id: Ic408050eed6f24690e3e759e6963f9930fe4b5e9
Reviewed-on: https://code.wireshark.org/review/13266
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>
2016-01-14 05:21:28 +00:00
Stig Bjørlykke da798683de Qt: Refactor testCaptureFileClose
Cleanup arguments and simplify code for button texts.

Change-Id: Ie505650889212082e088a525f4b82e62b9177b0d
Reviewed-on: https://code.wireshark.org/review/13180
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-12 14:20:25 +00:00
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 0ce9ac4137 Add a Busy status to SyntaxLineEdit.
For CaptureFilterEdit it's possible to have an indeterminate state while
we're waiting on name resolution. Add a Busy status to SyntaxLineEdit
and set the text color to a mix of the normal foreground and background
colors (gray on most platforms).

Make the Busy state valid so that we don't have to wait on an
annoyingly-long name resolution to start capturing.

Update the global capture option filters using the main welcome capture
filter when we start a capture instead of when we've finished checking
the filter syntax.

Connect the CaptureFilterEdit returnPressed signal no matter what so
that we can start a capture by pressing return in the welcome screen
CaptureFilterEdit.

Add a fake resolution timeout to the CaptureFilterSyntaxWorker debug
code to make testing the different states easier.

Bug: 11950
Change-Id: I0cf01c0fbc0dd8065cdf5a91f1d6b224291b1ce6
Reviewed-on: https://code.wireshark.org/review/13110
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 17:53:28 +00:00
Gerald Combs 613b406023 Qt: Add recent capture filter entries.
Copy over and adapt missing logic from the GTK+ UI which adds recent
capture filter entries when we start a capture.

Change-Id: Ifcf8b719e53727b7c269d9890731d542d1759efc
Ping-Bug: 11950
Reviewed-on: https://code.wireshark.org/review/13086
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-07 01:19:21 +00:00
Michael Mann 1fed5fef9a Add HTTP Follow stream
This automatically detects and decompresses HTTP along a TCP stream through the use of taps.

Bug: 3528
Change-Id: I8ab832d509700d0da8eabf3c3e514d8511c598d3
Reviewed-on: https://code.wireshark.org/review/13009
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-03 13:36:18 +00:00
Guy Harris ee9f102aa9 No need for toolkit-dependent color initialization.
We're not allocating colors ourselves in GTK+ (and haven't been doing so
since at least 1.12), and all color_t values are valid colors, so
we don't need any toolkit-specific processing to fill in a color_t.

While we're at it, catch read errors when reading color filter files.

Change-Id: Ieb520d141cf15e371a31a01459d466c95ba2209b
Reviewed-on: https://code.wireshark.org/review/12985
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-01 04:15:29 +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
Michael Mann 5e4bbcda98 Refactor GUI dependencies out of color_filters.[ch] and move it to epan directory.
This also moved color.h into color_filters.h

Change-Id: Ic19e27aa1b3ec67e764aa7ee8bbef7b1187bb12e
Reviewed-on: https://code.wireshark.org/review/12831
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-28 18:33:41 +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
Michael Mann 444dfda793 Allow "capture info data" to not be a singleton.
It was buried as a static variable in capture_info.c, and functions were refactored to allow a pointer to the info_data_t structure to be passed in. TShark and GTK will have their own single (global) copy of the structure, while it opens up Qt to have multiple instances.

Change-Id: Ic2d7a2ad574de43f457cb18b194d6bc3fffb6120
Reviewed-on: https://code.wireshark.org/review/12691
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-19 14:22:56 +00:00
Pascal Quantin 38cde83a5c Qt: reset columns when applying a display filter
Bug: 11786
Change-Id: I7d3b4139328adaf2f79f008a8772b3182c1eb1f0
Reviewed-on: https://code.wireshark.org/review/12688
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-17 18:12:51 +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
Stig Bjørlykke bfcd1e6514 Qt: Reset preferences when reloading Lua plugins
Reading configuration files may duplicate some entries, so ensure
we reset preferences before reloading.

Change-Id: I746414cbc10c206ddf47669856f329b9e0202a0d
Reviewed-on: https://code.wireshark.org/review/12496
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-10 14:08:58 +00:00
Stig Bjørlykke 7e06334a87 Qt: Disable Refresh Interfaces while refreshing
Doing multiple Refresh Interfaces simultaneously will end up in
duplicated interfaces.

Change-Id: If9bb4252bbfabc557b78ad42efc0011050012417
Reviewed-on: https://code.wireshark.org/review/12414
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-09 17:01:43 +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
Stig Bjørlykke 41d4dabc29 Qt: Validate capture filter before showing packet list.
When starting a capture do validate all settings before showing
the packet list.

Bug: 11667
Change-Id: Ia0457b9643ca76f8d51c0a254f587398dda888d9
Reviewed-on: https://code.wireshark.org/review/12259
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-28 19:13:20 +00:00
Pascal Quantin 75da6960e0 Qt: set focus to text box when opening search frame
Change-Id: Iac932365bc2fa7a5d5102a5f5455ea01daa86590
Reviewed-on: https://code.wireshark.org/review/12236
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-28 07:46:39 +00:00
Pascal Quantin 56625dd456 Qt: remove automatic horizontal scrolling when selecting a row
QTreeView automatically scrolls so as to show as much as possible the content of the selected column.
Let's get rid of that.
Rename PacketList::setAutoScroll() so that it does not overload QAbstractItemView::setAutoscroll()

Change-Id: I09fb54f9b31c3025efddce6a4e709baaf107702d
Reviewed-on: https://code.wireshark.org/review/12225
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-27 18:49:53 +00:00
Pascal Quantin c965fb0614 Qt: make Files Set dialog modeless
Otherwise you need to close the window each time you change the file
so as to browse its content...

Change-Id: Ibf8485695cec34bb950ad98cb671e77d4f663b63
Reviewed-on: https://code.wireshark.org/review/12187
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-26 18:43:36 +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
Gerald Combs 3d3eb159a7 Revert: Free cf->edt before free cf->epan when redissecting.
Instead of freeing cf->edt before clearing the packet list, add an extra
check to MainWindow::setMenusForSelectedTreeRow. Semi-blind attempt at
fixing bug 11719.

This reverts commit 8c211d51ef.
This reverts commit da71ccbf77.

Bug: 11719
Change-Id: Ifd07be414ffd03a40bdfa7110395c9542bd86fc4
Reviewed-on: https://code.wireshark.org/review/11943
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-11-18 20:28:30 +00:00
Stig Bjørlykke 73ee917841 Qt: Don't update expert icon without a capture file.
We don't show the expert info icon when not having a capture file,
so this should not be enabled when emitting redissectPackets().

Change-Id: I6ae6124ed9f69c214a2beadbdc670b15dfe3d060
Reviewed-on: https://code.wireshark.org/review/11937
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-18 16:36:21 +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
Stig Bjørlykke 062e5b3118 Qt: setMenusForSelectedPacket when capture file is closed.
Moved setMenusForSelectedPacket() to captureFileClosed() because
capture_file_.capFile() is still valid in captureFileClosing().

Menu items depending on is_ip, is_tcp, is_udp, is_sctp, is_ssl,
is_rtp and is_lte_rlc must be disabled when closing the capture
file because many of the dialogs does crash when launched without
a valid frame selected.

All dialogs should probably have a guard for this to avoid crashes,
but that may be an exercise for an enhancement to add support for the
dialogs to follow the current loaded capture file.

Change-Id: If5837a355d08df76547572a25d46ffa539070de3
Reviewed-on: https://code.wireshark.org/review/11883
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-17 07:32:31 +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 f5d7548497 Qt: Coloring Rules dialog fixups.
Insert new rules at the top. This matches the GTK+ UI behavior. Recolor
the packet list when we press "OK". Add a "to do" item about setting the
filter column width.

Change-Id: I2a9e58fe8642a89f12e1c34622b96613f3ec4c05
Reviewed-on: https://code.wireshark.org/review/11781
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-13 01:47:53 +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
Guy Harris caa1e87410 Use ws_{read,write,fdopen,close}.
Be more consistent about using the ws_ routines, as we suggest in
README.developer.

In C++ on UN*X, define ws_close as ::close rather than close, so that it
works even in classes with methods or members named "close".

Change-Id: Ide2652229e6b6b4624cbddae0e909a4ea1efa591
Reviewed-on: https://code.wireshark.org/review/11637
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-08 10:32:09 +00:00
Guy Harris 0162e54075 Clean up includes of unistd.h, fcntl.h, and sys/stat.h.
Have wsutil/file_util.h include them on UN*X, just as it includes io.h
on Windows, so we can have a rule of "if you do file operations, include
<wsutil/file_util.h> and use the routines in it".

Remove includes of unistd.h, fcntl.h, and sys/stat.h that aren't
necessary (whether because of the addition of them to wsutil/file_util.h
or because they weren't needed in the first place).

Change-Id: Ie241dd74deff284e39a5f690a297dbb6e1dc485f
Reviewed-on: https://code.wireshark.org/review/11619
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-07 21:52:23 +00:00
Guy Harris 2d00abcb81 No need to include io.h.
This includes wsutil/file_util.h, which includes io.h, so we don't need
to include it ourselves.

Change-Id: I96b111d2b5a4f27895c1e4b19c31eee2a4d5d554
Reviewed-on: https://code.wireshark.org/review/11595
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-06 18:33:43 +00:00
Stig Bjørlykke 86320fdee6 Qt: Turn off WindowModified when closing a file.
When closing a capture file the main window will never be modified,
so ensure we turn this off when the file is closed.

Change-Id: I3e6a62c931330a75d32f46fc32524d8de8734485
Reviewed-on: https://code.wireshark.org/review/11497
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-03 21:00:08 +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
Guy Harris a8a4098e12 "Color dissector filters" are just filters.
Rename the color_dissector_filters.[ch] files to just
dissector_filters.[ch], and rename the routines not to include the
string "color_", as those filters can be used as color filters *or*
display filters.

Remove "color_" from other places where we're not doing colorization.

In the GTK+ code, combine the two loops that add menu items for filters
in the dissector-provided filters list into one.

Change-Id: I08ecccc6b1b1be675e4129a0589f36c9f240407c
Reviewed-on: https://code.wireshark.org/review/11379
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-29 03:32:30 +00:00
Martin Mathieson 9768a3e8a0 LTE dialogs: tidy up some loose ends
Change-Id: I18f099311f7660c91cffdf21bbacdb88b7c0fd7e
Reviewed-on: https://code.wireshark.org/review/11182
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-10-20 20:02:44 +00:00
Gerald Combs a0113a5eb3 Qt: fix time shift
Add a timeShifted signal to TimeShiftDialog and use it to update the
packet list and model. Add drawCurrentPacket to PacketList so that we
can do a more thorough job of redrawing the current packet and tree.

Bug: 11575
Change-Id: I960d8cdbf6872e3f71007cb4d2bbd5457f268257
Reviewed-on: https://code.wireshark.org/review/11068
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-10-19 17:41:12 +00:00
Martin Mathieson 8efd83ef82 LTE RLC Graph: add support for going to packet clicked
Change-Id: I7e1ada7508c33f7ccea5703a9ea9e2a76ecdb706
Reviewed-on: https://code.wireshark.org/review/11118
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-10-17 21:27:26 +00:00